Product Cost Update Bug

Bug #1304804 reported by Richard deMeester
12
This bug affects 2 people
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_standard_price used to re-browse the product record based on the location context.

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.