action handling proposal

bzr revid: al@openerp.com-20110401104454-djtm0728azy66g76
This commit is contained in:
Antony Lesuisse 2011-04-01 12:44:54 +02:00
parent 3cc735cc2c
commit 96e08cf3d1
2 changed files with 7 additions and 1 deletions

View File

@ -92,7 +92,7 @@ openerp.base.FormView = openerp.base.Controller.extend({
on_saved: function() {
// Check response for exceptions, display error
},
do_search: function (domains, contexts, groupbys) {
on_action: function (action) {
}
});

View File

@ -61,6 +61,7 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
break;
}
controller.start();
// controller.on_action.add(this.on_action); ??
this.views[view_type].controller = controller;
if (this.auto_search) {
this.searchview.on_loaded.add_last(this.searchview.do_search);
@ -129,6 +130,11 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
},
on_edit: function() {
}
/**
* Called when one of the view want to execute an action
*/
on_action: function(action) {
}
});
openerp.base.ViewManagerRoot = openerp.base.Controller.extend({