[tryton-debian-vcs] tryton-modules-stock-supply branch upstream-3.4 updated. upstream/3.4.1-1-ge9d4751

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


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

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

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

diff --git a/CHANGELOG b/CHANGELOG
index abf7a23..9f123a2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.2 - 2016-07-04
+* Bug fixes (see mercurial logs for details)
+
 Version 3.4.1 - 2015-02-17
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index d66ec79..582a93b 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
 Copyright (C) 2013-2014 NaN-tic.
-Copyright (C) 2008-2015 Cédric Krier.
+Copyright (C) 2008-2016 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2015 B2CK SPRL.
+Copyright (C) 2008-2016 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index bfec9a4..dd6b493 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock_supply
-Version: 3.4.1
+Version: 3.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 2da0fb0..f2a4ef6 100644
--- a/purchase_request.py
+++ b/purchase_request.py
@@ -5,6 +5,7 @@ import operator
 from itertools import groupby
 from functools import partial
 from decimal import Decimal
+from collections import defaultdict
 from trytond.model import ModelView, ModelSQL, fields
 from trytond.wizard import Wizard, StateView, StateAction, StateTransition, \
     Button
@@ -211,8 +212,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,
@@ -270,8 +272,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
             req_qty = Uom.compute_qty(request.uom, request.quantity,
diff --git a/tryton.cfg b/tryton.cfg
index ca1157f..ce3a872 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.4.2
 depends:
     account
     ir
diff --git a/trytond_stock_supply.egg-info/PKG-INFO b/trytond_stock_supply.egg-info/PKG-INFO
index 3d7412c..b97c569 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.4.1
+Version: 3.4.2
 Summary: Tryton module for stock supply
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_stock_supply.egg-info/requires.txt b/trytond_stock_supply.egg-info/requires.txt
index 2653bd9..d9eea9b 100644
--- a/trytond_stock_supply.egg-info/requires.txt
+++ b/trytond_stock_supply.egg-info/requires.txt
@@ -4,4 +4,4 @@ trytond_party >= 3.4, < 3.5
 trytond_product >= 3.4, < 3.5
 trytond_purchase >= 3.4, < 3.5
 trytond_stock >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+trytond >= 3.4, < 3.5
-- 
tryton-modules-stock-supply



More information about the tryton-debian-vcs mailing list