[ADD] handling of client actions

bzr revid: xmo@openerp.com-20110701115726-9jzjro3i7060mb5w
This commit is contained in:
Xavier Morel 2011-07-01 13:57:26 +02:00
parent 886cf032a5
commit 50aaf7b3ab
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@
openerp.base.views = function(openerp) {
openerp.base.client_actions = new openerp.base.Registry();
openerp.base.ActionManager = openerp.base.Controller.extend({
// process all kind of actions
init: function(session, element_id) {
@ -87,6 +88,10 @@ openerp.base.ActionManager = openerp.base.Controller.extend({
}).then(function (action) {
self.do_action(action, on_closed)
});
},
'ir.actions.client': function (action) {
var Handler = openerp.base.client_actions.get_object(action.tag);
new Handler(this.session, this.element_id, action['kwargs']).start();
}
});