[tryton-debian-vcs] tryton-modules-stock-supply branch debian-stretch-3.8 updated. debian/3.8.1-1-3-ge9ec189

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Jul 12 13:06:33 UTC 2016


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

commit e9ec1899a8bceeb660a06d90570fdd1470721a60
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Jul 11 20:23:16 2016 +0200

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

diff --git a/debian/changelog b/debian/changelog
index 1c6f703..6e506a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-stock-supply (3.8.2-1) unstable; urgency=medium
+
+  * Setting the branch in the watch file to the fixed version 3.8.
+  * Merging upstream version 3.8.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 11 Jul 2016 20:23:16 +0200
+
 tryton-modules-stock-supply (3.8.1-1) unstable; urgency=medium
 
   * Updating signing-key.asc with the actual upstream maintainer keys.
commit f13d43080708704d9022e13d749a5dbae3545095
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Mon Jul 11 20:23:16 2016 +0200

    Merging upstream version 3.8.2.

diff --git a/CHANGELOG b/CHANGELOG
index d4892ef..ca7682c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.2 - 2016-07-04
+* Bug fixes (see mercurial logs for details)
+
 Version 3.8.1 - 2016-04-06
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index fc7adc2..7d9dc3f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock_supply
-Version: 3.8.1
+Version: 3.8.2
 Summary: Tryton module for stock supply
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/location.py b/location.py
index b5a3830..2fd4da6 100644
--- a/location.py
+++ b/location.py
@@ -19,7 +19,7 @@ class Location:
             'readonly': ~Eval('active'),
             },
         domain=[
-            ('type', '=', 'storage'),
+            ('type', 'in', ['storage', 'view']),
             ],
         depends=['type', 'active'],
         help='Leave empty for no default provisioning')
diff --git a/order_point.py b/order_point.py
index a5f9dd9..b6483b6 100644
--- a/order_point.py
+++ b/order_point.py
@@ -45,7 +45,7 @@ class OrderPoint(ModelSQL, ModelView):
             'get_location', searcher='search_location')
     provisioning_location = fields.Many2One(
         'stock.location', 'Provisioning Location',
-        domain=[('type', '=', 'storage')],
+        domain=[('type', 'in', ['storage', 'view'])],
         states={
             'invisible': Not(Equal(Eval('type'), 'internal')),
             'required': Equal(Eval('type'), 'internal'),
diff --git a/purchase_request.py b/purchase_request.py
index 4e0eea6..f6d1c0a 100644
--- a/purchase_request.py
+++ b/purchase_request.py
@@ -7,6 +7,7 @@ from sql.conditionals import Case
 from itertools import groupby
 from functools import partial
 from decimal import Decimal
+from collections import defaultdict
 
 from trytond import backend
 from trytond.model import ModelView, ModelSQL, fields
@@ -263,8 +264,9 @@ class PurchaseRequest(ModelSQL, ModelView):
                     pbl = Product.products_by_location(warehouse_ids,
                         product_ids, with_childs=True)
                 for warehouse_id in warehouse_ids:
-                    min_date_qties = dict((x, pbl.pop((warehouse_id, x), 0))
-                        for x in product_ids)
+                    min_date_qties = defaultdict(lambda: 0,
+                        ((x, pbl.pop((warehouse_id, x), 0))
+                            for x in product_ids))
                     # Search for shortage between min-max
                     shortages = cls.get_shortage(warehouse_id, product_ids,
                         min_date, max_date, min_date_qties=min_date_qties,
@@ -322,8 +324,8 @@ class PurchaseRequest(ModelSQL, ModelView):
         for request in requests:
             pline = request.purchase_line
             # Skip incoherent request
-            if request.product.id != pline.product.id or \
-                    request.warehouse.id != pline.purchase.warehouse.id:
+            if (request.product != pline.product
+                    or request.warehouse != pline.purchase.warehouse):
                 continue
             # Take smallest amount between request and purchase line
             pline_qty = Uom.compute_qty(pline.unit, pline.quantity,
diff --git a/tryton.cfg b/tryton.cfg
index bd5ce03..3673306 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.8.1
+version=3.8.2
 depends:
     account
     ir
diff --git a/trytond_stock_supply.egg-info/PKG-INFO b/trytond_stock_supply.egg-info/PKG-INFO
index d3f769c..a47e4ec 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: 3.8.1
+Version: 3.8.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