[FIX] purchase_requisition: change active_id to tender_id in widget context
this is due to commit6ed774de61
anda37bad205b
which removes the active_id from context if the target==curent which is the case of this widget, we therefore can not use active_id here. fix #2385
This commit is contained in:
parent
5b1eee9a3a
commit
32bbc34458
|
@ -115,6 +115,7 @@ class purchase_requisition(osv.osv):
|
|||
res['context'] = {
|
||||
'search_default_groupby_product': True,
|
||||
'search_default_hide_cancelled': True,
|
||||
'tender_id': ids[0],
|
||||
}
|
||||
res['domain'] = [('id', 'in', [line.id for line in po_lines])]
|
||||
return res
|
||||
|
|
|
@ -19,7 +19,7 @@ openerp.purchase_requisition = function(instance) {
|
|||
},
|
||||
generate_purchase_order: function () {
|
||||
var self = this;
|
||||
new instance.web.Model(self.dataset.model).call("generate_po",[self.dataset.context.active_id,self.dataset.context]).then(function(result) {
|
||||
new instance.web.Model(self.dataset.model).call("generate_po",[self.dataset.context.tender_id,self.dataset.context]).then(function(result) {
|
||||
self.ViewManager.ActionManager.history_back();
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue