Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-579149-skh into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579149-skh/+merge/126650

Hello Sir,

[FIX] stock: Wrong amount in stock journal move in the real time inventory 
valuation.

Steps to reproduce:
1. Create a UOM of type Unit as 10PCE (1*10)
2. Create a product "test Product" and select Purchase UOM as 10PCE, select 
Supplier as "Axelor" and Inventory Valuation="Real Time" 
3. Create PO and in PO line select the product and give Qty=8 and Unit 
Price=3.5 also select UOM as 10 PCE.
4. Select Invoicing Control as "On Receprion"
5. Confirm the Order and Process reception.

Open the Menu Accounting > Journal Entries see move have the wrong amount as 
280 where it should be 28.

This branch fixes the issue.

Please review the branch and share your views.

Regards,
Somesh Khare

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579149-skh/+merge/126650
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-579149-skh.
=== modified file 'stock/stock.py'
--- stock/stock.py	2012-08-07 10:04:35 +0000
+++ stock/stock.py	2012-09-27 09:54:20 +0000
@@ -2158,7 +2158,7 @@
         # if product is set to average price and a specific value was entered in the picking wizard,
         # we use it
         if move.product_id.cost_method == 'average' and move.price_unit:
-            reference_amount = qty * move.price_unit
+            reference_amount = qty * (move.price_unit * move.product_uom.factor)
             reference_currency_id = move.price_currency_id.id or reference_currency_id
 
         # Otherwise we default to the company's valuation price type, considering that the values of the

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to