[tryton-debian-vcs] tryton-modules-stock-supply branch upstream updated. upstream/4.4.1-1-g92bd397

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Oct 5 12:28:34 UTC 2017


The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-stock-supply.git;a=commitdiff;h=upstream/4.4.1-1-g92bd397

commit 92bd397d5e6862e4546e6450efc45285afc297af
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Oct 5 11:42:52 2017 +0200

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

diff --git a/CHANGELOG b/CHANGELOG
index 058cab4..13e2a78 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.4.2 - 2017-10-04
+* Bug fixes (see mercurial logs for details)
+
 Version 4.4.1 - 2017-08-08
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 8efc6bf..7e6802b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock_supply
-Version: 4.4.1
+Version: 4.4.2
 Summary: Tryton module for stock supply
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/purchase_request.py b/purchase_request.py
index 8d15bfc..ef8df9a 100644
--- a/purchase_request.py
+++ b/purchase_request.py
@@ -270,10 +270,12 @@ class PurchaseRequest:
         supplier, purchase_date = cls.find_best_supplier(product,
             shortage_date)
 
+        uom = product.purchase_uom or product.default_uom
         target_quantity = order_point.target_quantity if order_point else 0.0
         computed_quantity = target_quantity - product_quantity
-        quantity = Uom.compute_qty(product.default_uom, computed_quantity,
-            product.purchase_uom or product.default_uom)
+        product_quantity = uom.round(product_quantity)
+        quantity = Uom.compute_qty(
+            product.default_uom, computed_quantity, uom)
 
         if order_point:
             origin = 'stock.order_point,%s' % order_point.id
@@ -282,7 +284,7 @@ class PurchaseRequest:
         return Request(product=product,
             party=supplier and supplier or None,
             quantity=quantity,
-            uom=product.purchase_uom or product.default_uom,
+            uom=uom,
             computed_quantity=computed_quantity,
             computed_uom=product.default_uom,
             purchase_date=purchase_date,
diff --git a/tryton.cfg b/tryton.cfg
index 6647016..98c9abf 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.4.1
+version=4.4.2
 depends:
     account
     ir
diff --git a/trytond_stock_supply.egg-info/PKG-INFO b/trytond_stock_supply.egg-info/PKG-INFO
index e5754ce..3baab13 100644
--- a/trytond_stock_supply.egg-info/PKG-INFO
+++ b/trytond_stock_supply.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock-supply
-Version: 4.4.1
+Version: 4.4.2
 Summary: Tryton module for stock supply
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-stock-supply



More information about the tryton-debian-vcs mailing list