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

Proposed by Amit Dodiya (OpenERP)
Status: Approved
Approved by: Rifakat Husen (OpenERP)
Approved revision: 5169
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-573224-ado
Merge into: lp:openobject-addons/6.0
Diff against target: 12 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-573224-ado
Reviewer Review Type Date Requested Status
Rifakat Husen (OpenERP) (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+99885@code.launchpad.net

Description of the change

Hello,

"[FIX] Bad unit conversion while using Average Price"

Steps:
1). For product Wood 2mm change the default uom = meter, set costing method = average with real-time inventory evaluation.
2). Create purchase order and buy the above product in kilometre uom
3). Create a picking and validate it.
The journal entry is created with 5000000 amount instead of 5,000 amount.

Regards,
Amit

To post a comment you must log in.
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Amit,
It works fine.

Thanks for the fix!
Rifakat

review: Approve

Unmerged revisions

5169. By Amit Dodiya (OpenERP)

[FIX] Bad unit conversion while using Avreage Price

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-03-27 08:23:08 +0000
3+++ stock/stock.py 2012-03-29 07:35:22 +0000
4@@ -2065,7 +2065,7 @@
5 # if product is set to average price and a specific value was entered in the picking wizard,
6 # we use it
7 if move.product_id.cost_method == 'average' and move.price_unit:
8- reference_amount = qty * move.price_unit
9+ reference_amount = move.product_qty * move.price_unit
10 reference_currency_id = move.price_currency_id.id or reference_currency_id
11
12 # Otherwise we default to the company's valuation price type, considering that the values of the