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
This commit is contained in:
Cédric Krier committed 2015-10-22 11:02:49 +02:00
1 parent 9986259df7
commit fc850d7560
1 file changed
+1 -1
+1 -1
View File
@@ -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()