From 6e346f0adbf6b62347b1d86429a345fc0ac2ae26 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 3 Jul 2015 16:40:02 +0200 Subject: [PATCH] [FIX] stock: product_uos_qty must have the precision of Product UoS If 'Product UoS' has a higher precision than 'Product Unit of Measure', the method onchange_uos_quantity will be called over and over by an infinite loop if 'product_uos_qty' doesn't have the sufficient number of decimals. opw-643651 --- 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 16deddcca5b..3a500ce5ad5 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1610,7 +1610,7 @@ class stock_move(osv.osv): "the product reservation, and should be done with care." ), 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}), - 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}), + 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product UoS'), states={'done': [('readonly', True)]}), 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}), 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),