changeset 0e32a0ae4a16 in modules/product_cost_fifo:default
details: 
https://hg.tryton.org/modules/product_cost_fifo?cmd=changeset;node=0e32a0ae4a16
description:
        Convert cost price into move uom to compute average cost price

        The unit price is always expressed in the unit of the move but the cost 
price
        is computed in the default uom.

        issue7918
        review251121002
diffstat:

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

diffs (13 lines):

diff -r 2bec33342291 -r 0e32a0ae4a16 move.py
--- a/move.py   Sat Jan 26 01:10:48 2019 +0100
+++ b/move.py   Fri Mar 22 11:16:13 2019 +0100
@@ -73,7 +73,8 @@
 
         # Compute average cost price
         unit_price = self.unit_price
-        self.unit_price = cost_price
+        self.unit_price = Uom.compute_price(
+            move.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