[FIX] purchase_requisition: change active_id to tender_id in widget context

this is due to commit 6ed774de61 and a37bad205b 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:
Cedric Snauwaert 2014-10-15 14:47:09 +02:00
parent 5b1eee9a3a
commit 32bbc34458
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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();
});
},