Browse Source

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).
pull/79/head^2
Alexis de Lattre 13 years ago
parent
commit
4211ccf273
  1. 1
      intrastat_base/__init__.py
  2. 1
      intrastat_base/__terp__.py
  3. 33
      intrastat_base/tax.py
  4. 28
      intrastat_base/tax_view.xml

1
intrastat_base/__init__.py

@ -22,6 +22,7 @@
import country
import product
import tax
import partner_address
import intrastat_common

1
intrastat_base/__terp__.py

@ -45,6 +45,7 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'security/ir.model.access.csv',
'product_view.xml',
'country_view.xml',
'tax_view.xml',
'intrastat_menu.xml',
],
'demo_xml': ['intrastat_demo.xml'],

33
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 <alexis.delattre@akretion.com>
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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()

28
intrastat_base/tax_view.xml

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __terp__.py
-->
<openerp>
<data>
<!-- Add 'exclude_from_intrastat_if_present' on tax form view -->
<record id="intrastat_base_tax" model="ir.ui.view">
<field name="name">intrastat.base.tax</field>
<field name="model">account.tax</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_tax_form"/>
<field name="arch" type="xml">
<data>
<field name="type_tax_use" position="after">
<field name="exclude_from_intrastat_if_present" />
</field>
</data>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save