[tryton-debian-vcs] tryton-modules-stock-supply-day branch debian-jessie-3.4 updated. debian/3.4.1-1-7-g292e6cf

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Mar 15 20:38:04 UTC 2016


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

commit 292e6cff3afa147522dfd0541d47f40596b1114a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 15 20:38:00 2016 +0100

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

diff --git a/debian/changelog b/debian/changelog
index e36aa8e..bd25c13 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+tryton-modules-stock-supply-day (3.4.2-1) unstable; urgency=medium
+
+  * Improving boilerplate in d/control (Closes: #771722).
+  * Wrapping and sorting control files (wrap-and-sort -bts).
+  * Setting the branch in the watch file to the fixed version 3.4.
+  * Updating signing-key.asc with the actual upstream maintainer keys.
+  * Merging upstream version 3.4.2.
+  * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Tue, 15 Mar 2016 20:38:00 +0100
+
 tryton-modules-stock-supply-day (3.4.1-1) unstable; urgency=medium
 
   * Adding actual upstream signing key.
commit 0690d814f2665ebe4210cc9c29149a0300515afe
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 15 20:38:00 2016 +0100

    Updating copyright file.

diff --git a/debian/copyright b/debian/copyright
index b630ea5..1113fb0 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,9 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2008-2015 Cédric Krier
+Copyright: 2008-2016 Cédric Krier
            2008-2012 Bertrand Chenal
-           2008-2015 B2CK SPRL
+           2008-2016 B2CK SPRL
 License: GPL-3+
 
 Files: debian/*
commit ef6c5431c53d88f10eff000fc6635c584cbdf45e
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Mar 15 20:38:00 2016 +0100

    Merging upstream version 3.4.2.

diff --git a/CHANGELOG b/CHANGELOG
index 07a5be1..dc3153e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.4.2 - 2016-03-14
+* 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 34d4187..808b71b 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2015 Cédric Krier.
+Copyright (C) 2008-2016 Cédric Krier.
 Copyright (C) 2008-2012 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 fd385c0..8f8fd5d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_stock_supply_day
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module to add supply weekdays
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/purchase.py b/purchase.py
index 8db0725..ec11fdf 100644
--- a/purchase.py
+++ b/purchase.py
@@ -16,16 +16,17 @@ class ProductSupplier:
     def compute_supply_date(self, date=None):
         date = super(ProductSupplier, self).compute_supply_date(date=date)
         earlier_date = None
-        for day in self.weekdays:
-            weekday = int(day.weekday)
-            diff = weekday - date.weekday()
-            if diff < 0:
-                diff += 7
-            new_date = date + datetime.timedelta(diff)
+        if date != datetime.date.max:
+            for day in self.weekdays:
+                weekday = int(day.weekday)
+                diff = weekday - date.weekday()
+                if diff < 0:
+                    diff += 7
+                new_date = date + datetime.timedelta(diff)
 
-            if earlier_date and earlier_date <= new_date:
-                continue
-            earlier_date = new_date
+                if earlier_date and earlier_date <= new_date:
+                    continue
+                earlier_date = new_date
         return earlier_date or date
 
     def compute_purchase_date(self, date):
diff --git a/tests/test_stock_supply_day.py b/tests/test_stock_supply_day.py
index 36d0963..010d748 100644
--- a/tests/test_stock_supply_day.py
+++ b/tests/test_stock_supply_day.py
@@ -49,6 +49,7 @@ class StockSupplyDayTestCase(unittest.TestCase):
             (datetime.date(2011, 12, 22), 12, 6, datetime.date(2012, 1, 8)),
             (datetime.date(2011, 11, 21), 10, None,
                 datetime.date(2011, 12, 1)),
+            (datetime.date(2011, 11, 21), None, 0, datetime.date.max),
             ]
             # Purchase date is Monday, 2011-11-21, the regular days to deliver
             # is 10 days, which would be Wednesday 2011-12-01. But with the
diff --git a/tryton.cfg b/tryton.cfg
index 7ed80fc..e14f76c 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.4.2
 depends:
     ir
     purchase
diff --git a/trytond_stock_supply_day.egg-info/PKG-INFO b/trytond_stock_supply_day.egg-info/PKG-INFO
index afe841b..cd69a23 100644
--- a/trytond_stock_supply_day.egg-info/PKG-INFO
+++ b/trytond_stock_supply_day.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-stock-supply-day
-Version: 3.4.1
+Version: 3.4.2
 Summary: Tryton module to add supply weekdays
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-stock-supply-day



More information about the tryton-debian-vcs mailing list