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

Requested reviews:
  Priyesh (OpenERP) (pso-openerp)
  Jay Vora (OpenERP) (jvo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-6191-skh/+merge/64533

Hello Sir,

[Fix] : Wrong stock value in the Multi Company.

This happens in the scenario when there is 2 or more child companies for a 
parent company, and if there is one shared product "test product" and a common 
partner for both child companies. If the user of the child companies are 
creating the purchase order as,

Child 1: buys 1 "test product" at R10 -> reciepts stock and validates supplier 
invoice.
Child 2: buys 1 "test product" at R20 -> reciepts stock and validates supplier 
invoice.
Total stock valuation (eg. in reporting->inventory analysis) should be R30 
Branch 1: stock value: 10 Branch 2: stock value: 20 Consolidated total: stock 
value: 30

But In the current system the value is,
Child 1: stock value: 20
Child 2: stock value: 20
Consolidated total: stock value: 40 (Wrong)

Issue is fixed in the branch.

Thanks,
SKH
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-6191-skh/+merge/64533
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-6191-skh.
=== modified file 'stock/report/report_stock_move.py'
--- stock/report/report_stock_move.py	2011-05-03 09:57:42 +0000
+++ stock/report/report_stock_move.py	2011-06-14 11:26:29 +0000
@@ -176,7 +176,7 @@
         m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type,
         m.company_id,
         m.state as state, m.prodlot_id as prodlot_id,
-        coalesce(sum(-pt.standard_price * m.product_qty)::decimal, 0.0) as value,
+        coalesce(sum(-m.price_unit * m.product_qty)::decimal, 0.0) as value,
         CASE when pt.uom_id = m.product_uom
         THEN
         coalesce(sum(-m.product_qty)::decimal, 0.0)
@@ -200,7 +200,7 @@
         m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type,
         m.company_id,
         m.state as state, m.prodlot_id as prodlot_id,
-        coalesce(sum(pt.standard_price * m.product_qty )::decimal, 0.0) as value,
+        coalesce(sum(m.price_unit * m.product_qty )::decimal, 0.0) as value,
         CASE when pt.uom_id = m.product_uom
         THEN
         coalesce(sum(m.product_qty)::decimal, 0.0)

_______________________________________________
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