From 7366a80ecd1d16c8e0e254a3664ac7720a9a9a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 21 Oct 2013 17:40:26 +0200 Subject: [PATCH 1/7] Increase version number --- tryton.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton.cfg b/tryton.cfg index c6c05836aa..40db5a7c1a 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=3.0.0 +version=3.0.1 depends: company currency From d744d0a66af0c350e2526fb2a9b5b030103e6ff0 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 14 Nov 2013 13:34:36 +0100 Subject: [PATCH 2/7] Fix move queries when filter by posted move issue3493 review1661003 (transplanted from 933f85b58a366f61d6634ada062f2d4d2a893500) --- move.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/move.py b/move.py index 19453021f3..4e2312604e 100644 --- a/move.py +++ b/move.py @@ -1127,9 +1127,9 @@ class Line(ModelSQL, ModelView): return ((table.state != 'draft') & table.move.in_( move.select(move.id, - where=period.in_( + where=move.period.in_( Transaction().context['periods']) - & move.state == 'posted')), + & (move.state == 'posted'))), fiscalyear_ids) else: return ((table.state != 'draft') @@ -1155,7 +1155,7 @@ class Line(ModelSQL, ModelView): period.select(period.id, where=period.fiscalyear.in_( fiscalyear_ids))) - & move.state == 'posted')), + & (move.state == 'posted'))), fiscalyear_ids) else: return ((table.state != 'draft') From 4487db8a08bf37af83f86032a44bf2977b8658a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Dec 2013 17:06:53 +0100 Subject: [PATCH 3/7] Prepare release 3.0.1 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ef0a877514..7c18b30bb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 3.0.1 - 2013-12-04 +* Bug fixes (see mercurial logs for details) + Version 3.0.0 - 2013-10-21 * Bug fixes (see mercurial logs for details) * Add balance non-deferral wizard From 7e38c428864cca4b6b27f72c75103ab859ebace0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Dec 2013 17:06:54 +0100 Subject: [PATCH 4/7] Added tag 3.0.1 for changeset 568a2e19253e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5ffb906ee6..05b52962a4 100644 --- a/.hgtags +++ b/.hgtags @@ -9,3 +9,4 @@ a8c16bf00272129b9797a6efc12c9983420b2993 1.6.0 0cff8a0b9011ea4f9b8b75db0350013156a3c1ad 2.6.0 1f53b2073b99ca85ae3cfda949ad11e46d9a321a 2.8.0 5d3bb6417e5b5e32831188a35f3f4994f841cb9c 3.0.0 +568a2e19253ee15a7a91c9922a59534c6f4696b9 3.0.1 From 3fa7081acd1df6def43006e360c2d138e3445816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Dec 2013 17:07:11 +0100 Subject: [PATCH 5/7] Increase version number --- tryton.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton.cfg b/tryton.cfg index 40db5a7c1a..6166548862 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=3.0.1 +version=3.0.2 depends: company currency From 6e550ad8d5fd44908e0b04033918ac717e4b956e Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Tue, 11 Feb 2014 16:28:50 +0100 Subject: [PATCH 6/7] Fix update chart of accounts with changes on taxes or rule lines - invoice_account, credit_note_account, invoice_base_code, invoice_tax_code, credit_note_base_code and credit_note_tax_code where not properly compared when upgrading the chart of accounts. - Origin tax of rule_lines was updated with the value of the template, so it raised a domain validation error. issue3617 review2961002 (transplanted from def3be51ee2b7625c15c46351250ecb77d8f8f4b) --- tax.py | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/tax.py b/tax.py index 05d9d0fb5a..1f3b17efd6 100644 --- a/tax.py +++ b/tax.py @@ -802,48 +802,60 @@ class Tax(ModelSQL, ModelView): if self.template: vals = self.template._get_tax_value(tax=self) - if (self.template.invoice_account - and self.invoice_account.id != template2account.get( - self.template.invoice_account.id)): + invoice_account_id = (self.invoice_account.id + if self.invoice_account else None) + if (self.template.invoice_account and + invoice_account_id != template2account.get( + self.template.invoice_account.id)): vals['invoice_account'] = template2account.get( self.template.invoice_account.id) elif (not self.template.invoice_account and self.invoice_account): vals['invoice_account'] = None - if (self.template.credit_note_account - and self.credit_note_account.id != template2account.get( + credit_note_account_id = (self.credit_note_account.id + if self.credit_note_account else None) + if (self.template.credit_note_account and + credit_note_account_id != template2account.get( self.template.credit_note_account.id)): vals['credit_note_account'] = template2account.get( self.template.credit_note_account.id) elif (not self.template.credit_note_account and self.credit_note_account): vals['credit_note_account'] = None - if (self.template.invoice_base_code - and self.invoice_base_code.id != template2tax_code.get( - self.template.invoice_base_code.id)): + invoice_base_code_id = (self.invoice_base_code.id + if self.invoice_base_code else None) + if (self.template.invoice_base_code and + invoice_base_code_id != template2tax_code.get( + self.template.invoice_base_code.id)): vals['invoice_base_code'] = template2tax_code.get( self.template.invoice_base_code.id) elif (not self.template.invoice_base_code and self.invoice_base_code): vals['invoice_base_code'] = None + invoice_tax_code_id = (self.invoice_tax_code.id + if self.invoice_tax_code else None) if (self.template.invoice_tax_code - and self.invoice_tax_code.id != template2tax_code.get( + and invoice_tax_code_id != template2tax_code.get( self.template.invoice_tax_code.id)): vals['invoice_tax_code'] = template2tax_code.get( self.template.invoice_tax_code.id) elif (not self.template.invoice_tax_code and self.invoice_tax_code): vals['invoice_tax_code'] = None + credit_note_base_code_id = (self.credit_note_base_code.id + if self.credit_note_base_code else None) if (self.template.credit_note_base_code - and self.credit_note_base_code.id != template2tax_code.get( + and credit_note_base_code_id != template2tax_code.get( self.template.credit_note_base_code.id)): vals['credit_note_base_code'] = template2tax_code.get( self.template.credit_note_base_code.id) elif (not self.template.credit_note_base_code and self.credit_note_base_code): vals['credit_note_base_code'] = None + credit_note_tax_code_id = (self.credit_note_tax_code.id + if self.credit_note_tax_code else None) if (self.template.credit_note_tax_code - and self.credit_note_tax_code.id != template2tax_code.get( + and credit_note_tax_code_id != template2tax_code.get( self.template.credit_note_tax_code.id)): vals['credit_note_tax_code'] = template2tax_code.get( self.template.credit_note_tax_code.id) @@ -1118,8 +1130,6 @@ class TaxRuleLineTemplate(ModelSQL, ModelView): res = {} if not rule_line or rule_line.group != self.group: res['group'] = self.group.id if self.group else None - if not rule_line or rule_line.origin_tax != self.origin_tax: - res['origin_tax'] = self.origin_tax.id if self.origin_tax else None if not rule_line or rule_line.sequence != self.sequence: res['sequence'] = self.sequence if not rule_line or rule_line.template != self: @@ -1273,14 +1283,22 @@ class TaxRuleLine(ModelSQL, ModelView): vals['rule'] = template2rule[self.template.rule.id] if self.origin_tax: if self.template.origin_tax: - if self.origin_tax.id != \ - template2tax[self.template.origin_tax.id]: + if (self.origin_tax.id != + template2tax[self.template.origin_tax.id]): vals['origin_tax'] = template2tax[ self.template.origin_tax.id] + else: + vals['origin_tax'] = None + elif self.template.origin_tax: + vals['origin_tax'] = template2tax[self.template.origin_tax.id] if self.tax: if self.template.tax: if self.tax.id != template2tax[self.template.tax.id]: vals['tax'] = template2tax[self.template.tax.id] + else: + vals['tax'] = None + elif self.template.tax: + vals['tax'] = template2tax[self.template.tax.id] if vals: self.write([self], vals) template2rule_line[self.template.id] = self.id From 7cd050ae917680e831376a6610eaba3e2dddcc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 11 Feb 2014 18:02:27 +0100 Subject: [PATCH 7/7] Fix typo in Move.query_get: fiscalyear is on period, not move issue3669 (transplanted from ca11e2b3c46cb384d29f19d173890001615b95e1) --- move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/move.py b/move.py index 4e2312604e..eb55d517aa 100644 --- a/move.py +++ b/move.py @@ -1105,7 +1105,7 @@ class Line(ModelSQL, ModelView): & table.move.in_(move.join(period, condition=move.period == period.id ).select(move.id, - where=(move.fiscalyear == fiscalyear_id) + where=(period.fiscalyear == fiscalyear_id) & (move.date <= Transaction().context['date']) & (move.state == 'posted'))), [f.id for f in fiscalyears])