[IMP] Use CompondContext for button actions

bzr revid: fme@openerp.com-20110621123120-y2kucare2kes52ac
This commit is contained in:
Fabien Meghazi
2011-06-21 14:31:20 +02:00
parent 76db3f3870
commit f90c073f23
+2 -2
View File
@@ -416,10 +416,10 @@ openerp.base.View = openerp.base.Controller.extend({
result : { type: 'ir.actions.act_window_close' }
});
} else {
var context = _.extend({}, dataset.context, action_data.context || {});
var context = new openerp.base.CompoundContext(dataset.context).add(action_data.context || {});
switch(action_data.type) {
case 'object':
return dataset.call(action_data.name, [[record_id], context], handler);
return dataset.call_and_eval(action_data.name, [[record_id], context], null, 1, handler);
case 'action':
return this.rpc('/base/action/load', { action_id: parseInt(action_data.name, 10) }, handler);
default: