From cba8ffe2495fbe0b4cc39c7a775e7707df744958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Nov 2010 13:42:41 +0100 Subject: [PATCH 01/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index c33e49edf4..13261e4112 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.0', + 'version': '1.8.1', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From b98fd648264b5b6599497d144e36954b88c6a21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 31 Dec 2010 12:37:06 +0100 Subject: [PATCH 02/41] Fix default taxes computation when tax doesn't have code for issue1788 (transplanted from 64a97ccad41557ec236588cf741ad59f091a8cc9) --- move.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/move.py b/move.py index d2101f550a..6246a3901f 100644 --- a/move.py +++ b/move.py @@ -614,13 +614,15 @@ class Line(ModelSQL, ModelView): for tax_line in line.tax_lines: taxes[(line.account.id, tax_line.code.id, tax_line.tax.id)] = True - if not line.tax_lines and line.account.taxes: - if line.account.id in no_code_taxes: - taxes[(line.account.id, False, False)] = True - else: - no_code_taxes.append(line.account.id) - elif not line.tax_lines: - taxes[(line.account.id, False, False)] = True + if not line.tax_lines: + no_code_taxes.append(line.account.id) + for no_code_account_id in no_code_taxes: + for (account_id, code_id, tax_id), test in \ + taxes.iteritems(): + if (not test + and not code_id + and no_code_account_id == account_id): + taxes[(account_id, code_id, tax_id)] = True if 'account' in fields: if total >= Decimal('0.0'): @@ -785,6 +787,8 @@ class Line(ModelSQL, ModelView): [x.id for x in account.taxes], debit or credit, 1): code_id = tax_line['tax'][key + '_base_code'].id + if not code_id: + continue tax_id = tax_line['tax'].id base_amounts.setdefault((code_id, tax_id), Decimal('0.0')) base_amounts[code_id, tax_id] += tax_line['base'] * \ From 516c6d47cd59964d20120cea4072dc0b52ca37df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 31 Dec 2010 12:41:01 +0100 Subject: [PATCH 03/41] Prevent overlapping of periods in aged balance for issue1764 (transplanted from 14828419189f9c6035ab12253f523046f615c284) --- account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account.py b/account.py index be69730e1b..f78b9b0b76 100644 --- a/account.py +++ b/account.py @@ -2241,7 +2241,7 @@ class AgedBalance(Report): datetime.timedelta(days=term*coef),) else: term_query = '(l.maturity_date <= %s '\ - 'AND l.maturity_date >= %s) ' + 'AND l.maturity_date > %s) ' term_args = ( date_obj.today() + datetime.timedelta(days=term*coef), date_obj.today() From 88512b00dd5da55174e638c536da05eca9c717f4 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 13 Feb 2011 16:31:57 +0100 Subject: [PATCH 04/41] Update COPYRIGHT --- COPYRIGHT | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 94a43fbe61..97eff54014 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ Copyright (C) 2004-2008 Tiny SPRL. -Copyright (C) 2008-2010 Cédric Krier. -Copyright (C) 2008-2010 Bertrand Chenal. -Copyright (C) 2008-2010 B2CK SPRL. +Copyright (C) 2008-2011 Cédric Krier. +Copyright (C) 2008-2011 Bertrand Chenal. +Copyright (C) 2008-2011 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 b1322dfce8bb085024aa7de5c83439d33ff341e7 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 13 Feb 2011 17:31:42 +0100 Subject: [PATCH 05/41] Prepare release 1.8.1 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index e5c2d1e692..c08a3f5a23 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.1 - 2011-02-13 +* Bug fixes (see mercurial logs for details) + Version 1.8.0 - 2010-11-01 * Bug fixes (see mercurial logs for details) From e533f7cc96af843c6337aaeb3507b075f041852a Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 13 Feb 2011 17:31:43 +0100 Subject: [PATCH 06/41] Added tag 1.8.1 for changeset bf95bc59c39b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 2c9049381a..5d69f31e94 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ c25f8bf80f1f8f92954cfed3a6dd2f799bd370e4 1.2.0 34f1b2a0557f504ee70664ff922faee63924aef0 1.4.0 a8c16bf00272129b9797a6efc12c9983420b2993 1.6.0 202fae34666e277acfdfba2fbace862a45227a52 1.8.0 +bf95bc59c39b7f169a834faae6f0d13cee9613bd 1.8.1 From c29ea74e5e86735f13da475e72a46c81e13d98ee Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 13 Feb 2011 17:31:53 +0100 Subject: [PATCH 07/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 13261e4112..02f6feebca 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.1', + 'version': '1.8.2', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 3cc92d133c8d255605b756acdbc929683f718329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 Apr 2011 11:28:19 +0200 Subject: [PATCH 08/41] Fix AgedBalance and ThirdPartyBalance to respect the fiscalyear selected (transplanted from e9093a847179966fd6634fe0cdf020a1d3d6e113) --- account.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index f78b9b0b76..d706acef8e 100644 --- a/account.py +++ b/account.py @@ -2069,7 +2069,8 @@ class ThirdPartyBalance(Report): localcontext['company'] = company localcontext['digits'] = company.currency.digits localcontext['fiscalyear'] = datas['form']['fiscalyear'] - line_query, _ = move_line_obj.query_get() + with Transaction().set_context(context=localcontext): + line_query, _ = move_line_obj.query_get() if datas['form']['posted']: posted_clause = "AND m.state = 'posted' " else: @@ -2217,7 +2218,8 @@ class AgedBalance(Report): localcontext['digits'] = company.currency.digits localcontext['fiscalyear'] = datas['form']['fiscalyear'] localcontext['posted'] = datas['form']['posted'] - line_query, _ = move_line_obj.query_get() + with Transaction().set_context(context=localcontext): + line_query, _ = move_line_obj.query_get() terms = (datas['form']['term1'], datas['form']['term2'], From b86bf720df7987918987140cc056b368e95decdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 18 Apr 2011 22:22:20 +0200 Subject: [PATCH 09/41] Fix periods order in Trial Balance for issue1918 (transplanted from a85a4dc6e5aaae24481f3117a6799173ac528d06) --- account.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/account.py b/account.py index d706acef8e..3edab42738 100644 --- a/account.py +++ b/account.py @@ -5,6 +5,7 @@ from decimal import Decimal import datetime import time import os +import operator from trytond.model import ModelView, ModelSQL, fields from trytond.wizard import Wizard from trytond.report import Report @@ -1415,7 +1416,9 @@ class TrialBalance(Report): periods = period_obj.browse(end_period_ids) localcontext['accounts'] = accounts + periods.sort(key=operator.attrgetter('start_date')) localcontext['start_period'] = periods[0] + periods.sort(key=operator.attrgetter('end_date')) localcontext['end_period'] = periods[-1] localcontext['company'] = company localcontext['digits'] = company.currency.digits From e0dde4279ce00930a7222c8951f70e255cebfd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 23 May 2011 12:03:01 +0200 Subject: [PATCH 10/41] Fix if clause is not a tuple in search_move_field clause can be a list if it comes from json (transplanted from 2753ca6d96dd9bede285cf5d2531c81e611c2602) --- move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.py b/move.py index 6246a3901f..067c9d7b53 100644 --- a/move.py +++ b/move.py @@ -927,7 +927,7 @@ class Line(ModelSQL, ModelView): def search_move_field(self, name, clause): if name == 'move_state': name = 'state' - return [('move.' + name,) + clause[1:]] + return [('move.' + name,) + tuple(clause[1:])] def query_get(self, obj='l'): ''' From 5edad5164e1ae789245c602f8ab99ebca7b18f82 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 29 May 2011 14:18:15 +0200 Subject: [PATCH 11/41] Prepare release 1.8.2 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index c08a3f5a23..87df4ac15b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.2 - 2011-05-29 +* Bug fixes (see mercurial logs for details) + Version 1.8.1 - 2011-02-13 * Bug fixes (see mercurial logs for details) From bed20921fdc2a4ae58bffe0d23939b8d4e58d45d Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 29 May 2011 14:18:15 +0200 Subject: [PATCH 12/41] Added tag 1.8.2 for changeset b4554f5da534 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5d69f31e94..57811291dc 100644 --- a/.hgtags +++ b/.hgtags @@ -4,3 +4,4 @@ c25f8bf80f1f8f92954cfed3a6dd2f799bd370e4 1.2.0 a8c16bf00272129b9797a6efc12c9983420b2993 1.6.0 202fae34666e277acfdfba2fbace862a45227a52 1.8.0 bf95bc59c39b7f169a834faae6f0d13cee9613bd 1.8.1 +b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 From fa98e2881a8363cccf3219a6d539d67bdfaf30ee Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Sun, 29 May 2011 14:18:24 +0200 Subject: [PATCH 13/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 02f6feebca..f71043b9f3 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.2', + 'version': '1.8.3', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 872485315793f0d95a8971a6d03de0a968fc8980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 20 Jul 2011 16:58:39 +0200 Subject: [PATCH 14/41] Use user context if user is root review60001 (transplanted from 88545f29405329fe6989085e4ad480e6f7084e4b) --- party.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/party.py b/party.py index 1516600a64..1fbe90346c 100644 --- a/party.py +++ b/party.py @@ -71,7 +71,10 @@ class Party(ModelSQL, ModelView): return {} company_id = None - user = user_obj.browse(Transaction().user) + user_id = Transaction().user + if user_id == 0 and 'user' in Transaction().context: + user_id = Transaction().context['user'] + user = user_obj.browse(user_id) if Transaction().context.get('company'): child_company_ids = company_obj.search([ ('parent', 'child_of', [user.main_company.id]), @@ -131,7 +134,10 @@ class Party(ModelSQL, ModelView): raise Exception('Bad argument') company_id = None - user = user_obj.browse(Transaction().user) + user_id = Transaction().user + if user_id == 0 and 'user' in Transaction().context: + user_id = Transaction().context['user'] + user = user_obj.browse(user_id) if Transaction().context.get('company'): child_company_ids = company_obj.search([ ('parent', 'child_of', [user.main_company.id]), From baef94280ba5d0d04643cc0ab823b77afbbb0c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 10 Sep 2011 15:39:34 +0200 Subject: [PATCH 15/41] Prepare release 1.8.3 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 87df4ac15b..409e46bd24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.3 - 2011-09-10 +* Bug fixes (see mercurial logs for details) + Version 1.8.2 - 2011-05-29 * Bug fixes (see mercurial logs for details) From 90249785cbfed3f41bc2a9003b71aed0ad80b081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 10 Sep 2011 15:39:44 +0200 Subject: [PATCH 16/41] Added tag 1.8.3 for changeset 4b27000b0eff --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 57811291dc..0618f94b56 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,4 @@ a8c16bf00272129b9797a6efc12c9983420b2993 1.6.0 202fae34666e277acfdfba2fbace862a45227a52 1.8.0 bf95bc59c39b7f169a834faae6f0d13cee9613bd 1.8.1 b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 +4b27000b0eff200ae86b05148f362585db84dcff 1.8.3 From bb5b3fff5314720857e54c3c7fcd5da4634c150a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 10 Sep 2011 15:44:53 +0200 Subject: [PATCH 17/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index f71043b9f3..68e3ff0953 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.3', + 'version': '1.8.4', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 42f4d671a33700505eadbfecad40d6e66c09485d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 28 Oct 2011 10:28:26 +0200 Subject: [PATCH 18/41] Fix typo (transplanted from d47f438ca66c72ba98bec1e125e990944dfd6881) --- move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.py b/move.py index 067c9d7b53..6c6af4e58d 100644 --- a/move.py +++ b/move.py @@ -835,7 +835,7 @@ class Line(ModelSQL, ModelView): amount = cursor.fetchone()[0] # SQLite uses float for SUM if not isinstance(amount, Decimal): - amout = Decimal(str(amount)) + amount = Decimal(str(amount)) if not currency_obj.is_zero( party.account_receivable.currency, amount): if amount > Decimal('0.0'): From f8ce461f18ed4ebc69bd8026885ed1f6b711b09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 14 Nov 2011 17:59:24 +0100 Subject: [PATCH 19/41] Create property for default account only if value is set issue2259 review174001 (transplanted from 2475a84195d25ba0b6c72637604fa2bfbac03959) --- account.py | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/account.py b/account.py index 3edab42738..a78aedaf8c 100644 --- a/account.py +++ b/account.py @@ -1807,13 +1807,14 @@ class CreateChartAccount(Wizard): ]) with Transaction().set_user(0): property_obj.delete(property_ids) - property_obj.create({ - 'name': 'account_receivable', - 'field': account_receivable_field_id, - 'value': 'account.account,' + \ - str(datas['form']['account_receivable']), - 'company': datas['form']['company'], - }) + if datas['form']['account_receivable']: + property_obj.create({ + 'name': 'account_receivable', + 'field': account_receivable_field_id, + 'value': 'account.account,' + \ + str(datas['form']['account_receivable']), + 'company': datas['form']['company'], + }) account_payable_field_id = model_field_obj.search([ ('model.model', '=', 'party.party'), @@ -1826,13 +1827,14 @@ class CreateChartAccount(Wizard): ]) with Transaction().set_user(0): property_obj.delete(property_ids) - property_obj.create({ - 'name': 'account_payable', - 'field': account_payable_field_id, - 'value': 'account.account,' + \ - str(datas['form']['account_payable']), - 'company': datas['form']['company'], - }) + if datas['form']['account_payable']: + property_obj.create({ + 'name': 'account_payable', + 'field': account_payable_field_id, + 'value': 'account.account,' + \ + str(datas['form']['account_payable']), + 'company': datas['form']['company'], + }) return {} CreateChartAccount() From 0ebc34537b0b3ba65b778a6d43d813e0445e7fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 2 Dec 2011 11:42:35 +0100 Subject: [PATCH 20/41] Convert value to Decimal when searching receivabel/payable issue2299 review191001 (transplanted from e0e172026e4683c47ab6681203912cb9962d906f) --- party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/party.py b/party.py index 1fbe90346c..88c0091632 100644 --- a/party.py +++ b/party.py @@ -176,7 +176,7 @@ class Party(ModelSQL, ModelView): 'GROUP BY l.party ' 'HAVING (SUM((COALESCE(l.debit, 0) - COALESCE(l.credit, 0))) ' \ + clause[1] + ' %s)', - [code] + today_value + [company_id] + [clause[2]]) + [code] + today_value + [company_id] + [Decimal(clause[2])]) return [('id', 'in', [x[0] for x in cursor.fetchall()])] Party() From 10e8c02b81cbdd77da262eda6491183ee479ee2d Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:36:06 +0100 Subject: [PATCH 21/41] Prepare release 1.8.4 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 409e46bd24..01e795e6b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.4 - 2011-12-26 +* Bug fixes (see mercurial logs for details) + Version 1.8.3 - 2011-09-10 * Bug fixes (see mercurial logs for details) From 99980701661246edf1dfd0cf0695f9db64f4fbe5 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:36:06 +0100 Subject: [PATCH 22/41] Added tag 1.8.4 for changeset 801c2e5c65e2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0618f94b56..cc3da7d5af 100644 --- a/.hgtags +++ b/.hgtags @@ -6,3 +6,4 @@ a8c16bf00272129b9797a6efc12c9983420b2993 1.6.0 bf95bc59c39b7f169a834faae6f0d13cee9613bd 1.8.1 b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 4b27000b0eff200ae86b05148f362585db84dcff 1.8.3 +801c2e5c65e2d4e15c94a4b455cbd7796dbffb89 1.8.4 From 052377c70599dd43bb919f331ebe30e10612ca24 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 26 Dec 2011 10:36:16 +0100 Subject: [PATCH 23/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 68e3ff0953..f13d7b3485 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.4', + 'version': '1.8.5', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From f6f3484b44766a78290ddf605ac7bc8178791003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Apr 2012 13:21:07 +0200 Subject: [PATCH 24/41] Use default values when adding a record via on_change review324001 (transplanted from 73f705ea869d17fa953deee2519c9c3914a375d7) --- move.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/move.py b/move.py index 6c6af4e58d..b52d15f62d 100644 --- a/move.py +++ b/move.py @@ -762,6 +762,8 @@ class Line(ModelSQL, ModelView): tax_code_obj = self.pool.get('account.tax.code') tax_obj = self.pool.get('account.tax') move_obj = self.pool.get('account.move') + tax_line_obj = pool.get('account.tax.line') + if vals.get('move'): #Only for first line return res @@ -796,14 +798,18 @@ class Line(ModelSQL, ModelView): for code_id, tax_id in base_amounts: if not base_amounts[code_id, tax_id]: continue - res.setdefault('add', []).append({ - 'amount': base_amounts[code_id, tax_id], - 'currency_digits': account.currency_digits, - 'code': code_id, - 'code.rec_name': tax_code_obj.browse(code_id).rec_name, - 'tax': tax_id, - 'tax.rec_name': tax_obj.browse(tax_id).rec_name, - }) + value = tax_line_obj.default_get( + tax_line_obj._columns.keys()) + value.update({ + 'amount': base_amounts[code_id, tax_id], + 'currency_digits': account.currency_digits, + 'code': code_id, + 'code.rec_name': tax_code_obj.browse( + code_id).rec_name, + 'tax': tax_id, + 'tax.rec_name': tax_obj.browse(tax_id).rec_name, + }) + res.setdefault('add', []).append(value) return res def on_change_party(self, vals): From 0ad361e177b91cab1513ddd8e4dafe7edd00731e Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:05:28 +0200 Subject: [PATCH 25/41] Prepare release 1.8.5 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 01e795e6b1..d1e544c56f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.5 - 2012-05-07 +* Bug fixes (see mercurial logs for details) + Version 1.8.4 - 2011-12-26 * Bug fixes (see mercurial logs for details) diff --git a/COPYRIGHT b/COPYRIGHT index 97eff54014..c646d008b8 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ Copyright (C) 2004-2008 Tiny SPRL. -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. 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 558e2c282ed6c30b406e72038c2be93b3c6ac05f Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:05:28 +0200 Subject: [PATCH 26/41] Added tag 1.8.5 for changeset 3b7e0ef0caf7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cc3da7d5af..5898889eff 100644 --- a/.hgtags +++ b/.hgtags @@ -7,3 +7,4 @@ bf95bc59c39b7f169a834faae6f0d13cee9613bd 1.8.1 b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 4b27000b0eff200ae86b05148f362585db84dcff 1.8.3 801c2e5c65e2d4e15c94a4b455cbd7796dbffb89 1.8.4 +3b7e0ef0caf7c5c01b88adeed3192f1df0934213 1.8.5 From 24554fa0a6a15c9049b5cd61ea2a0657c3069804 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:05:38 +0200 Subject: [PATCH 27/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index f13d7b3485..419d8e3ddb 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.5', + 'version': '1.8.6', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From dc7807c053b4792f8c22cb84f24b4090a75fd451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 Aug 2012 15:57:40 +0200 Subject: [PATCH 28/41] Fix search_receivable_payable with None value (transplanted from bbd17b4330367211576d5cebd23ba747780ee3a6) --- party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/party.py b/party.py index 88c0091632..72505a5130 100644 --- a/party.py +++ b/party.py @@ -176,7 +176,7 @@ class Party(ModelSQL, ModelView): 'GROUP BY l.party ' 'HAVING (SUM((COALESCE(l.debit, 0) - COALESCE(l.credit, 0))) ' \ + clause[1] + ' %s)', - [code] + today_value + [company_id] + [Decimal(clause[2])]) + [code] + today_value + [company_id] + [Decimal(clause[2] or 0)]) return [('id', 'in', [x[0] for x in cursor.fetchall()])] Party() From 17743cbd01f93e67ca81638b8c57075a3202ff23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 5 Aug 2012 21:10:40 +0200 Subject: [PATCH 29/41] Ensure clause concatination works with tuple vs list (transplanted from 3afd52ed80da5bee8d31ba1659b0849206d7070e) --- move.py | 4 ++-- tax.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/move.py b/move.py index b52d15f62d..6293bf5219 100644 --- a/move.py +++ b/move.py @@ -156,8 +156,8 @@ class Move(ModelSQL, ModelView): def search_rec_name(self, name, clause): ids = self.search(['OR', - ('reference',) + clause[1:], - (self._rec_name,) + clause[1:], + ('reference',) + tuple(clause[1:]), + (self._rec_name,) + tuple(clause[1:]), ]) return [('id', 'in', ids)] diff --git a/tax.py b/tax.py index 24b23609ba..6c10b797a2 100644 --- a/tax.py +++ b/tax.py @@ -239,10 +239,10 @@ class Code(ModelSQL, ModelView): return res def search_rec_name(self, name, clause): - ids = self.search([('code',) + clause[1:]], limit=1, order=[]) + ids = self.search([('code',) + tuple(clause[1:])], limit=1, order=[]) if ids: - return [('code',) + clause[1:]] - return [('name',) + clause[1:]] + return [('code',) + tuple(clause[1:])] + return [('name',) + tuple(clause[1:])] def delete(self, ids): if isinstance(ids, (int, long)): From 94eeacd25dddcc9d4fea83606d7fd3e3b00aa2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 5 Aug 2012 21:11:26 +0200 Subject: [PATCH 30/41] Fix typo for account.rec_name (transplanted from ad252c972c1f7ccc738088e46672a36abda60f32) --- move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.py b/move.py index 6293bf5219..93dc91ae37 100644 --- a/move.py +++ b/move.py @@ -878,7 +878,7 @@ class Line(ModelSQL, ModelView): else: if 'account' not in res: res['account'] = party.account_payable.id - res['account.rec_name'] = party.account_payable.id + res['account.rec_name'] = party.account_payable.rec_name if party and vals.get('credit'): if vals['credit'] > Decimal('0.0'): From 7bfd496e453307d186afa50cbed3e141cc1e7a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 2 Sep 2012 15:15:18 +0200 Subject: [PATCH 31/41] Prepare release 1.8.6 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index d1e544c56f..4f8fe04420 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.6 - 2012-09-02 +* Bug fixes (see mercurial logs for details) + Version 1.8.5 - 2012-05-07 * Bug fixes (see mercurial logs for details) From 9db45d92bc64427043bbe142055d50418e3e3924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 2 Sep 2012 15:15:19 +0200 Subject: [PATCH 32/41] Added tag 1.8.6 for changeset c0dfd8794aa5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5898889eff..3b47042491 100644 --- a/.hgtags +++ b/.hgtags @@ -8,3 +8,4 @@ b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 4b27000b0eff200ae86b05148f362585db84dcff 1.8.3 801c2e5c65e2d4e15c94a4b455cbd7796dbffb89 1.8.4 3b7e0ef0caf7c5c01b88adeed3192f1df0934213 1.8.5 +c0dfd8794aa593cb55d29175acf9f79cd167b3cd 1.8.6 From 898898976a6e626fe8c851d0cd35c879df063ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 2 Sep 2012 15:15:31 +0200 Subject: [PATCH 33/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 419d8e3ddb..35fe136861 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.6', + 'version': '1.8.7', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 51d018a62d0f17ade228f333035741f0535459a9 Mon Sep 17 00:00:00 2001 From: Robin Baumgartner Date: Thu, 15 Nov 2012 10:46:54 +0100 Subject: [PATCH 34/41] Do not copy deferrals when copying account issue2892 review580004 (transplanted from 75313e5b3c7a767402bcc9c43a19ccef89af15ca) --- account.py | 1 + 1 file changed, 1 insertion(+) diff --git a/account.py b/account.py index a78aedaf8c..958d6fdf41 100644 --- a/account.py +++ b/account.py @@ -844,6 +844,7 @@ class Account(ModelSQL, ModelView): default = {} default['left'] = 0 default['right'] = 0 + default.setdefault('deferrals', []) res = super(Account, self).copy(ids, default=default) self._rebuild_tree('parent', False, 0) return res From be899b8014c9370bfdf8ecac52c5a3f65249cc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 23 Dec 2012 17:05:13 +0100 Subject: [PATCH 35/41] Prepare release 1.8.7 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 4f8fe04420..1810c42e3d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.7 - 2012-12-23 +* Bug fixes (see mercurial logs for details) + Version 1.8.6 - 2012-09-02 * Bug fixes (see mercurial logs for details) From a9d5fd854b56adccc1967185a23c7de47afc19cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 23 Dec 2012 17:05:13 +0100 Subject: [PATCH 36/41] Added tag 1.8.7 for changeset 96ad1b451ff5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3b47042491..c6dd464b26 100644 --- a/.hgtags +++ b/.hgtags @@ -9,3 +9,4 @@ b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 801c2e5c65e2d4e15c94a4b455cbd7796dbffb89 1.8.4 3b7e0ef0caf7c5c01b88adeed3192f1df0934213 1.8.5 c0dfd8794aa593cb55d29175acf9f79cd167b3cd 1.8.6 +96ad1b451ff5a91e507d09e07c54ef15ea1daf83 1.8.7 From 1df521b41f71b8b7cebc84ce6b94683eb6010a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 23 Dec 2012 17:05:25 +0100 Subject: [PATCH 37/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 35fe136861..8c3c8f12c4 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.7', + 'version': '1.8.8', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From bae72b00d149b0279f87c53a868a860fe82c01f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 22 Mar 2013 18:53:12 +0100 Subject: [PATCH 38/41] Add missing filter on company in GeneralJournal report review727002 (transplanted from 85324c3f826e3bf63aab718edecc7e0fdc292f9b) --- move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/move.py b/move.py index 93dc91ae37..4073dcabba 100644 --- a/move.py +++ b/move.py @@ -1708,6 +1708,7 @@ class GeneralJournal(Report): clause = [ ('date', '>=', datas['form']['from_date']), ('date', '<=', datas['form']['to_date']), + ('period.fiscalyear.company', '=', datas['form']['company']), ] if datas['form']['posted']: clause.append(('state', '=', 'posted')) From 6b5a8e3dd4239fe32eee704f8840e28fdc5496fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:49:34 +0200 Subject: [PATCH 39/41] Prepare release 1.8.8 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1810c42e3d..f43c14ea89 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.8.8 - 2013-05-02 +* Bug fixes (see mercurial logs for details) + Version 1.8.7 - 2012-12-23 * Bug fixes (see mercurial logs for details) diff --git a/COPYRIGHT b/COPYRIGHT index c646d008b8..a493f24770 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ Copyright (C) 2004-2008 Tiny SPRL. -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. 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 3c2b1b98fa28986895a4e3d5db548fa5bca80df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:49:35 +0200 Subject: [PATCH 40/41] Added tag 1.8.8 for changeset 88e9fd5174d2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c6dd464b26..dd31a7a7c5 100644 --- a/.hgtags +++ b/.hgtags @@ -10,3 +10,4 @@ b4554f5da5343979df4253009ded96502c38bf8d 1.8.2 3b7e0ef0caf7c5c01b88adeed3192f1df0934213 1.8.5 c0dfd8794aa593cb55d29175acf9f79cd167b3cd 1.8.6 96ad1b451ff5a91e507d09e07c54ef15ea1daf83 1.8.7 +88e9fd5174d275439112e85e21921b4be6759e46 1.8.8 From d821b9bc2b5462ace754d78614042dd1caf5b23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:49:45 +0200 Subject: [PATCH 41/41] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 8c3c8f12c4..a422eccd8d 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -6,7 +6,7 @@ 'name_es_CO': 'Contabilidad', 'name_es_ES': 'Contabilidad', 'name_fr_FR': 'Comptabilité', - 'version': '1.8.8', + 'version': '1.8.9', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/',