forked from Techsystech/web
[IMP] web_ir_actions_act_multi: black, isort
parent
f8ffb4dd28
commit
bd6982f3d6
|
@ -1,22 +1,17 @@
|
|||
# Copyright 2017 - 2018 Modoolar <info@modoolar.com>
|
||||
# Copyright 2018 Brainbean Apps
|
||||
# Copyright 2020 Manuel Calero
|
||||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
|
||||
|
||||
{
|
||||
"name": "Web Actions Multi",
|
||||
"summary": "Enables triggering of more than one action on ActionManager",
|
||||
"category": "Web",
|
||||
"version": "12.0.1.0.0",
|
||||
"version": "13.0.1.0.0",
|
||||
"license": "LGPL-3",
|
||||
"author": "Modoolar, "
|
||||
"Brainbean Apps, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"author": "Modoolar, " "Brainbean Apps, " "Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/web/",
|
||||
"depends": [
|
||||
"web"
|
||||
],
|
||||
"data": [
|
||||
"views/web_ir_actions_act_multi.xml",
|
||||
],
|
||||
"depends": ["web"],
|
||||
"data": ["views/web_ir_actions_act_multi.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
|
|
|
@ -2,19 +2,18 @@
|
|||
// Copyright 2018 Brainbean Apps <hello@brainbeanapps.com>
|
||||
// License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
|
||||
|
||||
odoo.define('web_ir_actions_act_multi.ir_actions_act_multi', function (require) {
|
||||
odoo.define("web_ir_actions_act_multi.ir_actions_act_multi", function(require) {
|
||||
"use strict";
|
||||
|
||||
var ActionManager = require('web.ActionManager');
|
||||
var ActionManager = require("web.ActionManager");
|
||||
|
||||
ActionManager.include({
|
||||
|
||||
/**
|
||||
* Intercept action handling to detect extra action type
|
||||
* @override
|
||||
*/
|
||||
_handleAction: function (action, options) {
|
||||
if (action.type === 'ir.actions.act_multi') {
|
||||
_handleAction: function(action, options) {
|
||||
if (action.type === "ir.actions.act_multi") {
|
||||
return this._executeMultiAction(action, options);
|
||||
}
|
||||
|
||||
|
@ -28,7 +27,7 @@ odoo.define('web_ir_actions_act_multi.ir_actions_act_multi', function (require)
|
|||
* @param {integer|undefined} index Index of action being handled
|
||||
* @returns {$.Promise}
|
||||
*/
|
||||
_executeMultiAction: function (action, options, index) {
|
||||
_executeMultiAction: function(action, options, index) {
|
||||
var self = this;
|
||||
|
||||
if (index === undefined) {
|
||||
|
@ -41,13 +40,9 @@ odoo.define('web_ir_actions_act_multi.ir_actions_act_multi', function (require)
|
|||
return $.when();
|
||||
}
|
||||
|
||||
return this
|
||||
._handleAction(action.actions[index], options)
|
||||
.then(function () {
|
||||
return self._executeMultiAction(action, options, index + 1);
|
||||
});
|
||||
return this._handleAction(action.actions[index], options).then(function() {
|
||||
return self._executeMultiAction(action, options, index + 1);
|
||||
});
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
# Copyright 2017 - 2018 Modoolar <info@modoolar.com>
|
||||
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
|
||||
-->
|
||||
<odoo>
|
||||
<template id="assets_backend" name="web_ir_actions_act_multi assets" inherit_id="web.assets_backend">
|
||||
<template
|
||||
id="assets_backend"
|
||||
name="web_ir_actions_act_multi assets"
|
||||
inherit_id="web.assets_backend"
|
||||
>
|
||||
<xpath expr="." position="inside">
|
||||
|
||||
<script type="text/javascript"
|
||||
src="/web_ir_actions_act_multi/static/src/js/web_ir_actions_act_multi.js" />
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="/web_ir_actions_act_multi/static/src/js/web_ir_actions_act_multi.js"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue