From c10374dced597d27aa4c60eccd682d01cd57e86e Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 18 Jun 2010 16:49:59 +0530 Subject: [PATCH] [Fix] stock_planning: set deafault rounding value=1 and fix the name bzr revid: sbh@tinyerp.com-20100618111959-a0wlza1r8z6bmy46 --- addons/stock_planning/stock_planning.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock_planning/stock_planning.py b/addons/stock_planning/stock_planning.py index 0c957d8b72e..ef9fa7e65dd 100644 --- a/addons/stock_planning/stock_planning.py +++ b/addons/stock_planning/stock_planning.py @@ -346,12 +346,13 @@ class stock_sale_forecast(osv.osv): def product_amt_change(self, cr, uid, ids, product_amt = 0.0, product_uom=False): ret={} + round_value = 1 if product_amt: coeff_def2uom = 1 val1 = self.browse(cr, uid, ids) val = val1[0] if (product_uom != val.product_id.uom_id.id): - coeff_def2uom, rounding = self._from_default_uom_factor( cr, uid, val, product_uom, {}) + coeff_def2uom, round_value = self._from_default_uom_factor( cr, uid, val, product_uom, {}) ret['product_qty'] = rounding(coeff_def2uom * product_amt/(val.product_id.product_tmpl_id.list_price), round_value) res = {'value': ret} return res