Merge lp:~openerp-dev/openobject-addons/6.0-opw-381937-ado into lp:openobject-addons/6.0

Proposed by Amit Dodiya (OpenERP)
Status: Merged
Merged at revision: 5103
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-381937-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 11 lines (+1/-1)
1 file modified
stock/stock.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-381937-ado
Reviewer Review Type Date Requested Status
nel Pending
Xavier ALT Pending
Naresh(OpenERP) Pending
Review via email: mp+95529@code.launchpad.net

Description of the change

Hello,

[FIX] account move entry should be created with 0.0 value when cost price is 0.0

Make an inventory directly from the product form for a Consumable product with sales and cost price equal to 0, I get an accounting line with an amount equal to 1 which is not correct.

Thanks,
Amit

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-01-10 12:52:13 +0000
+++ stock/stock.py 2012-03-02 12:05:26 +0000
@@ -2070,7 +2070,7 @@
2070 context = {}2070 context = {}
2071 currency_ctx = dict(context, currency_id = move.company_id.currency_id.id)2071 currency_ctx = dict(context, currency_id = move.company_id.currency_id.id)
2072 amount_unit = move.product_id.price_get('standard_price', currency_ctx)[move.product_id.id]2072 amount_unit = move.product_id.price_get('standard_price', currency_ctx)[move.product_id.id]
2073 reference_amount = amount_unit * qty or 1.02073 reference_amount = amount_unit * qty
20742074
2075 return reference_amount, reference_currency_id2075 return reference_amount, reference_currency_id
20762076