From aed71f396284e8e5e948baa28be8d5d706b1e030 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 31 Oct 2014 12:20:56 +0100 Subject: [PATCH] [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 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 644dae4ddf9..3b6bb70e457 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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')