From b8d38115d74582a69328a4bd30a63e5444002a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 18 Nov 2008 18:07:40 +0100 Subject: [PATCH 01/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index cce6b9df6c..8c60abe234 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.0', + 'version': '1.0.1', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From feef3f5d6a1832e3878d47923826353c40026d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 18 Nov 2008 18:12:40 +0100 Subject: [PATCH 02/44] Allow egg installation --- CHANGELOG | 2 ++ setup.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index eacaaefa7d..44de11f380 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,2 +1,4 @@ +* Allow egg installation + Version 1.0.0 - 2008-11-17 * Initial release diff --git a/setup.py b/setup.py index 23fc7327bf..0c8de7ee9e 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,8 @@ setup(name='trytond_account_invoice', author=info.get('author', ''), author_email=info.get('email', ''), url=info.get('website', ''), + download_url="http://downloads.tryton.org/" + \ + info.get('version', '0.0.1').rsplit('.', 1)[0] + '/', package_dir={'trytond.modules.account_invoice': '.'}, packages=[ 'trytond.modules.account_invoice', @@ -54,4 +56,9 @@ setup(name='trytond_account_invoice', ], license='GPL-3', install_requires=requires, + zip_safe=False, + entry_points=""" + [trytond.modules] + account_invoice = trytond.modules.account_invoice + """, ) From 4b11feef9feb37af76c181358cfa0396479b8088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 25 Nov 2008 12:45:06 +0100 Subject: [PATCH 03/44] Handle default value for sequence with context for issue609 --- invoice.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index f6513d4e2f..3e2fb9bffc 100644 --- a/invoice.py +++ b/invoice.py @@ -1936,16 +1936,20 @@ class FiscalYear(OSV): _name = 'account.fiscalyear' out_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Customer Invoice Sequence', required=True, - domain="[('code', '=', 'account.invoice')]") + domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice', 'company': company}") in_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Invoice Sequence', required=True, - domain="[('code', '=', 'account.invoice')]") + domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice', 'company': company}") out_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Customer Credit Note Sequence', required=True, - domain="[('code', '=', 'account.invoice')]") + domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice', 'company': company}") in_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Credit Note Sequence', required=True, - domain="[('code', '=', 'account.invoice')]") + domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice', 'company': company}") def __init__(self): super(FiscalYear, self).__init__() @@ -2000,6 +2004,7 @@ class Period(OSV): out_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Customer Invoice Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", @@ -2007,6 +2012,7 @@ class Period(OSV): in_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Invoice Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", @@ -2014,6 +2020,7 @@ class Period(OSV): out_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Customer Credit Note Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", @@ -2021,6 +2028,7 @@ class Period(OSV): in_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Credit Note Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", From 144829269f2ccbbcd7ac5a0bd8cbbc4568157a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Nov 2008 00:23:20 +0100 Subject: [PATCH 04/44] Fix missing initialisation of variable ids in name_search of invoice --- invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invoice.py b/invoice.py index 3e2fb9bffc..0d0133bd61 100644 --- a/invoice.py +++ b/invoice.py @@ -951,6 +951,7 @@ class Invoice(OSV): context=None, limit=None): if args is None: args = [] + ids = [] if name: ids = self.search(cursor, user, [('number', operator, name)] + args, limit=limit, context=context) From 00ce6c9e13ea4c9a137820694bd4f01a53deccde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 1 Dec 2008 13:37:39 +0100 Subject: [PATCH 05/44] Prepare changelog for release 1.0.1 --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 44de11f380..9801fce04d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +Version 1.0.1 - 2008-12-01 * Allow egg installation Version 1.0.0 - 2008-11-17 From d26d6a1ee27866d19a2dd236af78c44977e131a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 1 Dec 2008 13:37:55 +0100 Subject: [PATCH 06/44] Added tag 1.0.1 for changeset f34b609e6043 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 917e2e7b3e..84e4ce641e 100644 --- a/.hgtags +++ b/.hgtags @@ -1 +1,2 @@ 835d9feea848c42ed5d38bff2a9e233ca947480f 1.0.0 +f34b609e60438846cec0aa7cad1862ad712b2bd2 1.0.1 From d0942690d3c87bb5feb892fc3c223a6084a46fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 1 Dec 2008 13:39:07 +0100 Subject: [PATCH 07/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 8c60abe234..8a4569507a 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.1', + 'version': '1.0.2', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 4580e76ff66abc66718ee42f720930894208767d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 4 Dec 2008 15:37:26 +0100 Subject: [PATCH 08/44] Invert debit/credit for invoice line move with negative amount --- invoice.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/invoice.py b/invoice.py index 0d0133bd61..a155a0255d 100644 --- a/invoice.py +++ b/invoice.py @@ -1585,12 +1585,21 @@ class InvoiceLine(OSV): res['amount_second_currency'] = Decimal('0.0') res['second_currency'] = False if line.invoice.type in ('in_invoice', 'out_credit_note'): - res['debit'] = amount - res['credit'] = Decimal('0.0') + if amount >= Decimal('0.0'): + res['debit'] = amount + res['credit'] = Decimal('0.0') + else: + res['debit'] = Decimal('0.0') + res['credit'] = - amount + res['amount_second_currency'] = - res['amount_second_currency'] else: - res['debit'] = Decimal('0.0') - res['credit'] = amount - res['amount_second_currency'] = - res['amount_second_currency'] + if amount >= Decimal('0.0'): + res['debit'] = Decimal('0.0') + res['credit'] = amount + res['amount_second_currency'] = - res['amount_second_currency'] + else: + res['debit'] = - amount + res['credit'] = Decimal('0.0') res['account'] = line.account.id res['party'] = line.invoice.party.id computed_taxes = self._compute_taxes(cursor, user, line, From 49380c1da1c4334763573e036502b040e1e77268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 6 Dec 2008 01:37:38 +0100 Subject: [PATCH 09/44] Use tax_sign only for tax_lines for issue644 --- invoice.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index a155a0255d..4174c96f99 100644 --- a/invoice.py +++ b/invoice.py @@ -1750,13 +1750,12 @@ class InvoiceTax(OSV): amount = currency_obj.compute(cursor, user, tax.invoice.currency, tax.amount, tax.invoice.company.currency, context=context) - res['amount_second_currency'] = tax.amount * tax.tax_sign + res['amount_second_currency'] = tax.amount res['second_currency'] = tax.invoice.currency.id else: amount = tax.amount res['amount_second_currency'] = Decimal('0.0') res['second_currency'] = False - amount *= tax.tax_sign if tax.invoice.type in ('in_invoice', 'out_credit_note'): if amount >= Decimal('0.0'): res['debit'] = amount @@ -1778,7 +1777,7 @@ class InvoiceTax(OSV): if tax.tax_code: res['tax_lines'] = [('create', { 'code': tax.tax_code.id, - 'amount': amount, + 'amount': amount * tax.tax_sign, })] return res From 1ef82ba7e3609263fdd95afb521b1321cab2817a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 18 Dec 2008 18:15:58 +0100 Subject: [PATCH 10/44] Add missing _order_name on invoice --- invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/invoice.py b/invoice.py index 4174c96f99..0b5a234bc4 100644 --- a/invoice.py +++ b/invoice.py @@ -229,6 +229,7 @@ class Invoice(OSV): 'Invoice' _name = 'account.invoice' _description = __doc__ + _order_name = 'number' company = fields.Many2One('company.company', 'Company', required=True, states=_STATES) type = fields.Selection([ From eba830a2e5fbd888ba3f5ade33bbe06188e13d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Dec 2008 19:08:29 +0100 Subject: [PATCH 11/44] Add ondelete_target CASCADE for payment_lines on invoice for issue694 --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 0b5a234bc4..609cd6c7d2 100644 --- a/invoice.py +++ b/invoice.py @@ -289,7 +289,7 @@ class Invoice(OSV): relation='account.move.line', string='Lines to Pay') payment_lines = fields.Many2Many('account.move.line', 'invoice_payment_lines_rel', 'invoice', 'line', readonly=True, - string='Payment Lines') + ondelete_target='CASCADE', string='Payment Lines') amount_to_pay_today = fields.Function('get_amount_to_pay', type='numeric', digits="(16, currency_digits)", string='Amount to Pay Today') From ca49b0e932ee76571eaf45c6c15db7845d6058a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 30 Dec 2008 13:52:03 +0100 Subject: [PATCH 12/44] Update amount in on_change_product of invoice line for issue703 --- invoice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/invoice.py b/invoice.py index 609cd6c7d2..9e8084a312 100644 --- a/invoice.py +++ b/invoice.py @@ -1485,6 +1485,12 @@ class InvoiceLine(OSV): res['unit'] = uom_obj.name_get(cursor, user, product.default_uom.id, context=context)[0] res['unit_digits'] = product.default_uom.digits + + vals = vals.copy() + vals['unit_price'] = res['unit_price'] + vals['type'] = 'line' + res['amount'] = self.on_change_with_amount(cursor, user, ids, + vals, context=context) return res def check_modify(self, cursor, user, ids, context=None): From 2ac177ab672872ab2597ae5d2a6ededf750e3e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Jan 2009 13:35:15 +0100 Subject: [PATCH 13/44] Prepare changelog for release 1.0.2 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 9801fce04d..bf8a718dae 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.0.2 - 2009-01-06 +* Some bug fixes (see mercurial logs for details) + Version 1.0.1 - 2008-12-01 * Allow egg installation From 798dcd138bef201b808c339be9f6e8029f04e118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Jan 2009 13:35:23 +0100 Subject: [PATCH 14/44] Added tag 1.0.2 for changeset 0a8d0b122066 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 84e4ce641e..fc9a4c2995 100644 --- a/.hgtags +++ b/.hgtags @@ -1,2 +1,3 @@ 835d9feea848c42ed5d38bff2a9e233ca947480f 1.0.0 f34b609e60438846cec0aa7cad1862ad712b2bd2 1.0.1 +0a8d0b12206619d7bc95e91cb2b0979937f3cdf6 1.0.2 From 1e19713a183ba8afe0d084e9a2187edc0c4f1486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Jan 2009 13:39:13 +0100 Subject: [PATCH 15/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 8a4569507a..f9e9a79d49 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.2', + 'version': '1.0.3', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 1335fff3826449edf11eea3cfb51a2b5c3574479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Jan 2009 17:46:40 +0100 Subject: [PATCH 16/44] Use tax description instead of name on invoice line for issue729 --- invoice.odt | Bin 9624 -> 9757 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/invoice.odt b/invoice.odt index fd89f7d45497da6591d971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<_^%t$6eRl$J8KwcAA3^t)}Z>Q_I0N;VqdIFF!E#+vB}{}Wh7>_ zW~`*iOcA5RL)TaD_Gam^xi`WO5!5@ga$Zj&+w3axHk0SRN@dSPIeRMtXe<2 zrXd41DslLHYJVFQSjHN0-Z;>`N1cu~hk2^0XhvVm-~3GZ)pplT|D@sOH05|AS+ZH9 zO-EWsQ;9-=%}UtC{EOBf0T6^63AC-hCdTjn!nttG_wD=>uLUS zuhU5WvA&@Fs|4pk%M1Kni~Dc70n$jzLh;-3Z%* Date: Tue, 6 Jan 2009 17:47:16 +0100 Subject: [PATCH 17/44] Update copyright --- COPYRIGHT | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 37fef2d645..da277a9b35 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ Copyright (C) 2004-2008 Tiny SPRL. -Copyright (C) 2008 Cédric Krier. -Copyright (C) 2008 Bertrand Chenal. -Copyright (C) 2008 B2CK SPRL. +Copyright (C) 2008-2009 Cédric Krier. +Copyright (C) 2008-2009 Bertrand Chenal. +Copyright (C) 2008-2009 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 794e11c90057cc3af58dab2fc9dcb51896cd341c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Jan 2009 17:38:05 +0100 Subject: [PATCH 18/44] If amount_to_pay_today is zero used amount_to_pay in pay invoice wizard --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 9e8084a312..77099ae3d8 100644 --- a/invoice.py +++ b/invoice.py @@ -2240,7 +2240,7 @@ class PayInvoice(Wizard): invoice = invoice_obj.browse(cursor, user, data['id'], context=context) res['currency'] = invoice.currency.id res['currency_digits'] = invoice.currency.digits - res['amount'] = invoice.amount_to_pay_today + res['amount'] = invoice.amount_to_pay_today or invoice.amount_to_pay res['description'] = invoice.number return res From d16305c44b5da81012fd4f6e34274cf409b07d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Jan 2009 17:45:22 +0100 Subject: [PATCH 19/44] Add changelog --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index bf8a718dae..64af491536 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Use amount_to_pay if amount_to_pay_today is zero in pay invoice wizard + Version 1.0.2 - 2009-01-06 * Some bug fixes (see mercurial logs for details) From 91629db312e4e173906bc31b005eb875a4681778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Mar 2009 10:09:21 +0100 Subject: [PATCH 20/44] Prepare changelog for release 1.0.3 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 64af491536..ba45f76cad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +Version 1.0.3 - 2009-03-02 +* Some bug fixes (see mercurial logs for details) * Use amount_to_pay if amount_to_pay_today is zero in pay invoice wizard Version 1.0.2 - 2009-01-06 From 6de2dee71ba057ebda709730b32af43bd3cf707f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Mar 2009 10:09:29 +0100 Subject: [PATCH 21/44] Added tag 1.0.3 for changeset aa2177eaf0ec --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fc9a4c2995..36c797443b 100644 --- a/.hgtags +++ b/.hgtags @@ -1,3 +1,4 @@ 835d9feea848c42ed5d38bff2a9e233ca947480f 1.0.0 f34b609e60438846cec0aa7cad1862ad712b2bd2 1.0.1 0a8d0b12206619d7bc95e91cb2b0979937f3cdf6 1.0.2 +aa2177eaf0ec6d7b54e41e5deb58ea8fb76478eb 1.0.3 From 9ede177ed88c939120a063a3292b82e223f889ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Mar 2009 10:10:19 +0100 Subject: [PATCH 22/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index f9e9a79d49..183d73d4be 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.3', + 'version': '1.0.4', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 6d45f9073b06c8c241a3396d8b3e255be8aa9ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 9 Mar 2009 11:48:45 +0100 Subject: [PATCH 23/44] Don't update taxes for invoice in state 'open', 'paid', 'cancel' --- invoice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/invoice.py b/invoice.py index 77099ae3d8..37f8741418 100644 --- a/invoice.py +++ b/invoice.py @@ -758,6 +758,8 @@ class Invoice(OSV): tax_obj = self.pool.get('account.invoice.tax') currency_obj = self.pool.get('currency.currency') for invoice in self.browse(cursor, user, ids, context=context): + if invoice.state in ('open', 'paid', 'cancel'): + continue computed_taxes = self._compute_taxes(cursor, user, invoice, context=context) if not invoice.taxes: From a8227478196ec70343d10e9c1daae3a115e4be26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Apr 2009 14:04:28 +0200 Subject: [PATCH 24/44] Fix typo in default value of copy to reset the invoice_date to today --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 37f8741418..a26f9c0366 100644 --- a/invoice.py +++ b/invoice.py @@ -1009,7 +1009,7 @@ class Invoice(OSV): default['payment_lines'] = False default['lines'] = False default['taxes'] = False - default['date'] = date_obj.today(cursor, user, context=context) + default['invoice_date'] = date_obj.today(cursor, user, context=context) default['lines_to_pay'] = False new_id = super(Invoice, self).copy(cursor, user, invoice_id, default=default, context=context) From ce5efd4eb982d58afd8998e906b61042a672abb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 3 Apr 2009 17:48:44 +0200 Subject: [PATCH 25/44] Update taxes only for draft invoices --- invoice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index a26f9c0366..783ae33e8a 100644 --- a/invoice.py +++ b/invoice.py @@ -984,9 +984,12 @@ class Invoice(OSV): keys.remove(key) if len(keys): self.check_modify(cursor, user, ids, context=context) + update_tax_ids = [x.id for x in self.browse(cursor, user, ids, + context=context) if x.state == 'draft'] res = super(Invoice, self).write(cursor, user, ids, vals, context=context) - self.update_taxes(cursor, user, ids, context=context) + if update_tax_ids: + self.update_taxes(cursor, user, update_tax_ids, context=context) if 'state' in vals and vals['state'] in ('paid', 'cancel'): for invoice_id in ids: workflow_service.trg_trigger(user, self._name, invoice_id, From e07da04086c008d98b453eaa6313f1db3d8cb4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 22 Apr 2009 18:59:06 +0200 Subject: [PATCH 26/44] Remove invisible states on base fields for manual tax lines --- invoice.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/invoice.py b/invoice.py index 783ae33e8a..b9248db179 100644 --- a/invoice.py +++ b/invoice.py @@ -1655,21 +1655,12 @@ class InvoiceTax(OSV): account = fields.Many2One('account.account', 'Account', required=True, domain="[('kind', '!=', 'view'), " \ "('company', '=', _parent_invoice.company)]") - base = fields.Numeric('Base', digits="(16, _parent_invoice.currency_digits)", - states={ - 'invisible': "manual", - }) + base = fields.Numeric('Base', digits="(16, _parent_invoice.currency_digits)") amount = fields.Numeric('Amount', digits="(16, _parent_invoice.currency_digits)") manual = fields.Boolean('Manual') base_code = fields.Many2One('account.tax.code', 'Base Code', - domain="[('company', '=', _parent_invoice.company)]", - states={ - 'invisible': "manual", - }) - base_sign = fields.Numeric('Base Sign', digits=(2, 0), - states={ - 'invisible': "manual", - }) + domain="[('company', '=', _parent_invoice.company)]") + base_sign = fields.Numeric('Base Sign', digits=(2, 0)) tax_code = fields.Many2One('account.tax.code', 'Tax Code', domain="[('company', '=', _parent_invoice.company)]") tax_sign = fields.Numeric('Tax Sign', digits=(2, 0)) From 96cc8209e60d3317c70e840ca204ad5b21f4b550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 28 Apr 2009 14:47:52 +0200 Subject: [PATCH 27/44] Allow to modify lines from canceled invoice --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index b9248db179..c234c1e4c4 100644 --- a/invoice.py +++ b/invoice.py @@ -1503,7 +1503,7 @@ class InvoiceLine(OSV): Check if the lines can be modified ''' for line in self.browse(cursor, user, ids, context=context): - if line.invoice.state in ('open', 'paid', 'cancel'): + if line.invoice.state in ('open', 'paid'): self.raise_user_error(cursor, 'modify', context=context) return From b412ce5866ae930b1f03ae204e1cc00e26284b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 May 2009 19:03:54 +0200 Subject: [PATCH 28/44] Prepare changelog for release 1.0.4 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ba45f76cad..061dac4c77 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.0.4 - 2009-05-11 +* Some bug fixes (see mercurial logs for details) + Version 1.0.3 - 2009-03-02 * Some bug fixes (see mercurial logs for details) * Use amount_to_pay if amount_to_pay_today is zero in pay invoice wizard From 47c0df844f8faef5c80992b4f1edb92f7d4913b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 May 2009 19:03:58 +0200 Subject: [PATCH 29/44] Added tag 1.0.4 for changeset 8cd52d785941 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 36c797443b..f59169fe25 100644 --- a/.hgtags +++ b/.hgtags @@ -2,3 +2,4 @@ f34b609e60438846cec0aa7cad1862ad712b2bd2 1.0.1 0a8d0b12206619d7bc95e91cb2b0979937f3cdf6 1.0.2 aa2177eaf0ec6d7b54e41e5deb58ea8fb76478eb 1.0.3 +8cd52d78594167e17d3e4c1db28d904fbb6ba53f 1.0.4 From 2e0423a450354005231cc0bbb66f1e19edd92af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 11 May 2009 19:04:34 +0200 Subject: [PATCH 30/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 183d73d4be..ce6e1e202f 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.4', + 'version': '1.0.5', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 81f358994d39a76f44003f724fce2702e3920c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 16 Jun 2009 22:47:11 +0200 Subject: [PATCH 31/44] Add missing rounding on tax lines --- invoice.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/invoice.py b/invoice.py index c234c1e4c4..fe6b8c8ce8 100644 --- a/invoice.py +++ b/invoice.py @@ -514,6 +514,11 @@ class Invoice(OSV): else: computed_taxes[key]['base'] += val['base'] computed_taxes[key]['amount'] += val['amount'] + if currency: + for key in computed_taxes: + for field in ('base', 'amount'): + computed_taxes[key][field] = currency_obj.round(cursor, + user, currency, computed_taxes[key][field]) tax_keys = [] for tax in vals.get('taxes', []): if tax.get('manual', False): @@ -752,6 +757,10 @@ class Invoice(OSV): else: res[key]['base'] += val['base'] res[key]['amount'] += val['amount'] + for key in res: + for field in ('base', 'amount'): + res[key][field] = currency_obj.round(cursor, + user, invoice.currency, res[key][field]) return res def update_taxes(self, cursor, user, ids, context=None, exception=False): From 0546d34c045b55dfbecd1751e3aedbdeb8e49d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Jul 2009 10:26:42 +0200 Subject: [PATCH 32/44] Prepare changelog for release 1.0.5 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 061dac4c77..a484ced610 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.0.5 - 2009-07-06 +* Some bug fixes (see mercurial logs for details) + Version 1.0.4 - 2009-05-11 * Some bug fixes (see mercurial logs for details) From 7fc14296656783a414d9b3c3357f891fc505914f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Jul 2009 10:26:48 +0200 Subject: [PATCH 33/44] Added tag 1.0.5 for changeset e06fd2a41f59 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f59169fe25..d042adfd65 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ f34b609e60438846cec0aa7cad1862ad712b2bd2 1.0.1 0a8d0b12206619d7bc95e91cb2b0979937f3cdf6 1.0.2 aa2177eaf0ec6d7b54e41e5deb58ea8fb76478eb 1.0.3 8cd52d78594167e17d3e4c1db28d904fbb6ba53f 1.0.4 +e06fd2a41f595cd0465072060cfb1e8cf3157c91 1.0.5 From 674ea901bd7305678f8ee4fe2a150dac52dad7c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Jul 2009 10:27:46 +0200 Subject: [PATCH 34/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index ce6e1e202f..8ab0829006 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.5', + 'version': '1.0.6', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 0babf442cf45b4a1fc0b4f9cc55c9233f0e6a9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 14 Jul 2009 16:47:53 +0200 Subject: [PATCH 35/44] Use absolute value of amount second currency to compute the amounts to pay for issue1107 --- invoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index fe6b8c8ce8..187571c8e2 100644 --- a/invoice.py +++ b/invoice.py @@ -655,9 +655,9 @@ class Invoice(OSV): continue if line.second_currency.id == invoice.currency.id: if line.debit - line.credit > Decimal('0.0'): - amount_currency += line.amount_second_currency + amount_currency += abs(line.amount_second_currency) else: - amount_currency -= line.amount_second_currency + amount_currency -= abs(line.amount_second_currency) else: amount += line.debit - line.credit for line in invoice.payment_lines: @@ -665,9 +665,9 @@ class Invoice(OSV): continue if line.second_currency.id == invoice.currency.id: if line.debit - line.credit > Decimal('0.0'): - amount_currency += line.amount_second_currency + amount_currency += abs(line.amount_second_currency) else: - amount_currency -= line.amount_second_currency + amount_currency -= abs(line.amount_second_currency) else: amount += line.debit - line.credit if invoice.type in ('in_invoice', 'out_credit_note'): From 117860277b2ebc7f37cb5a4fb16ed44027c96787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 31 Aug 2009 10:14:30 +0200 Subject: [PATCH 36/44] Prepare changelog for release 1.0.6 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a484ced610..613b7fe873 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.0.6 - 2009-08-31 +* Some bug fixes (see mercurial logs for details) + Version 1.0.5 - 2009-07-06 * Some bug fixes (see mercurial logs for details) From 10a8372703b6d9ccf7fdc7d05cc6bf754b0884e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 31 Aug 2009 10:14:38 +0200 Subject: [PATCH 37/44] Added tag 1.0.6 for changeset dee84f6b13ed --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d042adfd65..644cc9cdac 100644 --- a/.hgtags +++ b/.hgtags @@ -4,3 +4,4 @@ f34b609e60438846cec0aa7cad1862ad712b2bd2 1.0.1 aa2177eaf0ec6d7b54e41e5deb58ea8fb76478eb 1.0.3 8cd52d78594167e17d3e4c1db28d904fbb6ba53f 1.0.4 e06fd2a41f595cd0465072060cfb1e8cf3157c91 1.0.5 +dee84f6b13ed608a700ed7af94884d0450ff6687 1.0.6 From c4d142ba9466885df3f1afb32a93ee79adb2f1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 31 Aug 2009 10:16:16 +0200 Subject: [PATCH 38/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 8ab0829006..33fc03befb 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.6', + 'version': '1.0.7', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', From 0d2e2646aed7aa4cb5ac2f06cdf648b51009f2fe Mon Sep 17 00:00:00 2001 From: Korbinian Preisler Date: Tue, 8 Sep 2009 21:52:19 +0200 Subject: [PATCH 39/44] use given date for computation of amount with differing currency instead of currenct date (transplanted from 8b325f26eb8b9ed0020933493e0c7862c1fc713b) --- invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index 187571c8e2..03c6486d03 100644 --- a/invoice.py +++ b/invoice.py @@ -2259,7 +2259,7 @@ class PayInvoice(Wizard): ctx['date'] = data['form']['date'] amount = currency_obj.compute(cursor, user, data['form']['currency'], data['form']['amount'], invoice.company.currency, - context=context) + context=ctx) res = invoice_obj.get_reconcile_lines_for_amount(cursor, user, invoice, amount) if res[1] == Decimal('0.0'): @@ -2301,7 +2301,7 @@ class PayInvoice(Wizard): ctx['date'] = data['form']['date'] amount = currency_obj.compute(cursor, user, data['form']['currency'], data['form']['amount'], invoice.company.currency, - context=context) + context=ctx) reconcile_lines = invoice_obj.get_reconcile_lines_for_amount(cursor, user, invoice, amount) From 3527354389acb1c6cb60d26c30ce89d9b8163c4d Mon Sep 17 00:00:00 2001 From: Korbinian Preisler Date: Thu, 10 Sep 2009 14:55:18 +0200 Subject: [PATCH 40/44] fix change of sequence on period for issue1170 (transplanted from cb1385d2b4487063f1c3565261e6f900a61d874a) --- invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index 03c6486d03..24fc5e13f5 100644 --- a/invoice.py +++ b/invoice.py @@ -2107,8 +2107,8 @@ class Period(OSV): period[sequence].id != \ vals[sequence]: if invoice_obj.search(cursor, user, [ - ('date', '>=', period.start_date), - ('date', '<=', period.end_date), + ('invoice_date', '>=', period.start_date), + ('invoice_date', '<=', period.end_date), ('number', '!=', False), ('type', '=', sequence[:-9]), ], context=context): From f7dd0f9320dbe034da4cdd981e2ecffcaa133006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 6 Oct 2009 14:27:30 +0200 Subject: [PATCH 41/44] Allow to modify tax lines from canceled invoice for issue1214 (transplanted from ada2aaa17d617b30b38fdd87487822fe0ba325c3) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 24fc5e13f5..bb697618d3 100644 --- a/invoice.py +++ b/invoice.py @@ -1709,7 +1709,7 @@ class InvoiceTax(OSV): Check if the taxes can be modified ''' for tax in self.browse(cursor, user, ids, context=context): - if tax.invoice.state in ('open', 'paid', 'cancel'): + if tax.invoice.state in ('open', 'paid'): self.raise_user_error(cursor, 'modify', context=context) return From b7341d94dcdf82271b1e7d22de31d3e5446a9e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 23 Nov 2009 18:53:17 +0100 Subject: [PATCH 42/44] Prepare release 1.0.7 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 613b7fe873..a378419d24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 1.0.7 - 2009-11-23 +* Some bug fixes (see mercurial logs for details) + Version 1.0.6 - 2009-08-31 * Some bug fixes (see mercurial logs for details) From 35bf1ba19b9b5b721f4c52a7ab22307b3be8ca75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 23 Nov 2009 18:53:21 +0100 Subject: [PATCH 43/44] Added tag 1.0.7 for changeset eded792195ce --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 644cc9cdac..a7c3dd33c1 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,4 @@ aa2177eaf0ec6d7b54e41e5deb58ea8fb76478eb 1.0.3 8cd52d78594167e17d3e4c1db28d904fbb6ba53f 1.0.4 e06fd2a41f595cd0465072060cfb1e8cf3157c91 1.0.5 dee84f6b13ed608a700ed7af94884d0450ff6687 1.0.6 +eded792195ce8dccdf617cb5feb12a7ecbc08dbe 1.0.7 From cbf7beb3bf46a152ecdaac1b25fcc92f36b1ed12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 23 Nov 2009 18:54:59 +0100 Subject: [PATCH 44/44] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 33fc03befb..754a6f2875 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -5,7 +5,7 @@ 'name_de_DE': 'Buchhaltung Rechnungsstellung', 'name_fr_FR': 'Facturation', 'name_es_ES': 'Facturación', - 'version': '1.0.7', + 'version': '1.0.8', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/',