From 70e1b5bfad1ca2f1b58aefc611624914c01c8e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 13 Nov 2024 11:10:05 +0100 Subject: [PATCH] Fill unit price required when creating production moves from BOM Since 23a3a9ed13d7 the unit price is reset to None if the unit price is not required. So the client must known that the unit price is required to keep the value. Closes #13674 --- modules/production/production.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/production/production.py b/modules/production/production.py index 54f238edb2..e0f4b31fef 100644 --- a/modules/production/production.py +++ b/modules/production/production.py @@ -379,7 +379,8 @@ class Production(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): move.from_location = self.location move.to_location = self.output_location move.production_output = self - if move.on_change_with_unit_price_required(): + move.unit_price_required = move.on_change_with_unit_price_required() + if move.unit_price_required: move.unit_price = Decimal(0) if self.company: move.currency = self.company.currency