mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Add module web_ir_actions_act_multi
This commit is contained in:
committed by
matiasperalta1
parent
dd34be2563
commit
a41cba6bf7
@@ -0,0 +1,31 @@
|
||||
// Copyright 2017 - 2018 Modoolar <info@modoolar.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) {
|
||||
"use strict";
|
||||
|
||||
var ActionManager = require('web.ActionManager');
|
||||
|
||||
ActionManager.include({
|
||||
|
||||
execute_ir_actions_act_multi: function(actions, options, index){
|
||||
var self = this;
|
||||
|
||||
if (index >= actions.length){
|
||||
return actions[actions.length-1];
|
||||
}
|
||||
|
||||
return self.do_action(actions[index],options)
|
||||
.then(function(){
|
||||
index++;
|
||||
return self.execute_ir_actions_act_multi(actions, options, index);
|
||||
});
|
||||
},
|
||||
|
||||
ir_actions_act_multi: function(action, options){
|
||||
return this.execute_ir_actions_act_multi(action.actions, options, 0);
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user