[Fix] sale: remove the purchase_line_id from sale

bzr revid: sbh@tinyerp.com-20100916055017-x9gf8agtna3y4i91
This commit is contained in:
sbh (Open ERP)
2010-09-16 11:20:17 +05:30
parent 0a822221c3
commit 495318ea48
+2 -2
View File
@@ -40,8 +40,8 @@ class stock_move(osv.osv):
if move.product_id.cost_method != 'average' or not move.price_unit:
# no average price costing or cost not specified during picking validation, we will
# plug the sale line values if they are found.
if move.purchase_line_id and move.picking_id.pricelist_id.currency_id:
reference_amount, reference_currency_id = move.purchase_line_id.price_unit, move.picking_id.pricelist_id.currency_id.id
if move.sale_line_id and move.picking_id.pricelist_id.currency_id:
reference_amount, reference_currency_id = move.sale_line_id.price_unit, move.picking_id.pricelist_id.currency_id.id
return reference_amount, reference_currency_id
stock_move()