From a83c3a959191217e39b3d4e87323337f4e227de7 Mon Sep 17 00:00:00 2001 From: "Laetitia Gangloff (Acsone)" Date: Fri, 12 Jul 2013 17:22:35 +0200 Subject: [PATCH] mrp : product quantity is modified with the factor lp bug: https://launchpad.net/bugs/1200676 fixed bzr revid: laetitia.gangloff@acsone.eu-20130712152235-lbfi12a0z29tw22a --- addons/mrp/mrp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 44fbaafbcfe..7e5a53c5b68 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -760,9 +760,9 @@ class mrp_production(osv.osv): subproduct_factor = self._get_subproduct_factor(cr, uid, production.id, produce_product.id, context=context) rest_qty = (subproduct_factor * production.product_qty) - produced_qty - if rest_qty < production_qty: + if rest_qty < (subproduct_factor * production_qty): prod_name = produce_product.product_id.name_get()[0][1] - raise osv.except_osv(_('Warning!'), _('You are going to produce total %s quantities of "%s".\nBut you can only produce up to total %s quantities.') % (production_qty, prod_name, rest_qty)) + raise osv.except_osv(_('Warning!'), _('You are going to produce total %s quantities of "%s".\nBut you can only produce up to total %s quantities.') % ((subproduct_factor * production_qty), prod_name, rest_qty)) if rest_qty > 0 : stock_mov_obj.action_consume(cr, uid, [produce_product.id], (subproduct_factor * production_qty), context=context)