changeset b32e91c7149e in modules/product_cost_fifo:default
details: 
https://hg.tryton.org/modules/product_cost_fifo?cmd=changeset;node=b32e91c7149e
description:
        Enforce filling cost price of move

        We set cost price only for outgoing or incoming moves.

        issue9397
        review321611002
diffstat:

 move.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 2cc5ed768416 -r b32e91c7149e move.py
--- a/move.py   Fri Jun 19 00:26:36 2020 +0200
+++ b/move.py   Fri Jul 03 21:22:43 2020 +0200
@@ -134,7 +134,7 @@
                 and self.product.cost_price_method == 'fifo'):
             fifo_cost_price, cost_price = (
                 self._update_fifo_out_product_cost_price())
-            if self.cost_price is None:
+            if self.cost_price_required and self.cost_price is None:
                 self.cost_price = fifo_cost_price
         return cost_price
 

Reply via email to