From: ado Date: Fri, 2 Mar 2012 10:21:21 +0000 (+0530) Subject: [FIX] account move entry should be created with 0.0 value when cost price is 0.0 X-Git-Tag: 6.0.4-server~16^2^2 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=989c290215c639a7a49f6d3cd66c7c6c042eccae;p=odoo%2Fodoo.git [FIX] account move entry should be created with 0.0 value when cost price is 0.0 bzr revid: ado@tinyerp.com-20120302102121-tjkllsh7naa31nma --- diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 072e444..f640cee 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2070,7 +2070,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', currency_ctx)[move.product_id.id] - reference_amount = amount_unit * qty or 1.0 + reference_amount = amount_unit * qty or 0.0 return reference_amount, reference_currency_id