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
This commit is contained in:
Cédric Krier
2024-11-13 11:10:05 +01:00
parent 5965e02da3
commit 70e1b5bfad
+2 -1
View File
@@ -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