From a127d7f00c3aa7c1ae450b66ec7a2c5cd6188187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 24 Oct 2011 20:15:28 +0200 Subject: [PATCH 01/10] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index d9c37bbbd7..60d2a5a81c 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -7,7 +7,7 @@ 'name_es_CO': 'Moneda', 'name_es_ES': 'Divisa', 'name_fr_FR': 'Devise', - 'version': '2.2.0', + 'version': '2.2.1', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From e92cd6a177ce7366dd7cebe38774e71b0f767ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 28 Nov 2011 14:45:33 +0100 Subject: [PATCH 02/10] Fix Transaction.start to use keyword argument for context (transplanted from e8abdfe03b0d0d90c021e043eaa642c59fbe6fc9) --- tests/test_currency.py | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/tests/test_currency.py b/tests/test_currency.py index def64516cf..71f5385244 100644 --- a/tests/test_currency.py +++ b/tests/test_currency.py @@ -48,7 +48,8 @@ class CurrencyTestCase(unittest.TestCase): Create currencies ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: cu1_id = self.currency.create({ 'name': 'cu1', 'symbol': 'cu1', @@ -69,7 +70,7 @@ class CurrencyTestCase(unittest.TestCase): ''' Check grouping ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): cu1_id = self.get_currency('cu1') self.assertRaises(Exception, self.currency.write, cu1_id, @@ -88,7 +89,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Create rates. ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: cu1_id = self.get_currency('cu1') cu2_id = self.get_currency('cu2') @@ -114,7 +116,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Rate unicity ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: today = self.date.today() cu_id = self.currency.create({ @@ -141,7 +144,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Simple conversion ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: cu1_id = self.get_currency('cu1') cu2_id = self.get_currency('cu2') @@ -157,7 +161,7 @@ class CurrencyTestCase(unittest.TestCase): ''' Conversion with rounding on non-finite decimal representation ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): cu1_id = self.get_currency('cu1') cu2_id = self.get_currency('cu2') @@ -171,7 +175,7 @@ class CurrencyTestCase(unittest.TestCase): ''' Same without rounding ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): cu1_id = self.get_currency('cu1') cu2_id = self.get_currency('cu2') @@ -185,7 +189,7 @@ class CurrencyTestCase(unittest.TestCase): ''' Conversion to the same currency ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): cu1_id = self.get_currency('cu1') amount = Decimal("10") @@ -197,7 +201,7 @@ class CurrencyTestCase(unittest.TestCase): ''' Conversion with zero amount ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, context=CONTEXT): cu1_id = self.get_currency('cu1') cu2_id = self.get_currency('cu2') @@ -211,7 +215,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Conversion with zero rate ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: cu1_id = self.get_currency('cu1') cu2_id = self.get_currency('cu2') @@ -233,7 +238,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Conversion with missing rate ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: cu1_id = self.get_currency('cu1') cu3_id = self.currency.create({ 'name': 'cu3', @@ -253,7 +259,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Conversion with both missing rate ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: cu3_id = self.currency.create({ 'name': 'cu3', 'symbol': 'cu3', @@ -275,7 +282,8 @@ class CurrencyTestCase(unittest.TestCase): ''' Test deletion of currency deletes rates ''' - with Transaction().start(DB_NAME, USER, CONTEXT) as transaction: + with Transaction().start(DB_NAME, USER, + context=CONTEXT) as transaction: codes = ['cu%s' % (i + 1) for i in range(2)] currency_ids = [self.get_currency(i) for i in codes] self.currency.delete(currency_ids) From 4c47bd5085bda9117684eab482be5e0a7eb4b70e Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:40:26 +0100 Subject: [PATCH 03/10] Prepare release 2.2.1 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7edb33b80d..78397d8b5d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.2.1 - 2011-12-26 +* Bug fixes (see mercurial logs for details) + Version 2.2.0 - 2011-10-24 * Bug fixes (see mercurial logs for details) From 752ffe48de3969133140b2dae2be7886f44ae417 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:40:26 +0100 Subject: [PATCH 04/10] Added tag 2.2.1 for changeset 73ca12cba399 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fdf51b2d49..35fcaf6a8b 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,4 @@ c1f124674fbc1c5e6555c12dadf3ac5e751a5d62 1.4.0 35322c65837422ed3c108b002502c28067817246 1.8.0 ed5c39f1c94205aaea8803f634ae848f4328bf4e 2.0.0 b6e2bab62e6e99a16a6137e280c05cf090aecc27 2.2.0 +73ca12cba399ed2ba261f9be21d023598b196d1f 2.2.1 From 76531bc5e125b89041a9acb49af8e83b79152678 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:40:36 +0100 Subject: [PATCH 05/10] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 60d2a5a81c..b214cd4742 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -7,7 +7,7 @@ 'name_es_CO': 'Moneda', 'name_es_ES': 'Divisa', 'name_fr_FR': 'Devise', - 'version': '2.2.1', + 'version': '2.2.2', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From da608f655b68c2ac592df683b9ffaf5a7e0e6275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 29 Jul 2013 10:31:28 +0200 Subject: [PATCH 06/10] get_rate must always return a Decimal or int as value issue3311 review987002 (transplanted from c816c3b544a82bfa339d93f6e41d5e6e35e084bb) --- currency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/currency.py b/currency.py index dda2b52531..eb46ac7ad3 100644 --- a/currency.py +++ b/currency.py @@ -150,7 +150,7 @@ class Currency(ModelSQL, ModelView): if rate_ids: res[currency_id] = rate_ids[0] else: - res[currency_id] = 0.0 + res[currency_id] = 0 rate_ids = [x for x in res.values() if x] rates = rate_obj.browse(rate_ids) id2rate = {} From bd95968986613851a08ab9e24a1ae9492ff0722a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 8 Aug 2013 01:45:17 +0200 Subject: [PATCH 07/10] Fix domain concatenation between list and tuple (transplanted from 5c429f621acd3697ac967bf783867cf0dc28553e) --- currency.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/currency.py b/currency.py index eb46ac7ad3..95882b64b7 100644 --- a/currency.py +++ b/currency.py @@ -114,12 +114,12 @@ class Currency(ModelSQL, ModelView): ids = [] field = None for field in ('code', 'numeric_code'): - ids = self.search([(field,) + clause[1:]], limit=1) + ids = self.search([(field,) + tuple(clause[1:])], limit=1) if ids: break if ids: - return [(field,) + clause[1:]] - return [(self._rec_name,) + clause[1:]] + return [(field,) + tuple(clause[1:])] + return [(self._rec_name,) + tuple(clause[1:])] def on_change_with_rate(self, vals): now = datetime.date.today() From 41ede70e1cc883f5f63e917c1092af7b0f24f8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 1 Oct 2013 21:38:23 +0200 Subject: [PATCH 08/10] Prepare release 2.2.2 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 78397d8b5d..5ceafd2a88 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.2.2 - 2013-10-01 +* Bug fixes (see mercurial logs for details) + Version 2.2.1 - 2011-12-26 * Bug fixes (see mercurial logs for details) diff --git a/COPYRIGHT b/COPYRIGHT index 3d2324bfb3..da9ef80516 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,6 +1,6 @@ -Copyright (C) 2008-2011 Cédric Krier. +Copyright (C) 2008-2013 Cédric Krier. Copyright (C) 2008-2011 Bertrand Chenal. -Copyright (C) 2008-2011 B2CK SPRL. +Copyright (C) 2008-2013 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 From d1b37fdb0e98df1d228214234612ed2bb251d63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 1 Oct 2013 21:38:24 +0200 Subject: [PATCH 09/10] Added tag 2.2.2 for changeset 437e69240224 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 35fcaf6a8b..3f8d6ab12b 100644 --- a/.hgtags +++ b/.hgtags @@ -6,3 +6,4 @@ c1f124674fbc1c5e6555c12dadf3ac5e751a5d62 1.4.0 ed5c39f1c94205aaea8803f634ae848f4328bf4e 2.0.0 b6e2bab62e6e99a16a6137e280c05cf090aecc27 2.2.0 73ca12cba399ed2ba261f9be21d023598b196d1f 2.2.1 +437e69240224f819d1d1e745f749d75daf3858c6 2.2.2 From 6aae12b2d01aa89f375e7629292d1ff12cd686ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 1 Oct 2013 21:38:36 +0200 Subject: [PATCH 10/10] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index b214cd4742..bac89e78fc 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -7,7 +7,7 @@ 'name_es_CO': 'Moneda', 'name_es_ES': 'Divisa', 'name_fr_FR': 'Devise', - 'version': '2.2.2', + 'version': '2.2.3', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/',