summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-01-20 09:15:31 +0100
committerNicolas Martinelli <nim@odoo.com>2016-01-20 09:15:31 +0100
commit0b8e48dd5ff81a687be2087b72e0e37ccf82903d (patch)
treeb36cb46ffb6f45ac6d710fe961491e6748b62a27 /addons
parentb7d985835384271082d2944e20e15d2cd81a1803 (diff)
[FIX] purchase: currency of PO
When a PO is created automatically from a procurement, the currency is the currency of the connected user, which might be different from the currency of the pricelist. The fix set the currency to the currency of the pricelist. opw-665573
Diffstat (limited to 'addons')
-rw-r--r--addons/purchase/purchase.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 9f7ebafc18b..914de80f6d0 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -1664,6 +1664,7 @@ class procurement_order(osv.osv):
'location_id': procurement.location_id.id,
'picking_type_id': procurement.rule_id.picking_type_id.id,
'pricelist_id': partner.property_product_pricelist_purchase.id,
+ 'currency_id': partner.property_product_pricelist_purchase.currency_id.id,
'date_order': purchase_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT),
'company_id': procurement.company_id.id,
'fiscal_position': fp,