From 2c2ba48a0f01549f0273a8bd0118bd8778b8f20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 24 Oct 2011 16:57:09 +0200 Subject: [PATCH 01/28] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 7df606a593..51239e57aa 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -8,7 +8,7 @@ 'name_es_ES': 'Facturación', 'name_fr_FR': 'Facturation', 'name_nl_NL': 'Facturatie', - 'version': '2.2.0', + 'version': '2.2.1', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 43a54549dcbb05fa532fa860ab6f81ed3411f7a4 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Wed, 16 Nov 2011 14:05:21 +0100 Subject: [PATCH 02/28] Fix sequence of arguments in UPDATE clause in migration of binary fields issue2289 (transplanted from 11c60ecc61f2ba87668bb0cc09bbe57fbb775499) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index e09463bceb..6bf9b96ff6 100644 --- a/invoice.py +++ b/invoice.py @@ -197,7 +197,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): report = base64.decodestring(report) cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' - 'WHERE id = %s', (invoice_id, report)) + 'WHERE id = %s', (report, invoice_id)) table.drop_column('invoice_report') # Add index on create_date From 4bbeff828237822abacdcac891d0cb7be3fa2b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 21 Nov 2011 22:12:28 +0100 Subject: [PATCH 03/28] base64.decodestring doesn't support buffer issue2295 review181002 (transplanted from d1efc72e22f98ad9dd5779dcba19c9303be79c2d) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 6bf9b96ff6..b2ca76c78b 100644 --- a/invoice.py +++ b/invoice.py @@ -194,7 +194,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): 'FROM "' + self._table + '"') for invoice_id, report in cursor.fetchall(): if report: - report = base64.decodestring(report) + report = base64.decodestring(str(report)) cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' 'WHERE id = %s', (report, invoice_id)) From 8969d0096b5176f0c76e871498c8c4095b93d899 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Thu, 22 Dec 2011 12:15:03 +0100 Subject: [PATCH 04/28] Format report field to buffer type for migration issue2354 review213002 (transplanted from ef2a34af9ce821f902af11dc81c6300ed5d69a5f) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index b2ca76c78b..4c20569679 100644 --- a/invoice.py +++ b/invoice.py @@ -194,7 +194,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): 'FROM "' + self._table + '"') for invoice_id, report in cursor.fetchall(): if report: - report = base64.decodestring(str(report)) + report = buffer(base64.decodestring(str(report))) cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' 'WHERE id = %s', (report, invoice_id)) From 001b657edb5c624673c1a33aefa2d2fd451c1715 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:40:03 +0100 Subject: [PATCH 05/28] Prepare release 2.2.1 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index b544576454..a86d3b4ba5 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 1a0c42d662b778a331e24fb0508c6ceaa6047ccd Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:40:03 +0100 Subject: [PATCH 06/28] Added tag 2.2.1 for changeset 118a8d0bf900 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index af7d1c6397..13476113ec 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,4 @@ c43494eaf7ebf40f510e86f86f67098fd2ae8469 1.6.0 070dc16e361191655000713e404119b6f3faa518 1.8.0 2589c884dba43447ce45d446276678b5e6d29163 2.0.0 00f202fac008b526ed3b96407e364843d9671bbf 2.2.0 +118a8d0bf900d0e596006e0e16cf6ad9455d8a21 2.2.1 From 41e94df39ee41671966fea498b21939070fb3f0b Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:40:10 +0100 Subject: [PATCH 07/28] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 51239e57aa..1d86fb5596 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -8,7 +8,7 @@ 'name_es_ES': 'Facturación', 'name_fr_FR': 'Facturation', 'name_nl_NL': 'Facturatie', - 'version': '2.2.1', + 'version': '2.2.2', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 73c40c41a72020b3f440adc1083d4dd2bc00928b Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Mon, 26 Dec 2011 16:28:02 +0100 Subject: [PATCH 08/28] Drop column after migration issue2362 review210004 (transplanted from 7137f7bae5a9c4af9c98018c1f615976b98b8cee) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 4c20569679..ca5100523e 100644 --- a/invoice.py +++ b/invoice.py @@ -198,7 +198,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' 'WHERE id = %s', (report, invoice_id)) - table.drop_column('invoice_report') + table.drop_column('invoice_report') # Add index on create_date table.index_action('create_date', action='add') From 7d5e88f0640a3b7eb9c4dd22be1c23e4b3808cd5 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Tue, 27 Dec 2011 14:12:23 +0100 Subject: [PATCH 09/28] Migrate invoice reports in chunks limited by cursor.IN_MAX issue2360 review207002 (transplanted from fe2e00983afad9d51e35e142544cafe527bea251) --- invoice.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/invoice.py b/invoice.py index ca5100523e..f942cc8cf0 100644 --- a/invoice.py +++ b/invoice.py @@ -190,14 +190,22 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): if (table.column_exist('invoice_report') and table.column_exist('invoice_report_cache')): - cursor.execute('SELECT id, invoice_report ' + limit = cursor.IN_MAX + cursor.execute('SELECT COUNT(id) ' 'FROM "' + self._table + '"') - for invoice_id, report in cursor.fetchall(): - if report: - report = buffer(base64.decodestring(str(report))) - cursor.execute('UPDATE "' + self._table + '" ' - 'SET invoice_report_cache = %s ' - 'WHERE id = %s', (report, invoice_id)) + invoice_count, = cursor.fetchone() + for offset in range(0, invoice_count, limit): + cursor.execute(cursor.limit_clause( + 'SELECT id, invoice_report ' + 'FROM "' + self._table + '"' + 'ORDER BY id', + limit, offset)) + for invoice_id, report in cursor.fetchall(): + if report: + report = buffer(base64.decodestring(str(report))) + cursor.execute('UPDATE "' + self._table + '" ' + 'SET invoice_report_cache = %s ' + 'WHERE id = %s', (report, invoice_id)) table.drop_column('invoice_report') # Add index on create_date From fd2a56d4f6919156230fc8caea0b9d5b58398ff5 Mon Sep 17 00:00:00 2001 From: Robin Baumgartner Date: Mon, 9 Jan 2012 08:38:50 +0100 Subject: [PATCH 10/28] Check the right account in the journal when paying in_invoices issue2376 review218001 (transplanted from 512c5206e1642fc0fac1077f91d663b47b4bcfcb) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index f942cc8cf0..865ee16e6c 100644 --- a/invoice.py +++ b/invoice.py @@ -1143,7 +1143,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): 'amount_second_currency': amount_second_currency, 'second_currency': second_currency, }) - if invoice.account.id == journal.debit_account.id: + if invoice.account.id == journal.credit_account.id: self.raise_user_error('same_credit_account') if not journal.credit_account: self.raise_user_error('missing_credit_account') From 6c36d5a37b3d232b0e88b6aafa831dbb54ec43df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Apr 2012 13:21:47 +0200 Subject: [PATCH 11/28] Use default values when adding a record via on_change review321002 (transplanted from 5aed7d67f16d93bbaec69b8dd4ca3ca14b94ff6e) --- invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 865ee16e6c..bb3dacbbbd 100644 --- a/invoice.py +++ b/invoice.py @@ -459,7 +459,9 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): if key not in tax_keys: res['tax_amount'] += computed_taxes[key]['amount'] res['taxes'].setdefault('add', []) - res['taxes']['add'].append(computed_taxes[key]) + value = tax_obj.default_get(tax_obj._columns.keys()) + value.update(computed_taxes[key]) + res['taxes']['add'].append(value) if currency: res['untaxed_amount'] = currency_obj.round(currency, res['untaxed_amount']) From 10525f2dbb5e57513e93168976b5df64574a4f1b Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:28 +0200 Subject: [PATCH 12/28] Prepare release 2.2.2 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a86d3b4ba5..c865b2f147 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.2.2 - 2012-05-07 +* 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 a9feb419c1..83c0f58495 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,6 +1,6 @@ -Copyright (C) 2008-2011 Cédric Krier. +Copyright (C) 2008-2012 Cédric Krier. Copyright (C) 2008-2011 Bertrand Chenal. -Copyright (C) 2008-2011 B2CK SPRL. +Copyright (C) 2008-2012 B2CK SPRL. Copyright (C) 2004-2008 Tiny SPRL. This program is free software: you can redistribute it and/or modify From 1d07db27613c98608be6e53e5584f6a900d0e531 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:29 +0200 Subject: [PATCH 13/28] Added tag 2.2.2 for changeset 659e8b38cbed --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 13476113ec..d6e58c0860 100644 --- a/.hgtags +++ b/.hgtags @@ -6,3 +6,4 @@ c43494eaf7ebf40f510e86f86f67098fd2ae8469 1.6.0 2589c884dba43447ce45d446276678b5e6d29163 2.0.0 00f202fac008b526ed3b96407e364843d9671bbf 2.2.0 118a8d0bf900d0e596006e0e16cf6ad9455d8a21 2.2.1 +659e8b38cbedfd437de7cab8f7f79852567c10dd 2.2.2 From 40ce44222f455a556c7ebcd2c8d56caea51a0afe Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:36 +0200 Subject: [PATCH 14/28] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 1d86fb5596..90c134e297 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -8,7 +8,7 @@ 'name_es_ES': 'Facturación', 'name_fr_FR': 'Facturation', 'name_nl_NL': 'Facturatie', - 'version': '2.2.2', + 'version': '2.2.3', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 33c2d98ce05289b4c16409254305c5bb047ef52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 23 Feb 2013 17:40:40 +0100 Subject: [PATCH 15/28] Fix default value of account.invoice.tax review662003 (transplanted from 84191cf1b798e850171076caadc394e4549ad291) --- invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index bb3dacbbbd..a8bda5c5dd 100644 --- a/invoice.py +++ b/invoice.py @@ -384,6 +384,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): def _on_change_lines_taxes(self, vals): currency_obj = Pool().get('currency.currency') tax_obj = Pool().get('account.tax') + invoice_tax_obj = Pool().get('account.invoice.tax') res = { 'untaxed_amount': Decimal('0.0'), 'tax_amount': Decimal('0.0'), @@ -459,7 +460,8 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): if key not in tax_keys: res['tax_amount'] += computed_taxes[key]['amount'] res['taxes'].setdefault('add', []) - value = tax_obj.default_get(tax_obj._columns.keys()) + value = invoice_tax_obj.default_get( + invoice_tax_obj._columns.keys()) value.update(computed_taxes[key]) res['taxes']['add'].append(value) if currency: From c19f96b2b9fa5c66443b1cfe5c82464dabb162e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:59:18 +0200 Subject: [PATCH 16/28] Prepare release 2.2.3 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c865b2f147..49f0fb1169 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.2.3 - 2013-05-02 +* Bug fixes (see mercurial logs for details) + Version 2.2.2 - 2012-05-07 * Bug fixes (see mercurial logs for details) diff --git a/COPYRIGHT b/COPYRIGHT index 83c0f58495..244bb5d8dd 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,6 +1,6 @@ -Copyright (C) 2008-2012 Cédric Krier. +Copyright (C) 2008-2013 Cédric Krier. Copyright (C) 2008-2011 Bertrand Chenal. -Copyright (C) 2008-2012 B2CK SPRL. +Copyright (C) 2008-2013 B2CK SPRL. Copyright (C) 2004-2008 Tiny SPRL. This program is free software: you can redistribute it and/or modify From c0319f1fc44b52b2c5ae0233b8bad5ce322a284d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:59:19 +0200 Subject: [PATCH 17/28] Added tag 2.2.3 for changeset eda717e7470a --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d6e58c0860..ece116faf3 100644 --- a/.hgtags +++ b/.hgtags @@ -7,3 +7,4 @@ c43494eaf7ebf40f510e86f86f67098fd2ae8469 1.6.0 00f202fac008b526ed3b96407e364843d9671bbf 2.2.0 118a8d0bf900d0e596006e0e16cf6ad9455d8a21 2.2.1 659e8b38cbedfd437de7cab8f7f79852567c10dd 2.2.2 +eda717e7470aae174d54ffb6bd5dec63eafdd7eb 2.2.3 From 2ca6ef3f0668ceb0912f50bdc0e5317b6f884bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:59:29 +0200 Subject: [PATCH 18/28] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 90c134e297..41b080ecf1 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -8,7 +8,7 @@ 'name_es_ES': 'Facturación', 'name_fr_FR': 'Facturation', 'name_nl_NL': 'Facturatie', - 'version': '2.2.3', + 'version': '2.2.4', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From bc89a4932f0057bf4707ee3a7998ae46fdeaa8fc Mon Sep 17 00:00:00 2001 From: Guillem Barba Date: Mon, 30 Sep 2013 17:41:37 +0200 Subject: [PATCH 19/28] Fix domain concatenation between list and tuple issue3386 review1099002 (transplanted from dac8c752fd39ff10cc7885e3df8fd16be2f2b51a) --- invoice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index a8bda5c5dd..09667b5028 100644 --- a/invoice.py +++ b/invoice.py @@ -934,12 +934,12 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): def search_rec_name(self, name, clause): ids = self.search(['OR', - ('number',) + clause[1:], - ('reference',) + clause[1:], + ('number',) + tuple(clause[1:]), + ('reference',) + tuple(clause[1:]), ], order=[]) if ids: return [('id', 'in', ids)] - return [('party',) + clause[1:]] + return [('party',) + tuple(clause[1:])] def delete(self, ids): if not ids: From 7f8b9fd88f42f8ad525bbf1a67152be46c5c5525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Dec 2013 18:38:05 +0100 Subject: [PATCH 20/28] Prepare release 2.2.4 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 49f0fb1169..1abe14db90 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.2.4 - 2013-12-04 +* Bug fixes (see mercurial logs for details) + Version 2.2.3 - 2013-05-02 * Bug fixes (see mercurial logs for details) From f227b343edafdbf3e4aea9a25c555cff901177b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Dec 2013 18:38:05 +0100 Subject: [PATCH 21/28] Added tag 2.2.4 for changeset ff618cb0b232 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ece116faf3..8002378243 100644 --- a/.hgtags +++ b/.hgtags @@ -8,3 +8,4 @@ c43494eaf7ebf40f510e86f86f67098fd2ae8469 1.6.0 118a8d0bf900d0e596006e0e16cf6ad9455d8a21 2.2.1 659e8b38cbedfd437de7cab8f7f79852567c10dd 2.2.2 eda717e7470aae174d54ffb6bd5dec63eafdd7eb 2.2.3 +ff618cb0b23282c97758557b030d0c5d9c3ae658 2.2.4 From cf5cbefed3c916fc664240280e4fe645a55f7ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Dec 2013 18:38:18 +0100 Subject: [PATCH 22/28] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 41b080ecf1..877f584124 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -8,7 +8,7 @@ 'name_es_ES': 'Facturación', 'name_fr_FR': 'Facturation', 'name_nl_NL': 'Facturatie', - 'version': '2.2.4', + 'version': '2.2.5', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From ac03a52308bfe5d9d2bb13914a6a485d5c14d460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 28 Nov 2013 23:09:22 +0100 Subject: [PATCH 23/28] Store report cache using buffer SQLite doesn't detect the binary even if stored in BLOB if the type is not buffer. issue2704 review1941002 (transplanted from 3b77f743131cb946fbecd50bc49cb418c67d584e) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 09667b5028..fa250b856a 100644 --- a/invoice.py +++ b/invoice.py @@ -2192,7 +2192,7 @@ class InvoiceReport(Report): if invoice.state in ('open', 'paid'): invoice_obj.write(invoice.id, { 'invoice_report_format': res[0], - 'invoice_report_cache': res[1], + 'invoice_report_cache': buffer(res[1]), }) return res From d021a628cfec44184af18352ead367338a1a1a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 18 Jan 2014 20:58:40 +0100 Subject: [PATCH 24/28] Prepare release 2.2.5 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 1abe14db90..599c59c02c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.2.5 - 2014-01-18 +* Bug fixes (see mercurial logs for details) + Version 2.2.4 - 2013-12-04 * Bug fixes (see mercurial logs for details) From 37704c1d76a2f82c9c788c897606d2417a346db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 18 Jan 2014 20:58:42 +0100 Subject: [PATCH 25/28] Added tag 2.2.5 for changeset 4a158499bdb1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8002378243..2b676083d0 100644 --- a/.hgtags +++ b/.hgtags @@ -9,3 +9,4 @@ c43494eaf7ebf40f510e86f86f67098fd2ae8469 1.6.0 659e8b38cbedfd437de7cab8f7f79852567c10dd 2.2.2 eda717e7470aae174d54ffb6bd5dec63eafdd7eb 2.2.3 ff618cb0b23282c97758557b030d0c5d9c3ae658 2.2.4 +4a158499bdb10ee311e1e679014f7fb8c38319a7 2.2.5 From dfefebd6c862717f23ebd3f2878f59b4d37601e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 18 Jan 2014 20:58:54 +0100 Subject: [PATCH 26/28] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 877f584124..d83d030576 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -8,7 +8,7 @@ 'name_es_ES': 'Facturación', 'name_fr_FR': 'Facturation', 'name_nl_NL': 'Facturatie', - 'version': '2.2.5', + 'version': '2.2.6', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 29ce13f47f6acfaa08ef69577421145d7efd0a35 Mon Sep 17 00:00:00 2001 From: Eduardo Ruiz Date: Thu, 23 Jan 2014 11:26:25 +0100 Subject: [PATCH 27/28] Add missing 'invoice_type' to on_change of product invoice_type is used in the on_change method of product. issue3586 review2731002 (transplanted from 65bde6c273e26f8eb6cd7c5bff9ee5dab7ae7502) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index fa250b856a..7216a58de7 100644 --- a/invoice.py +++ b/invoice.py @@ -1366,7 +1366,7 @@ class InvoiceLine(ModelSQL, ModelView): on_change=['product', 'unit', 'quantity', 'description', '_parent_invoice.type', '_parent_invoice.party', '_parent_invoice.currency', '_parent_invoice.currency_date', - 'party', 'currency', 'invoice'], + 'party', 'currency', 'invoice', 'invoice_type'], depends=['type']) account = fields.Many2One('account.account', 'Account', domain=[ From d5a8cfb0a374a3b1090ebd0825708d2db49048ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Feb 2014 22:28:29 +0100 Subject: [PATCH 28/28] Fix computation of second currency amount issue3664 review3351002 (transplanted from b81862858d215919a2c3355d4075c656e5ed516b) --- invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index 7216a58de7..15f651ec50 100644 --- a/invoice.py +++ b/invoice.py @@ -862,11 +862,11 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): remainder_total_currency = total_currency for date, amount in term_lines: val = self._get_move_line(invoice, date, amount) - remainder_total_currency -= val['amount_second_currency'] + remainder_total_currency += val['amount_second_currency'] move_lines.append(val) if not currency_obj.is_zero(invoice.currency, remainder_total_currency): - move_lines[-1]['amount_second_currency'] += remainder_total_currency + move_lines[-1]['amount_second_currency'] -= remainder_total_currency accounting_date = invoice.accounting_date or invoice.invoice_date period_id = period_obj.find(invoice.company.id, date=accounting_date)