From fc850d7560a1edab092c27cbb5e525c1476b1fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 22 Oct 2015 11:02:49 +0200 Subject: [PATCH] Don't override cost_price if it is zero Only override the cost_price if it was not set which means if it is None. issue5034 --- move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.py b/move.py index 9d5e37ce30..08b3b8f571 100644 --- a/move.py +++ b/move.py @@ -87,7 +87,7 @@ class Move: and self.to_location.type != 'storage' and self.product.cost_price_method == 'fifo'): cost_price = self._update_fifo_out_product_cost_price() - if not self.cost_price: + if self.cost_price is None: self.cost_price = cost_price super(Move, self)._do()