Revert commit "[FIX] sale_margin: purchase price calculated using the currency of the price type"

Reasons:
- the currency conversion is done assuming that the cost price currency is the company currency
- we support only one price type per field. Defining several price types on the same field using
  different price types is not supported.
This commit is contained in:
Nicolas Martinelli 2015-04-13 15:38:17 +02:00
parent 737728a7a0
commit d246e36c82
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class sale_order_line(osv.osv):
to_cur = self.pool.get('product.pricelist').browse(cr, uid, [pricelist])[0].currency_id.id
if product:
product = self.pool['product.product'].browse(cr, uid, product, context=context)
purchase_price = product.price_get(ptype='standard_price', context=dict(context, currency_id=to_cur))[product.id]
purchase_price = product.standard_price
to_uom = res.get('product_uom', uom)
if to_uom != product.uom_id.id:
purchase_price = self.pool['product.uom']._compute_price(cr, uid, product.uom_id.id, purchase_price, to_uom)