changeset 12557af3ba5c in modules/product_cost_fifo:4.6
details: 
https://hg.tryton.org/modules/product_cost_fifo?cmd=changeset;node=12557af3ba5c
description:
        Do not get product from last fifo moves but from self move

        The fifo moves can be empty and so move is undefined.

        issue7918
        (grafted from 19a69c93a7a58615de67bbcd07d14c9090886136)
diffstat:

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

diffs (12 lines):

diff -r a40d62498ce2 -r 12557af3ba5c move.py
--- a/move.py   Tue Apr 02 21:49:01 2019 +0200
+++ b/move.py   Wed Apr 10 09:55:06 2019 +0200
@@ -76,7 +76,7 @@
         # Compute average cost price
         unit_price = self.unit_price
         self.unit_price = Uom.compute_price(
-            move.product.default_uom, cost_price, self.uom)
+            self.product.default_uom, cost_price, self.uom)
         average_cost_price = self._compute_product_cost_price('out')
         self.unit_price = unit_price
 

Reply via email to