[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
This commit is contained in:
Nicolas Martinelli
2016-01-20 09:15:31 +01:00
parent b7d9858353
commit 0b8e48dd5f
+1
View File
@@ -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,