From f4bf85843f5a986b247cd6bee56f35798c63035f Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Mon, 7 Mar 2022 10:06:04 +0100 Subject: [PATCH] Upgrade issue10363.diff from production-237cad37234f --- issue10363.diff | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/issue10363.diff b/issue10363.diff index 21c1231..cae9adb 100644 --- a/issue10363.diff +++ b/issue10363.diff @@ -2,15 +2,7 @@ diff --git a/trytond/trytond/modules/production/bom.py b/trytond/trytond/modules index dc3faeb..3f9c369 100644 --- a/trytond/trytond/modules/production/bom.py +++ b/trytond/trytond/modules/production/bom.py -@@ -1,6 +1,6 @@ - # This file is part of Tryton. The COPYRIGHT file at the top level of - # this repository contains the full copyright notices and license terms. --from trytond.model import ModelView, ModelSQL, DeactivableMixin, fields, Unique -+from trytond.model import ModelView, ModelSQL, DeactivableMixin, fields - from trytond.wizard import Wizard, StateView, Button - from trytond.pyson import Eval - from trytond.pool import Pool -@@ -21,13 +21,15 @@ class BOM(DeactivableMixin, ModelSQL, ModelView): +@@ -21,15 +21,15 @@ class BOM(DeactivableMixin, ModelSQL, ModelView): Compute factor for an output product ''' Uom = Pool().get('product.uom') @@ -26,7 +18,8 @@ index dc3faeb..3f9c369 100644 + output.uom, output.quantity, uom, round=False) + if output_quantity: + return quantity / output_quantity -+ else: + else: +- return 0.0 + return 0 @classmethod