Hardik Ansodariya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-577753-han 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-577753-han/+merge/121580

Hello,

Fixed the issue of Phantom sets in valuation of components.

to reproduce:
* Create 3 product lets say:
  product 101011 cost price: 12.12
  product 101005 ""        : 6.38
  product 101008 ""        : 2.87
  
* Product config:
  Costing Method: Average
  Inventory Valuation: Real Time
* BOM
  Product 101011(BOM Type: Sets / Phantom)
  Product 101005 and 101008 as component.
  
* create a sale order with one line:
   - product 101011 (qty=1)
* "compute" and "confirm" that sale order
* in warehouse, delivery orders:
   - check availability
   - process
   - validate
* accounting / chart of accounts -> choose "All Entries"
   - edit account "330000"
-> you'll see that for this sale, there are 2 lines:
   - product 101005: credit = 12.12
   - product 101008: credit = 24.24

The credit values takes the price of product 101011 instead of taking 
their price for their corresponding product (101005 or 101008).

The journal items should be:
   - product 101005: credit = 6.38
   - product 101008: credit = 5.74 (2.87*2)

With the reference of Maintenance case: 577753

Kindly review it.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-577753-han/+merge/121580
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-577753-han.
=== modified file 'stock/stock.py'
--- stock/stock.py	2012-08-07 10:04:35 +0000
+++ stock/stock.py	2012-08-28 11:04:20 +0000
@@ -2157,7 +2157,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:
+        if move.product_id.cost_method == 'average' and move.price_unit and move.picking_id.type in ('in', 'internal'):
             reference_amount = qty * move.price_unit
             reference_currency_id = move.price_currency_id.id or reference_currency_id
 

_______________________________________________
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