Merge lp:~openerp-dev/openobject-addons/7.0-opw-603094-rha into lp:openobject-addons/7.0
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/7.0-opw-603094-rha |
Merge into: | lp:openobject-addons/7.0 |
Diff against target: |
35 lines (+10/-3) 1 file modified
stock/stock.py (+10/-3) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-603094-rha |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paulius Sladkevičius @ hbee (community) | test | Approve | |
Naresh(OpenERP) | Pending | ||
Review via email: mp+203273@code.launchpad.net |
Description of the change
When there is a move(upstream) chained with another move(downstream), and we split the upstream move into several moves in the picking(using Serial Number split wizard). The downstream move should be triggered when we process the last move among the upstream moves, but currently this is not working. Processing last upstream move does not trigger the downstream move, so downstream move always be in state "Waiting Another Move" even if all upstream moves/picking is validated.
Steps to reproduce:
* Create chaining for location, Stock -> Quality Control(Chaining Type:Manual Operation)
* Create incoming shipment for 10 unit of "USB Adapter", Supplier -> Stock. Confirm it.
* It will create chained internal picking. Stock -> Quality Control.
* For Incoming Shipment, Split move for Serial Number with 5 qty. so you will have 2 moves with 5 qty each.
* When we validate shipment with these 2 (upstream)moves together with full qty, it should mark internal picking(downstream move) as "Ready to Transfer". But it doesn't. Downstream move remain as "Waiting Another Move".
Problem:
When action_done() for stock.move is called for all the upstream moves, logic is to trigger(confirm) downstream move while last upstream move is validated. Logic for checking the last upstream move is not working because, those moves are still inside action_done() and their state is not marked as 'done' while loop execution.
Solution:
Instead of checking upstream moves and state=done, it created a dict which keeps information of processed upstream moves.
Unmerged revisions
- 9782. By Rifakat Husen (OpenERP)
-
[FIX] stock: when several moves shares the same downstream move(move_dest_id) then
downstream move should be trigerred only when the last upstream move is reached and others are already processed
I've tested this patch and it looks it solved my issue, an infinitive loop that I've faced in the procurement cron job.