[tryton-debian-vcs] tryton-modules-product-cost-fifo branch upstream-3.2 updated. upstream/3.2.4-1-gd3f6898

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Dec 23 16:53:06 UTC 2015


The following commit has been merged in the upstream-3.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-product-cost-fifo.git;a=commitdiff;h=upstream/3.2.4-1-gd3f6898

commit d3f6898b45cfbfa4a0a55a6204e07dcf62c2862a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Dec 23 14:21:00 2015 +0100

    Adding upstream version 3.2.5.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 66305e4..8177303 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.5 - 2015-12-22
+* Bug fixes (see mercurial logs for details)
+
 Version 3.2.4 - 2015-09-15
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 6c6cb01..285131a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_product_cost_fifo
-Version: 3.2.4
+Version: 3.2.5
 Summary: Tryton module to add FIFO cost method
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/move.py b/move.py
index d2c2160..217e2cc 100644
--- a/move.py
+++ b/move.py
@@ -4,6 +4,7 @@ from decimal import Decimal
 from trytond.model import Workflow, ModelView, fields
 from trytond.pyson import Eval
 from trytond.pool import Pool, PoolMeta
+from trytond.transaction import Transaction
 
 __all__ = ['Move']
 __metaclass__ = PoolMeta
@@ -38,8 +39,9 @@ class Move:
         fifo_quantity on the concerned incomming moves. Return the
         cost price for outputing the given product and quantity.
         '''
-
-        Uom = Pool().get('product.uom')
+        pool = Pool()
+        Uom = pool.get('product.uom')
+        Currency = pool.get('currency.currency')
 
         total_qty = Uom.compute_qty(self.uom, self.quantity,
             self.product.default_uom, round=False)
@@ -51,7 +53,11 @@ class Move:
         for move, move_qty in fifo_moves:
             consumed_qty += move_qty
 
-            move_unit_price = Uom.compute_price(move.uom, move.unit_price,
+            with Transaction().set_context(date=move.effective_date):
+                move_unit_price = Currency.compute(
+                    move.currency, move.unit_price,
+                    self.company.currency, round=False)
+            move_unit_price = Uom.compute_price(move.uom, move_unit_price,
                     move.product.default_uom)
             cost_price += move_unit_price * Decimal(str(move_qty))
 
@@ -99,7 +105,7 @@ class Move:
                     and move.to_location.type != 'storage'
                     and move.product.cost_price_method == 'fifo'):
                 cost_price = move._update_fifo_out_product_cost_price()
-                if not move.cost_price:
+                if move.cost_price is None:
                     move.cost_price = cost_price
             move.save()
 
diff --git a/tryton.cfg b/tryton.cfg
index 4291407..baad614 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.2.4
+version=3.2.5
 depends:
     ir
     product
diff --git a/trytond_product_cost_fifo.egg-info/PKG-INFO b/trytond_product_cost_fifo.egg-info/PKG-INFO
index a16ad7c..f975fc3 100644
--- a/trytond_product_cost_fifo.egg-info/PKG-INFO
+++ b/trytond_product_cost_fifo.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-product-cost-fifo
-Version: 3.2.4
+Version: 3.2.5
 Summary: Tryton module to add FIFO cost method
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-product-cost-fifo



More information about the tryton-debian-vcs mailing list