Inventory correction moves are calculated based on current date and not inventory date

Bug #926640 reported by Eric Caudal - www.elico-corp.com
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

When doing a stocktaking and fill an inventory, moves are calculated based on current date and not on inventory creation date.

eg:
2011/12/31 total stock moves = 100
2012/01/01 stocktaking = 90
2012/01/02 out product move for 5
2012/01/03 inventory for 90 is posted (with creation date = 1/1)

Done correction move is 100 - 90 + 5 = 5
Correct correction move is 100 - 90 = 10

This is because following line in stock.py/stock_inventory/action_confirm seems incorrect and currently do ask the available quantity up to date (to_date context field):
# product_context.update(uom=line.product_uom.id, date=inv.date, prodlot_id=line.prod_lot_id.id)
                product_context.update(uom=line.product_uom.id, to_date=inv.date, prodlot_id=line.prod_lot_id.id)#EC

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Hello Eric.

It is solved by us, and is pending to merge, we need some lobby to push, and already we put on our OPW.

Try it and give us your feedback.

Let me tell you the problem is a little more complez. try our patch.

Regards.

Bug related:

https://bugs.launchpad.net/openobject-addons/+bug/915568

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.