[IMP] Use CompondContext for button actions
bzr revid: fme@openerp.com-20110621123120-y2kucare2kes52ac
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user