From b7903e605d873f941c2acfec8d8e8f8a5ff929ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 4 Jul 2020 23:49:25 +0200 Subject: [PATCH] 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 --- sale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sale.py b/sale.py index 28068da184..8d68af2515 100644 --- a/sale.py +++ b/sale.py @@ -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