[IMP] stock: avoid errors with picking without quantity

When a line is not present in the partial delivery wizard, computation variables are initialized with generic values (zero quantity, zero price,...). Instead of setting the uom to False, keep the quantity of the move.
This makes a difference only when the quantity of the move is 0. That means that the move will be marked as complete and can be processed.
This avoids trying to update the stock.move with a uom at False. opw 616844
This commit is contained in:
Martin Trigaux 2014-10-31 12:20:56 +01:00
parent 6a95c9cf3e
commit aed71f3962
1 changed files with 1 additions and 1 deletions

View File

@ -1248,7 +1248,7 @@ class stock_picking(osv.osv):
partial_data = partial_datas.get('move%s'%(move.id), {})
product_qty = partial_data.get('product_qty',0.0)
move_product_qty[move.id] = product_qty
product_uom = partial_data.get('product_uom',False)
product_uom = partial_data.get('product_uom', move.product_uom.id)
product_price = partial_data.get('product_price',0.0)
product_currency = partial_data.get('product_currency',False)
prodlot_id = partial_data.get('prodlot_id')