From eba662336c8f6fe56348b641a31c6c2ac9af1a10 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 22 Jun 2017 13:14:11 +0200 Subject: [PATCH] [FIX] sale: Changing product qty to 0 in SO line When changing the qty of a SO line to 0, the product_uos_qty, th_weight were not updated and then it lead to some errors. opw:748288 --- addons/sale/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 10b38d38a31..2492ca2a4a6 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1226,7 +1226,7 @@ class sale_order_line(osv.osv): if context.get('uom_qty_change', False): values = {'price_unit': price} for field in ['product_uos_qty', 'th_weight']: - if result.get(field): + if not result.get(field, False) is False: values[field] = result[field] return {'value': values, 'domain': {}, 'warning': False} if warning_msgs: