From 274e489f0a8b45e71fdf13839c2f430d2cd9b5e1 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 11 Nov 2014 19:18:52 +0100 Subject: [PATCH] Set price of agreement when sourcing with a framework --- framework_agreement_sourcing/model/logistic_requisition.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/framework_agreement_sourcing/model/logistic_requisition.py b/framework_agreement_sourcing/model/logistic_requisition.py index cba2255c..c70f1fd9 100644 --- a/framework_agreement_sourcing/model/logistic_requisition.py +++ b/framework_agreement_sourcing/model/logistic_requisition.py @@ -56,8 +56,11 @@ def _prepare_line_source(self, cr, uid, line, if not agreement.product_id.id == line.product_id.id: raise ValueError( "Product mismatch for agreement and requisition line") - res['framework_agreement_id'] = agreement.id - res['procurement_method'] = 'fw_agreement' + res.update({ + 'framework_agreement_id': agreement.id, + 'procurement_method': 'fw_agreement', + 'unit_cost': agreement.get_price(qty,line.currency_id), + }) else: if line.product_id.type == 'product': res['procurement_method'] = 'procurement'