Enforce unit price on drop and customer return moves

Those values are interesting information for reporting or to compare with the
cost price.

issue9402
review327421002
This commit is contained in:
Cédric Krier committed 2020-07-04 23:49:25 +02:00
1 parent 426fee8ce4
commit b7903e605d
1 file changed
+3 -2
+3 -2
View File
@@ -1559,8 +1559,9 @@ class SaleLine(sequence_ordered(), ModelSQL, ModelView):
move.to_location = self.to_location
move.state = 'draft'
move.company = self.sale.company
move.unit_price = self.unit_price
move.currency = self.sale.currency
if move.on_change_with_unit_price_required():
move.unit_price = self.unit_price
move.currency = self.sale.currency
if self.moves:
# backorder can not be planned but shipping date could be used
# if set in the future