From 76350214b343eefcf4b5716f76cc54efb4047540 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 2 Oct 2017 09:43:07 +0200 Subject: [PATCH] Add legal notice on taxes issue2329 review35541002 --- CHANGELOG | 1 + tax.py | 6 +++++- view/tax_form.xml | 3 +++ view/tax_template_form.xml | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index e314e0d667..2e782696fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Add legal notice on taxes * Ease creation of new fiscalyear * Drop required on party payable and receivable accounts * Make tax description translatable diff --git a/tax.py b/tax.py index 1f247ad331..39b259519d 100644 --- a/tax.py +++ b/tax.py @@ -380,6 +380,7 @@ class TaxTemplate(sequence_ordered(), ModelSQL, ModelView): digits=(2, 0)) account = fields.Many2One('account.account.template', 'Account Template', domain=[('parent', '=', None)], required=True) + legal_notice = fields.Text("Legal Notice") @classmethod def __setup__(cls): @@ -455,7 +456,8 @@ class TaxTemplate(sequence_ordered(), ModelSQL, ModelView): for field in ('name', 'description', 'sequence', 'amount', 'rate', 'type', 'invoice_base_sign', 'invoice_tax_sign', 'credit_note_base_sign', 'credit_note_tax_sign', - 'start_date', 'end_date', 'update_unit_price'): + 'start_date', 'end_date', 'update_unit_price', + 'legal_notice'): if not tax or getattr(tax, field) != getattr(self, field): res[field] = getattr(self, field) for field in ('group',): @@ -680,6 +682,7 @@ class Tax(sequence_ordered(), ModelSQL, ModelView): 'required': Eval('type') != 'none', 'readonly': Eval('type') == 'none', }, depends=['type']) + legal_notice = fields.Text("Legal Notice", translate=True) template = fields.Many2One('account.tax.template', 'Template') @classmethod @@ -1046,6 +1049,7 @@ class TaxableMixin(object): line = {} line['manual'] = False line['description'] = tax.description + line['legal_notice'] = tax.legal_notice line['base'] = base line['amount'] = amount line['tax'] = tax.id if tax else None diff --git a/view/tax_form.xml b/view/tax_form.xml index a26567b3d4..67b43dd052 100644 --- a/view/tax_form.xml +++ b/view/tax_form.xml @@ -66,5 +66,8 @@ this repository contains the full copyright notices and license terms. -->