From 3d94d42ac10eeca74e528e109a3e509a25f80ed4 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Wed, 13 Sep 2023 15:28:17 +0200 Subject: [PATCH] Rename Uom to Unit for bill of material --- production.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/production.py b/production.py index 2d200a6..aaa1a79 100644 --- a/production.py +++ b/production.py @@ -440,7 +440,7 @@ class Production(metaclass=PoolMeta): def pass_feature(self, product): Variety = Pool().get('product.variety') Uom = Pool().get('product.uom') - total_output = sum([Uom.compute_qty(x.uom, x.quantity, + total_output = sum([Uom.compute_qty(x.unit, x.quantity, x.product.default_uom) for x in self.inputs if x.product.template in self.production_template.inputs]) @@ -569,7 +569,7 @@ class Production(metaclass=PoolMeta): for output in production.outputs: has_product = False output_cost = Decimal(0) - total_output = sum([Uom.compute_qty(x.uom, x.quantity, + total_output = sum([Uom.compute_qty(x.unit, x.quantity, x.product.default_uom) for x in production.outputs if x.product.template == output.product.template])