Merge lp:~openerp-dev/openobject-addons/6.1-opw-577753-han into lp:openobject-addons/6.1

Proposed by Hardik Ansodariya (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6961
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577753-han
Merge into: lp:openobject-addons/6.1
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.1-opw-577753-han
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+121580@code.launchpad.net

Description of the change

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

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

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-577753-port-rma/+merge/138962 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6961. By Hardik Ansodariya (OpenERP)

[FIX] stock: Bug with Phantom sets in valuation of components (Maintanance case: 577753)

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-08-07 10:04:35 +0000
3+++ stock/stock.py 2012-08-28 11:04:20 +0000
4@@ -2157,7 +2157,7 @@
5
6 # if product is set to average price and a specific value was entered in the picking wizard,
7 # we use it
8- if move.product_id.cost_method == 'average' and move.price_unit:
9+ if move.product_id.cost_method == 'average' and move.price_unit and move.picking_id.type in ('in', 'internal'):
10 reference_amount = qty * move.price_unit
11 reference_currency_id = move.price_currency_id.id or reference_currency_id
12