Cancelling a procurement always makes a stock move available
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
Unassigned | ||
7.0 |
Fix Committed
|
Undecided
|
OpenERP Publisher's Warranty Team |
Bug Description
When a procurement order is cancelled (manually or by cancelling a draft Make to Order PO), any corresponding stock move 'waiting another move' gets automatically set to 'available', regardless of current stock level. Instead, it should set the product to 'waiting availability', and immediately try to reserve from stock (same result, unless there is not enough stock on hand).
Steps to reproduce:
1.) Create product A (type = stockable product, procure method = make to order, supply method = buy, qty on hand = 0)
2.) Create product B(type = stockable product, procure method = make to order, supply method = manufacture, qty on hand = 0)
3.) Set a BoM on product B, which contains product A.
4.) Create a sale order for product B.
5.) The internal move for the resulting manufacturing order should have a line for product A in 'waiting another move' status, and a draft PO for product A should have been created.
6.) Now cancel that draft PO and view the internal move again. The line for product A is 'available', even though we have 0 on hand.
The current behavior causes two problems:
1.) In the case where we cancel a draft MTO PO, and do not have have the goods on hand, the status of 'available' is very misleading.
2.) Since the action_cancel() function just changes the state of the stock move without triggering any workflows/functions of the parent picking, an internal move can get stuck in 'waiting availability' when all of its moves are available.
Related branches
- Martin Trigaux (OpenERP) (community): Approve
- Naresh(OpenERP): Pending requested
-
Diff: 13 lines (+2/-1)1 file modifiedprocurement/procurement.py (+2/-1)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Changed in openobject-addons: | |
milestone: | none → 7.0 |
Hello David,
Thanks for the contribution.
This issue is fixed with following:
branch: lp:~openerp-dev/openobject-addons/7.0-opw-605091-ado
revision-id: <email address hidden>
revision-no: 9920
Soon our experts will review and merge it with stable 7.0 addons.
Regards,
Amit