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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user