Product Cost Update Bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
Revision 9779 to openobject-addons has introduced a new significant bug.
The loop in do_change_
This has been removed for some reason.
Now, it updates the cost for ALL stock for every location in the outer browse loop.
To recreate:
Create a product, average stock valuation and real time accounting.
Let's assume 2 internal locations - Output and Stock
Output has quantity of zero
Stock has quantity of 10.
Go to product maintenance and click "- update" to update the cost.
The journals created are double.
The reason is that the main loop on product browses the product for all locations, meaning quantity is 10.
The inner loop on location does not rebrowse the product, and assumes 10 on hand for both locations.
This is a significant problem.