From 4211ccf27343c0e053bc22fbf1820d42bb052cd8 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 9 May 2011 15:13:28 +0200 Subject: [PATCH] Moved the field exclude_from_intrastat_if_present of account.tax from l10n_fr_intrastat_product to intrastat_base, because it should also be used in the module l10n_fr_intrastat_service. Take this field into account in the generation of DEB lines (module l10n_fr_intrastat_service). --- intrastat_base/__init__.py | 1 + intrastat_base/__terp__.py | 1 + intrastat_base/tax.py | 33 +++++++++++++++++++++++++++++++++ intrastat_base/tax_view.xml | 28 ++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 intrastat_base/tax.py create mode 100644 intrastat_base/tax_view.xml diff --git a/intrastat_base/__init__.py b/intrastat_base/__init__.py index c5935680..13ca149b 100644 --- a/intrastat_base/__init__.py +++ b/intrastat_base/__init__.py @@ -22,6 +22,7 @@ import country import product +import tax import partner_address import intrastat_common diff --git a/intrastat_base/__terp__.py b/intrastat_base/__terp__.py index a048ca22..555287d6 100644 --- a/intrastat_base/__terp__.py +++ b/intrastat_base/__terp__.py @@ -45,6 +45,7 @@ Please contact Alexis de Lattre from Akretion for 'security/ir.model.access.csv', 'product_view.xml', 'country_view.xml', + 'tax_view.xml', 'intrastat_menu.xml', ], 'demo_xml': ['intrastat_demo.xml'], diff --git a/intrastat_base/tax.py b/intrastat_base/tax.py new file mode 100644 index 00000000..4d12d329 --- /dev/null +++ b/intrastat_base/tax.py @@ -0,0 +1,33 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Report intrastat base module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import osv, fields + + +class account_tax(osv.osv): + _inherit = "account.tax" + _columns = { + 'exclude_from_intrastat_if_present': fields.boolean('Exclude invoice line from intrastat if this tax is present', help="If this tax is present on an invoice line, this invoice line will be skipped when generating Intrastat Product or Service lines from invoices."), + } + +account_tax() + diff --git a/intrastat_base/tax_view.xml b/intrastat_base/tax_view.xml new file mode 100644 index 00000000..5141c3e2 --- /dev/null +++ b/intrastat_base/tax_view.xml @@ -0,0 +1,28 @@ + + + + + + + + + + intrastat.base.tax + account.tax + form + + + + + + + + + + + +