[tryton-debian-vcs] tryton-modules-stock branch debian-stretch-4.0 updated. debian/4.0.4-1-3-gc556b92

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Mon Dec 19 18:50:55 UTC 2016


The following commit has been merged in the debian-stretch-4.0 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock.git;a=commitdiff;h=debian/4.0.4-1-3-gc556b92

commit c556b92bdbfd3eaf02ecbe277ba5ea4fff82cea4
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Dec 19 12:02:38 2016 +0100

    Releasing debian version 4.0.5-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 60986c8..5f9e690 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-stock (4.0.5-1) unstable; urgency=medium
+
+  * Setting the branch in the watch file to the fixed version 4.0.
+  * Merging upstream version 4.0.5.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 19 Dec 2016 12:02:38 +0100
+
 tryton-modules-stock (4.0.4-1) unstable; urgency=medium
 
   * Merging upstream version 4.0.4.
commit a737cd743a72ae483a41301a1115f61b4caefc38
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Dec 19 12:02:37 2016 +0100

    Merging upstream version 4.0.5.

diff --git a/CHANGELOG b/CHANGELOG
index a985d29..1b8178c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.5 - 2016-12-17
+* Bug fixes (see mercurial logs for details)
+
 Version 4.0.4 - 2016-11-06
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 4eaf904..9872713 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock
-Version: 4.0.4
+Version: 4.0.5
 Summary: Tryton module for stock and inventory
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/product.py b/product.py
index 047af08..2cd9149 100644
--- a/product.py
+++ b/product.py
@@ -17,6 +17,7 @@ from trytond.transaction import Transaction
 from trytond.pool import Pool, PoolMeta
 from trytond.tools import grouped_slice
 
+from trytond.modules.product import TemplateFunction
 from .move import StockMixin
 
 __all__ = ['Template', 'Product',
@@ -189,7 +190,7 @@ class Product(StockMixin, object):
         pool = Pool()
         Template = pool.get('product.template')
 
-        if hasattr(cls, 'cost_price'):
+        if not isinstance(cls.cost_price, TemplateFunction):
             digits = cls.cost_price.digits
             write = cls.write
             record = lambda p: p
@@ -230,7 +231,7 @@ class Product(StockMixin, object):
 
         context = Transaction().context
 
-        if hasattr(self.__class__, 'cost_price'):
+        if not isinstance(self.__class__.cost_price, TemplateFunction):
             product_clause = ('product', '=', self.id)
         else:
             product_clause = ('product.template', '=', self.template.id)
diff --git a/tests/scenario_stock_average_cost_price.rst b/tests/scenario_stock_average_cost_price.rst
index 7a19b2b..62d9d7f 100644
--- a/tests/scenario_stock_average_cost_price.rst
+++ b/tests/scenario_stock_average_cost_price.rst
@@ -152,6 +152,13 @@ Check Cost Price Average is 175::
     >>> product.template.cost_price
     Decimal('175.0000')
 
+Change Cost Price to 125, to force to write recomputed price later::
+
+    >>> product.template.cost_price = Decimal('125.0000')
+    >>> product.template.save()
+    >>> product.template.cost_price
+    Decimal('125.0000')
+
 Recompute Cost Price::
 
     >>> recompute = Wizard('product.recompute_cost_price', [product])
diff --git a/tryton.cfg b/tryton.cfg
index 64ac800..4bb381e 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.0.4
+version=4.0.5
 depends:
     company
     currency
diff --git a/trytond_stock.egg-info/PKG-INFO b/trytond_stock.egg-info/PKG-INFO
index f8e9675..1725d5e 100644
--- a/trytond_stock.egg-info/PKG-INFO
+++ b/trytond_stock.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock
-Version: 4.0.4
+Version: 4.0.5
 Summary: Tryton module for stock and inventory
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-stock



More information about the tryton-debian-vcs mailing list