Split of entire move should be handled correctly in do_transfer

Bug #1276736 reported by Josse Colpaert (OpenERP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP new WMS
Fix Released
Undecided
Unassigned

Bug Description

In the following piece of code of do_transfer:

elif move.remaining_qty > 0:
                        new_move = stock_move_obj.split(cr, uid, move, move.remaining_qty, context=context)
                        todo_move_ids.append(move.id)
                        #Assign move as it was assigned before
                        toassign_move_ids.append(new_move)

A problem arises when the move.remaining_qty is equal to the move.product_qty because the move will be done as it is not split and passed entirely also to the todo moves, which will make that move done.

This was discovered by testing the partial availability in trunk-wms-partial-remain-jco

Revision history for this message
qdp (OpenERP) (qdp) wrote :

i don't get you.

what use case will fail, do you say?

Revision history for this message
Josse Colpaert (OpenERP) (jco-openerp) wrote :

Create a product MTO/buy and a sales order of e.g. 100 pieces of this product. Confirm the purchase order and receive partially with e.g. 40 pieces. The chained delivery order will have 2 move lines: one of 40 and one of 60. If you want to transfer the delivery order, the 40 pieces will be reserved. If you process this picking (and you left the 40 in quantities done) it will process both moves to done. This is because in the function above it should take care of the case where remaining qty and product qty is the same (nothing is reserved).

qdp (OpenERP) (qdp)
Changed in openerp-trunk-wms:
status: New → Confirmed
Changed in openerp-trunk-wms:
status: Confirmed → Fix Committed
Revision history for this message
qdp (OpenERP) (qdp) wrote :

fix released in revision 9567.

thannnnks

Changed in openerp-trunk-wms:
status: Fix Committed → Fix Released
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.