[tryton-debian-vcs] tryton-modules-account branch debian updated. debian/4.0.1-1-3-gf4791af

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Mon Aug 8 09:27:53 UTC 2016


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

commit f4791af74f961b281cc362b3b79df01612f55066
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri Aug 5 11:37:10 2016 +0200

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

diff --git a/debian/changelog b/debian/changelog
index ff3091f..306b14d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-account (4.0.2-1) unstable; urgency=medium
+
+  * Updating to Standards-Version: 3.9.8, no changes needed.
+  * Merging upstream version 4.0.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Fri, 05 Aug 2016 11:37:10 +0200
+
 tryton-modules-account (4.0.1-1) unstable; urgency=medium
 
   * Updating signing-key.asc with the actual upstream maintainer keys.
commit 7a74ba6f271611394fa8d35333e737502ad24dd2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri Aug 5 11:37:09 2016 +0200

    Merging upstream version 4.0.2.

diff --git a/CHANGELOG b/CHANGELOG
index 1b9a027..c90bb78 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.2 - 2016-08-02
+* Bug fixes (see mercurial logs for details)
+
 Version 4.0.1 - 2016-05-11
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 7c475a0..2c105db 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account
-Version: 4.0.1
+Version: 4.0.2
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/tax.py b/tax.py
index 4c0f1f7..ccdd520 100644
--- a/tax.py
+++ b/tax.py
@@ -877,7 +877,9 @@ class Tax(ModelSQL, ModelView):
         '''
         Return a list of taxes sorted
         '''
-        return sorted(taxes, key=lambda t: (t.sequence, t.id), reverse=reverse)
+        def key(tax):
+            return 0 if tax.sequence is None else 1, tax.sequence or 0, tax.id
+        return sorted(taxes, key=key, reverse=reverse)
 
     @classmethod
     def compute(cls, taxes, price_unit, quantity, date=None):
diff --git a/tests/test_account.py b/tests/test_account.py
index 4dd765e..b0aef15 100644
--- a/tests/test_account.py
+++ b/tests/test_account.py
@@ -803,6 +803,18 @@ class AccountTestCase(ModuleTestCase):
             self.assertEqual(party.payable, Decimal('90'))
             self.assertEqual(party.payable_today, Decimal('30'))
 
+    @with_transaction()
+    def test_sort_taxes(self):
+        "Test sort_taxes"
+        pool = Pool()
+        Tax = pool.get('account.tax')
+
+        tax1 = Tax(sequence=None, id=-3)
+        tax2 = Tax(sequence=None, id=-2)
+        tax3 = Tax(sequence=1, id=-1)
+        self.assertSequenceEqual(
+            Tax.sort_taxes([tax3, tax2, tax1]), [tax1, tax2, tax3])
+
 
 def suite():
     suite = trytond.tests.test_tryton.suite()
diff --git a/tryton.cfg b/tryton.cfg
index 26412d8..296965c 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.0.1
+version=4.0.2
 depends:
     company
     currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index 1b47489..cf520d9 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account
-Version: 4.0.1
+Version: 4.0.2
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-account



More information about the tryton-debian-vcs mailing list