[MERGE] opw-381937. Stock: don't set an arbitrary value of 1 when valuating a stock move of a product with 0 as unit amount

bzr revid: qdp-launchpad@openerp.com-20120316111027-frfidvpqjxr0v8rf
This commit is contained in:
Quentin (OpenERP) 2012-03-16 12:10:27 +01:00
commit b37d72428b
1 changed files with 1 additions and 1 deletions

View File

@ -2165,7 +2165,7 @@ class stock_move(osv.osv):
context = {}
currency_ctx = dict(context, currency_id = move.company_id.currency_id.id)
amount_unit = move.product_id.price_get('standard_price', context=currency_ctx)[move.product_id.id]
reference_amount = amount_unit * qty or 1.0
reference_amount = amount_unit * qty
return reference_amount, reference_currency_id