← Back to team overview

openobject-italia-core-devs team mailing list archive

[Merge] lp:~icsergio/openobject-italia/adding_l10n_it_vat_registries into lp:openobject-italia/7.0

 

Sergio Corato has proposed merging lp:~icsergio/openobject-italia/adding_l10n_it_vat_registries into lp:openobject-italia/7.0.

Requested reviews:
  OpenERP Italia core devs (openobject-italia-core-devs)

For more details, see:
https://code.launchpad.net/~icsergio/openobject-italia/adding_l10n_it_vat_registries/+merge/142417
-- 
https://code.launchpad.net/~icsergio/openobject-italia/adding_l10n_it_vat_registries/+merge/142417
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~icsergio/openobject-italia/adding_l10n_it_vat_registries into lp:openobject-italia/7.0.
=== added directory 'l10n_it_vat_registries'
=== added file 'l10n_it_vat_registries/AUTHORS.txt'
--- l10n_it_vat_registries/AUTHORS.txt	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/AUTHORS.txt	2013-01-08 23:03:22 +0000
@@ -0,0 +1,2 @@
+Lorenzo Battistini <lorenzo.battistini@xxxxxxxxxxxx>
+Ingrid Barcaro

=== added file 'l10n_it_vat_registries/__init__.py'
--- l10n_it_vat_registries/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/__init__.py	2013-01-08 23:03:22 +0000
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>). 
+#    All Rights Reserved
+#
+#    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 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/>.
+#
+##############################################################################
+
+import wizard
+import account
+import invoice

=== added file 'l10n_it_vat_registries/__openerp__.py'
--- l10n_it_vat_registries/__openerp__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/__openerp__.py	2013-01-08 23:03:22 +0000
@@ -0,0 +1,43 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011-2012 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>). 
+#    Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#    All Rights Reserved
+#
+#    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 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/>.
+#
+##############################################################################
+{
+    'name': 'Italian Localisation - VAT Registries',
+    'version': '0.1',
+    'category': 'Localisation/Italy',
+    'description': """Accounting reports for Italian localization - VAT Registries\nhttp://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal""";,
+    'author': 'OpenERP Italian Community',
+    'website': 'http://www.openerp-italia.org',
+    'license': 'AGPL-3',
+    "depends" : ['report_webkit', 'l10n_it_account', 'l10n_it_partially_deductible_vat'],
+    "init_xml" : [
+        ],
+    "update_xml" : [
+        'reports.xml',
+        'account_view.xml',
+        'wizard/print_registro_iva.xml',
+        ],
+    "demo_xml" : [],
+    "active": False,
+    "installable": True
+}

=== added file 'l10n_it_vat_registries/account.py'
--- l10n_it_vat_registries/account.py	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/account.py	2013-01-08 23:03:22 +0000
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2011-2012 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#    Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>)
+#    Copyright (C) 2012 Domsense srl (<http://www.domsense.com>)
+#    All Rights Reserved
+#
+#    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 fields, osv
+from tools.translate import _
+
+
+class account_tax(osv.osv):
+
+    _inherit = 'account.tax'
+    _columns = {
+        'exclude_from_registries': fields.boolean(
+            'Exclude from VAT registries'),
+        'base_tax_ids': fields.one2many(
+            'account.tax', 'base_code_id', 'Base Taxes'),  # serve ancora?
+        }
+    _sql_constraints = [
+        ('name_uniq', 'UNIQUE(name)', 'The tax name must be unique!'),
+    ]
+
+    def get_account_tax(self, inv_tax):
+        if inv_tax.tax_code_id:
+            return self.get_account_tax_by_tax_code(inv_tax.tax_code_id)
+        if inv_tax.base_code_id:
+            return self.get_account_tax_by_base_code(inv_tax.base_code_id)
+        raise osv.except_osv(_('Error'),
+            _('No tax codes for invoice tax %s') % str(inv_tax.name))
+

=== added file 'l10n_it_vat_registries/account_view.xml'
--- l10n_it_vat_registries/account_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/account_view.xml	2013-01-08 23:03:22 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record id="view_tax_form" model="ir.ui.view">
+            <field name="name">account.tax.form</field>
+            <field name="model">account.tax</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="account.view_tax_form"></field>
+            <field name="arch" type="xml">
+                <field name="active" position="after">
+                    <field name="exclude_from_registries"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

=== added directory 'l10n_it_vat_registries/i18n'
=== added file 'l10n_it_vat_registries/i18n/it.po'
--- l10n_it_vat_registries/i18n/it.po	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/i18n/it.po	2013-01-08 23:03:22 +0000
@@ -0,0 +1,190 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_it_vat_registries
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.3\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-11-30 16:28+0000\n"
+"PO-Revision-Date: 2011-11-30 17:33+0100\n"
+"Last-Translator: Lorenzo Battistini <lorenzo.battistini@xxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:81
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:85
+#, python-format
+msgid "Taxes %s have different rates"
+msgstr "Taxes %s have different rates"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:41
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:81
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:85
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:90
+#, python-format
+msgid "Error"
+msgstr "Error"
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_vendite_report_id
+msgid "Customer Invoices VAT Registry"
+msgstr "Registro IVA Fatture Emesse"
+
+#. module: l10n_it_vat_registries
+#: model:ir.model,name:l10n_it_vat_registries.model_wizard_registro_iva
+msgid "wizard.registro.iva"
+msgstr "wizard.registro.iva"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:90
+#, python-format
+msgid "Wrong tax configuration for tax code %s"
+msgstr "Configurazione sbagliata dell'imposta per il conto imposta %s"
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+msgid "Print"
+msgstr "Stampa"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:119
+#: code:addons/l10n_it_vat_registries/invoice.py:191
+#: code:addons/l10n_it_vat_registries/invoice.py:221
+#, python-format
+msgid "The tax %s is excluded from registries"
+msgstr "L'imposta %s è esclusa dai registri"
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,type:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: l10n_it_vat_registries
+#: selection:wizard.registro.iva,type:0
+msgid "Supplier Invoices"
+msgstr "Fatture ricevute"
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_acquisti_report_id
+msgid "Supplier Invoices VAT Registry"
+msgstr "Registro IVA Fatture Ricevute"
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.act_window,name:l10n_it_vat_registries.action_registro_iva
+msgid "VAT Registry"
+msgstr "Registro IVA"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:263
+#, python-format
+msgid "The tax %s has no tax codes"
+msgstr "L'imposta %s non ha codici IVA"
+
+#. module: l10n_it_vat_registries
+#: field:account.tax,base_tax_ids:0
+msgid "Base Taxes"
+msgstr "Imposte dell'imponibile"
+
+#. module: l10n_it_vat_registries
+#: model:ir.module.module,description:l10n_it_vat_registries.module_meta_information
+msgid ""
+"Accounting reports for Italian localization - VAT Registries\n"
+"http://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal";
+msgstr ""
+"Accounting reports for Italian localization - VAT Registries\n"
+"http://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal";
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+msgid "Tax Journal"
+msgstr "Registro IVA"
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,date_to:0
+msgid "To date"
+msgstr "Alla data"
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+#: field:wizard.registro.iva,journal_ids:0
+msgid "Journals"
+msgstr "Sezionali"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:42
+#, python-format
+msgid "The move %s has different partner account type"
+msgstr "La registrazione %s ha dei tipi di conto legati a partner incongruenti"
+
+#. module: l10n_it_vat_registries
+#: sql_constraint:account.tax:0
+msgid "The tax name must be unique!"
+msgstr "Il nome dell'imposta deve essere unico"
+
+#. module: l10n_it_vat_registries
+#: help:wizard.registro.iva,journal_ids:0
+msgid "Select journals you want retrieve documents from"
+msgstr "Selezionare i sezionali da cui si vuole ottenere i documenti"
+
+#. module: l10n_it_vat_registries
+#: selection:wizard.registro.iva,type:0
+msgid "Corrispettivi"
+msgstr "Corrispettivi"
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:96
+#, python-format
+msgid "No documents found in the current selection"
+msgstr "Nessun documento trovato per la selezione corrente"
+
+#. module: l10n_it_vat_registries
+#: model:ir.module.module,shortdesc:l10n_it_vat_registries.module_meta_information
+msgid "Italian Localisation - VAT Registries"
+msgstr "Localizzazione Italiana - Registri IVA"
+
+#. module: l10n_it_vat_registries
+#: model:ir.ui.menu,name:l10n_it_vat_registries.menu_registro_iva
+msgid "VAT Registries"
+msgstr "Registri IVA"
+
+#. module: l10n_it_vat_registries
+#: field:account.tax,exclude_from_registries:0
+msgid "Exclude from VAT registries"
+msgstr "Escludi dai registri IVA"
+
+#. module: l10n_it_vat_registries
+#: selection:wizard.registro.iva,type:0
+msgid "Customer Invoices"
+msgstr "Fatture emesse"
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_corrispettivi_report_id
+msgid "Corrispettivi VAT Registry"
+msgstr "Registro IVA Corrispettivi"
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,date_from:0
+msgid "From date"
+msgstr "Dalla data"
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+msgid "Cancel"
+msgstr "Annulla"
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,message:0
+msgid "Message"
+msgstr "Messaggio"
+
+#. module: l10n_it_vat_registries
+#: model:ir.model,name:l10n_it_vat_registries.model_account_tax
+msgid "account.tax"
+msgstr "account.tax"
+

=== added file 'l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot'
--- l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/i18n/l10n_it_vat_registries.pot	2013-01-08 23:03:22 +0000
@@ -0,0 +1,185 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_it_vat_registries
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.2\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-08-19 21:40+0000\n"
+"PO-Revision-Date: 2011-08-19 21:40+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: l10n_it_vat_registries
+#: model:ir.module.module,description:l10n_it_vat_registries.module_meta_information
+msgid "Accounting reports for Italian localization - VAT Registries"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.model,name:l10n_it_vat_registries.model_account_tax_code
+msgid "Tax Code"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_vendite_report_id
+msgid "Customer Invoices VAT Registry"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.model,name:l10n_it_vat_registries.model_wizard_registro_iva
+msgid "wizard.registro.iva"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+msgid "Print"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,type:0
+msgid "Type"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: selection:wizard.registro.iva,type:0
+msgid "Supplier Invoices"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_acquisti_report_id
+msgid "Supplier Invoices VAT Registry"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.act_window,name:l10n_it_vat_registries.action_registro_iva
+msgid "VAT Registry"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:116
+#, python-format
+msgid "The tax %s has no tax codes"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:account.tax,base_tax_ids:0
+#: field:account.tax.code,base_tax_ids:0
+msgid "Base Taxes"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:70
+#: code:addons/l10n_it_vat_registries/invoice.py:91
+#, python-format
+msgid "The tax %s is excluded from registries"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+msgid "Tax Journal"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,date_to:0
+msgid "To date"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+#: field:wizard.registro.iva,journal_ids:0
+msgid "Journals"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: sql_constraint:account.tax:0
+msgid "The tax name must be unique!"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: help:wizard.registro.iva,journal_ids:0
+msgid "Select journals you want retrieve documents from"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:account.tax.code,tax_ids:0
+msgid "Taxes"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: selection:wizard.registro.iva,type:0
+msgid "Corrispettivi"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/wizard/print_registro_iva.py:94
+#, python-format
+msgid "No documents found in the current selection"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.module.module,shortdesc:l10n_it_vat_registries.module_meta_information
+msgid "Italian Localisation - VAT Registries"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.ui.menu,name:l10n_it_vat_registries.menu_registro_iva
+msgid "VAT Registries"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:52
+#, python-format
+msgid "Too many taxes with name %s"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: constraint:account.tax.code:0
+msgid "Error ! You can not create recursive accounts."
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:account.tax,exclude_from_registries:0
+msgid "Exclude from VAT registries"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: selection:wizard.registro.iva,type:0
+msgid "Customer Invoices"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.actions.report.xml,name:l10n_it_vat_registries.registro_iva_corrispettivi_report_id
+msgid "Corrispettivi VAT Registry"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,date_from:0
+msgid "From date"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: code:addons/l10n_it_vat_registries/invoice.py:50
+#, python-format
+msgid "The tax %s does not exist"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: view:wizard.registro.iva:0
+msgid "Cancel"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: field:wizard.registro.iva,message:0
+msgid "Message"
+msgstr ""
+
+#. module: l10n_it_vat_registries
+#: model:ir.model,name:l10n_it_vat_registries.model_account_tax
+msgid "account.tax"
+msgstr ""
+

=== added directory 'l10n_it_vat_registries/images'
=== added file 'l10n_it_vat_registries/images/registro-iva-corrispettivi.png'
Binary files l10n_it_vat_registries/images/registro-iva-corrispettivi.png	1970-01-01 00:00:00 +0000 and l10n_it_vat_registries/images/registro-iva-corrispettivi.png	2013-01-08 23:03:22 +0000 differ
=== added file 'l10n_it_vat_registries/images/registro-iva-fatture-emesse.png'
Binary files l10n_it_vat_registries/images/registro-iva-fatture-emesse.png	1970-01-01 00:00:00 +0000 and l10n_it_vat_registries/images/registro-iva-fatture-emesse.png	2013-01-08 23:03:22 +0000 differ
=== added file 'l10n_it_vat_registries/invoice.py'
--- l10n_it_vat_registries/invoice.py	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/invoice.py	2013-01-08 23:03:22 +0000
@@ -0,0 +1,357 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    Copyright (C) 2011 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>).
+#    All Rights Reserved
+#
+#    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/>.
+#
+##############################################################################
+
+import time
+from report import report_sxw
+from tools.translate import _
+from decimal import *
+import netsvc
+
+class Parser(report_sxw.rml_parse):
+
+    logger = netsvc.Logger()
+
+    def _get_partner_type(self, move_line):
+        partner_type = ''
+        for line in move_line.move_id.line_id:
+            if line.account_id.type == 'payable' or line.account_id.type == 'receivable':
+                if not partner_type:
+                    partner_type = line.account_id.type
+                elif partner_type != line.account_id.type:
+                    raise Exception(
+                        _('The move %s has different partner account type') % move_line.move_id.name)
+        return partner_type
+
+    def _move_total(self, move_line):
+        partner_type = self._get_partner_type(move_line)
+        total = 0.0
+        for line in move_line.move_id.line_id:
+            if line.account_id.type == partner_type:
+                total += (line.debit or line.credit)
+        return total
+
+    # Metto al tax code il segno dell'importo dell'imposta.
+    # Il tax code ha l'importo in valuta base, ma ha segno negativo per l'IVA a credito (da stampare positiva)
+    # e per le note di credito (da stampare negative)
+    def _get_amount_with_sign(self, tax_code_amount, amount):
+        return abs(tax_code_amount) * cmp(amount, 0)
+
+    def _is_refund(self, move_line):
+        if self._get_partner_type(move_line) == 'receivable' and move_line.debit > move_line.credit:
+            return True
+        if self._get_partner_type(move_line) == 'payable' and move_line.debit < move_line.credit:
+            return True
+
+    def _get_line_amount_with_sign(self, move_line):
+        if self._get_partner_type(move_line) == 'receivable':
+            return self._get_amount_with_sign(move_line.tax_amount, move_line.credit - move_line.debit)
+        if self._get_partner_type(move_line) == 'payable':
+            return self._get_amount_with_sign(move_line.tax_amount, move_line.debit - move_line.credit)
+
+    # in valuta base
+    def _get_invoice_amount_total(self, invoice):
+        total = 0.0
+        for inv_tax in invoice.tax_line:
+            total += self._get_amount_with_sign(inv_tax.base_amount, inv_tax.base) \
+                + self._get_amount_with_sign(inv_tax.tax_amount, inv_tax.amount)
+        return total
+
+    # in valuta base
+    def _get_invoice_amount_untaxed(self, invoice):
+        total = 0.0
+        for inv_tax in invoice.tax_line:
+            total += self._get_amount_with_sign(inv_tax.base_amount, inv_tax.base)
+        return total
+
+    def _get_tax_lines(self, move):
+        res=[]
+        tax_obj = self.pool.get('account.tax')
+        cur_pool = self.pool.get('res.currency')
+        inv_pool = self.pool.get('account.invoice')
+        # index è usato per non ripetere la stampa dei dati fattura quando ci sono più codici IVA
+        index=0
+        totale_iva = 0.0
+        totale_iva_inded = 0.0
+        invoice_amount_total = 0.0
+        invoice_amount_untaxed = 0.0
+        related_invoices = []
+
+        ''' riusciamo a essere sempre indipendenti dalle fatture?
+        # se c'è l'oggetto fattura, utilizzo il calcolo su fattura
+        for move_line in move.line_id:
+            if move_line.invoice and move_line.invoice.id not in related_invoices:
+                related_invoices.append(move_line.invoice.id)
+        '''
+
+        if related_invoices:
+            for invoice_id in related_invoices:
+                return self._get_tax_lines_by_invoice(inv_pool.browse(self.cr, self.uid, invoice_id))
+
+        for move_line in move.line_id:
+            tax_item = {}
+            if move_line.tax_code_id and move_line.tax_code_id.tax_ids:
+                # Nel wizard ho già controllato che le eventuali diverse
+                # imposte abbiamo la stessa aliquota.
+                # Le diverse imposte devono comunque usare gli stessi tax code
+                main_tax = tax_obj.get_main_tax(move_line.tax_code_id.tax_ids[0])
+                if main_tax.exclude_from_registries:
+                    self.logger.notifyChannel("l10n_it_vat_registries", netsvc.LOG_INFO,
+                        _('The tax %s is excluded from registries') % main_tax.name)
+                    continue
+                # sommo gli imponibili relativi all'imposta corrente
+                base_amount = 0.0
+                for line in move_line.move_id.line_id:
+                    if line.tax_code_id.id == main_tax.base_code_id.id:
+                        base_amount += self._get_line_amount_with_sign(line)
+                # calcolo % indetraibile
+                actual_tax_amount = base_amount * main_tax.amount
+                actual_tax_amount = cur_pool.round(
+                    self.cr, self.uid, move.company_id.currency_id,
+                    actual_tax_amount)
+                non_deductible = 0.0
+                if abs(actual_tax_amount) != abs(move_line.tax_amount):
+                    non_deductible = 100
+                    if move_line.tax_amount:
+                        non_deductible = 100 - abs((
+                            move_line.tax_amount * 100.0) / actual_tax_amount)
+                        non_deductible = cur_pool.round(
+                            self.cr, self.uid, move.company_id.currency_id,
+                            non_deductible)
+                # calcolo il totale dell'operazione
+                invoice_amount_total = self._move_total(move_line)
+                if self._is_refund(move_line):
+                    invoice_amount_total = - invoice_amount_total
+                str_non_deductible = str(non_deductible).split('.')[0]
+                tax_item = {
+                    'tax_percentage': main_tax.amount and str(
+                        main_tax.amount * 100).split('.')[0] or
+                        move_line.tax_code_id.name,
+                    'tax_code_name': move_line.tax_code_id.name,
+                    'base': base_amount,
+                    'amount': actual_tax_amount,
+                    'non_deductible': str_non_deductible != '0' and
+                        str_non_deductible or '',
+                    'index': index,
+                    'amount_total': invoice_amount_total,
+                    }
+                res.append(tax_item)
+                iva = cur_pool.round(
+                    self.cr, self.uid, move.company_id.currency_id,
+                    (actual_tax_amount * (100 - non_deductible) * 0.01))
+                iva_inded = cur_pool.round(
+                    self.cr, self.uid, move.company_id.currency_id,
+                    (actual_tax_amount * non_deductible * 0.01))
+                tax_difference= (iva + iva_inded) - actual_tax_amount
+                # se risulta un'eccedenza, la tolgo dalla parte detraibile
+                if tax_difference > 0:
+                    iva = iva - tax_difference
+                # se risulta una mancanza, la aggiungo alla parte indetraibile
+                elif tax_difference < 0:
+                    iva_inded = iva_inded + tax_difference
+                totale_iva += iva
+                invoice_amount_untaxed += base_amount
+                totale_iva_inded += iva_inded
+                index += 1
+
+            if tax_item:
+                if tax_item['tax_code_name'] not in self.localcontext[
+                    'tax_codes']:
+                    self.localcontext['tax_codes'][tax_item[
+                        'tax_code_name']] = {
+                        'base': tax_item['base'],
+                        'amount': tax_item['amount'],
+                        }
+                else:
+                    self.localcontext['tax_codes'][tax_item[
+                        'tax_code_name']]['base'] += tax_item['base']
+                    self.localcontext['tax_codes'][tax_item[
+                        'tax_code_name']]['amount'] += tax_item['amount']
+
+        self.localcontext['totali'][
+            'totale_operazioni'] += invoice_amount_total
+        self.localcontext['totali'][
+            'totale_imponibili'] += invoice_amount_untaxed
+        self.localcontext['totali']['totale_iva'] += totale_iva
+        self.localcontext['totali']['totale_iva_inded'] += totale_iva_inded
+
+        return res
+
+    def _get_tax_lines_by_invoice(self, invoice):
+        res=[]
+        tax_obj = self.pool.get('account.tax')
+        # index è usato per non ripetere la stampa dei dati fattura quando ci sono più codici IVA
+        index = 0
+        totale_iva = 0.0
+        totale_iva_inded = 0.0
+        invoice_amount_total = 0.0
+        invoice_amount_untaxed = 0.0
+        for inv_tax in invoice.tax_line:
+            tax_item = {}
+            if inv_tax.base_code_id and inv_tax.tax_code_id:
+                account_tax = tax_obj.get_account_tax(inv_tax)
+                if account_tax.exclude_from_registries:
+                    self.logger.notifyChannel("l10n_it_vat_registries",
+                        netsvc.LOG_INFO, _(
+                        'The tax %s is excluded from registries')
+                        % account_tax.name)
+                    continue
+                account_tax_amount = account_tax.amount
+                invoice_amount_total = self._get_invoice_amount_total(invoice)
+                invoice_amount_untaxed = self._get_invoice_amount_untaxed(
+                    invoice)
+                amount = self._get_amount_with_sign(inv_tax.tax_amount,
+                    inv_tax.amount)
+                base = self._get_amount_with_sign(inv_tax.base_amount,
+                    inv_tax.base)
+                # calcolo le note di credito con segno invertito
+                if invoice.type in ('in_refund', 'out_refund'):
+                    amount = -amount
+                    base = -base
+                    invoice_amount_untaxed = -invoice_amount_untaxed
+                    invoice_amount_total = -invoice_amount_total
+                tax_item = {
+                    'tax_percentage': account_tax_amount and str(
+                        account_tax_amount * 100).split('.')[0] or
+                        inv_tax.tax_code_id.name,
+                    'base': base,
+                    'amount': amount,  # in valuta base
+                    'non_deductible': 0.0,
+                    'index': index,
+                    'amount_total': invoice_amount_total,
+                    }
+                res.append(tax_item)
+                totale_iva += amount
+                index += 1
+            # Se non c'è il tax code imponibile, cerco la tassa relativa alla parte non deducibile
+            elif inv_tax.tax_code_id:
+                tax = tax_obj.get_main_tax(tax_obj.get_account_tax(inv_tax))
+                if tax.exclude_from_registries:
+                    self.logger.notifyChannel("l10n_it_vat_registries",
+                        netsvc.LOG_INFO,
+                        _('The tax %s is excluded from registries') % tax.name)
+                    continue
+                for inv_tax_2 in invoice.tax_line:
+                    if inv_tax_2.base_code_id and not inv_tax_2.tax_code_id:
+                        base_tax = tax_obj.get_main_tax(
+                            tax_obj.get_account_tax(inv_tax_2))
+                        # Se hanno la stessa tassa
+                        if base_tax.id == tax.id:
+                            # Uso il valore assoluto perchè riferendosi
+                            # alla stessa imposta non ci possono essere
+                            # segni differenti
+                            non_deductible = (abs(inv_tax_2.base_amount) /
+                                (abs(inv_tax.base_amount) + abs(
+                                    inv_tax_2.base_amount)) * 100)
+                            invoice_amount_total = \
+                                self._get_invoice_amount_total(invoice)
+                            invoice_amount_untaxed = \
+                                self._get_invoice_amount_untaxed(invoice)
+                            amount = self._get_amount_with_sign(
+                                inv_tax.tax_amount, inv_tax.amount)
+                            base = self._get_amount_with_sign(
+                                inv_tax.base_amount, inv_tax.base)
+                            amount2 = self._get_amount_with_sign(
+                                inv_tax_2.tax_amount, inv_tax_2.amount)
+                            base2 = self._get_amount_with_sign(
+                                inv_tax_2.base_amount, inv_tax_2.base)
+                            # calcolo le note di credito con segno invertito
+                            if invoice.type in ('in_refund', 'out_refund'):
+                                amount = -amount
+                                base = -base
+                                amount2 = -amount2
+                                base2 = -base2
+                                invoice_amount_untaxed = \
+                                    -invoice_amount_untaxed
+                                invoice_amount_total = -invoice_amount_total
+                            tax_item = {
+                                'tax_percentage': base_tax.amount and str(
+                                    base_tax.amount * 100).split('.')[0] or
+                                    inv_tax.tax_code_id.name,
+                                'base': base + base2,
+                                'amount': amount + amount2,
+                                'non_deductible': non_deductible and str(
+                                    non_deductible).split('.')[0] or '',
+                                'index': index,
+                                'amount_total': invoice_amount_total,
+                                }
+                            res.append(tax_item)
+                            totale_iva += amount
+                            totale_iva_inded += amount2
+                            index += 1
+                            break
+            elif not inv_tax.tax_code_id and not inv_tax.base_code_id:
+                self.logger.notifyChannel("l10n_it_vat_registries",
+                    netsvc.LOG_INFO,
+                    _('The tax %s has no tax codes') % inv_tax.name)
+                continue
+            if tax_item:
+                if tax_item['tax_percentage'] not in self.localcontext[
+                    'tax_codes']:
+                    self.localcontext['tax_codes'][tax_item[
+                        'tax_percentage']] = {
+                        'base': tax_item['base'],
+                        'amount': tax_item['amount'],
+                        }
+                else:
+                    self.localcontext['tax_codes'][tax_item[
+                        'tax_percentage']]['base'] += tax_item['base']
+                    self.localcontext['tax_codes'][tax_item[
+                        'tax_percentage']]['amount'] += tax_item['amount']
+
+        self.localcontext['totali'][
+            'totale_operazioni'] += invoice_amount_total
+        self.localcontext['totali'][
+            'totale_imponibili'] += invoice_amount_untaxed
+# da analizzare           self.totale_variazioni += invoice.amount_total
+        self.localcontext['totali']['totale_iva'] += totale_iva
+        self.localcontext['totali']['totale_iva_inded'] += totale_iva_inded
+
+        return res
+
+    def __init__(self, cr, uid, name, context):
+        super(Parser, self).__init__(cr, uid, name, context)
+        self.localcontext.update({
+            'time': time,
+            'tax_lines': self._get_tax_lines,
+            'totali': {
+                'totale_operazioni': 0.0,
+                'totale_imponibili': 0.0,
+                'totale_variazioni': 0.0,
+                'totale_iva': 0.0,
+                'totale_iva_inded': 0.0,
+                },
+            'tax_codes': {},
+        })
+
+
+report_sxw.report_sxw('report.registro_iva_vendite',
+                       'registro_iva_vendite',
+                       'addons/l10n_it_vat_registries/templates/registro_iva_vendite.mako',
+                       parser=Parser)
+report_sxw.report_sxw('report.registro_iva_acquisti',
+                       'registro_iva_acquisti',
+                       'addons/l10n_it_vat_registries/templates/registro_iva_acquisti.mako',
+                       parser=Parser)
+report_sxw.report_sxw('report.registro_iva_corrispettivi',
+                       'registro_iva_corrispettivi',
+                       'addons/l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako',
+                       parser=Parser)

=== added file 'l10n_it_vat_registries/reports.xml'
--- l10n_it_vat_registries/reports.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/reports.xml	2013-01-08 23:03:22 +0000
@@ -0,0 +1,268 @@
+<?xml version="1.0"?>
+<openerp>
+    <data noupdate="1">
+        <record id="ir_header_webkit_vat_registry_sale" model="ir.header_webkit">
+            <field name="orientation">Landscape</field>
+            <field name="format">A4</field>
+            <field name="margin_top">60</field>
+            <field name="html"><![CDATA[<html>
+    <head>
+        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+        <script>
+            function subst() {
+            var vars={};
+            var x=document.location.search.substring(1).split('&');
+            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+            for(var i in x) {
+            var y = document.getElementsByClassName(x[i]);
+            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+                }
+            }
+        </script>
+    </head>
+    <body style="border:0; margin: 0;" onload="subst()">
+    <% setLang(company.partner_id.lang or "en_US") %>
+    <h1>Registro I.V.A. Vendite</h1>
+    <h3>${company.partner_id.name or ''|entity}</h3>
+    <table style="border-bottom: 4px solid black; width: 100%; padding-bottom: 8px">
+    <tr>
+    <td>
+    <div>${company.partner_id.street or ''|entity}</div>
+    <div>${company.partner_id.street2 or ''|entity}</div>
+    <div>${company.partner_id.zip or ''|entity}</div>
+    <div>${company.partner_id.city or ''|entity}</div>
+    <div>${company.partner_id.province and company.partner_id.province.code or ''|entity}</div>
+    </td>
+    <td>
+    <div>P. IVA: ${company.partner_id.vat or ''|entity}</div>
+    <div>Codice Fiscale: ${company.partner_id.fiscalcode or ''|entity}</div>
+    <div>Codice Attività:</div>
+    <div>Registro Imprese:</div>
+    </td>
+    </tr>
+    </table>
+    <br/>
+    </body>
+</html>]]>
+</field>
+            <field name="footer_html"><![CDATA[<html>
+    <head>
+        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+        <script>
+            function subst() {
+            var vars={};
+            var x=document.location.search.substring(1).split('&');
+            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+            for(var i in x) {
+            var y = document.getElementsByClassName(x[i]);
+            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+                }
+            }
+        </script>
+    </head>
+    <body style="border:0; margin: 0;" onload="subst()">
+        <table style="border-top: 1px solid black; width: 100%">
+            <tr >
+                <td style="text-align:right;font-size:12;" width="95%">Page ${objects[0].period_id and objects[0].period_id.fiscalyear_id and objects[0].period_id.fiscalyear_id.name or ''|entity}/<span class="page"/></td><td style="text-align:left;font-size:12;"></td>
+            </tr>
+        </table>
+    </body>
+</html>]]></field><field name="css" ><![CDATA[
+tr {
+    page-break-inside: avoid;
+}
+thead{
+    display: table-header-group; /* http://code.google.com/p/wkhtmltopdf/issues/detail?id=9#c8 */
+}
+]]> </field>
+            <field  name="name">Registro IVA vendite</field>
+        </record>
+        <record id="ir_header_webkit_vat_registry_purchase" model="ir.header_webkit">
+            <field name="orientation">Landscape</field>
+            <field name="format">A4</field>
+            <field name="margin_top">60</field>
+            <field name="html"><![CDATA[<html>
+    <head>
+        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+        <script>
+            function subst() {
+            var vars={};
+            var x=document.location.search.substring(1).split('&');
+            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+            for(var i in x) {
+            var y = document.getElementsByClassName(x[i]);
+            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+                }
+            }
+        </script>
+    </head>
+    <body style="border:0; margin: 0;" onload="subst()">
+    <% setLang(company.partner_id.lang or "en_US") %>
+    <h1>Registro I.V.A. Acquisti</h1>
+    <h3>${company.partner_id.name or ''|entity}</h3>
+    <table style="border-bottom: 4px solid black; width: 100%; padding-bottom: 8px">
+    <tr>
+    <td>
+    <div>${company.partner_id.street or ''|entity}</div>
+    <div>${company.partner_id.street2 or ''|entity}</div>
+    <div>${company.partner_id.zip or ''|entity}</div>
+    <div>${company.partner_id.city or ''|entity}</div>
+    <div>${company.partner_id.province and company.partner_id.province.code or ''|entity}</div>
+    </td>
+    <td>
+    <div>P. IVA: ${company.partner_id.vat or ''|entity}</div>
+    <div>Codice Fiscale: ${company.partner_id.fiscalcode or ''|entity}</div>
+    <div>Codice Attività:</div>
+    <div>Registro Imprese:</div>
+    </td>
+    </tr>
+    </table>
+    <br/>
+    </body>
+</html>]]>
+</field>
+            <field name="footer_html"><![CDATA[<html>
+    <head>
+        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+        <script>
+            function subst() {
+            var vars={};
+            var x=document.location.search.substring(1).split('&');
+            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+            for(var i in x) {
+            var y = document.getElementsByClassName(x[i]);
+            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+                }
+            }
+        </script>
+    </head>
+    <body style="border:0; margin: 0;" onload="subst()">
+        <table style="border-top: 1px solid black; width: 100%">
+            <tr >
+                <td style="text-align:right;font-size:12;" width="95%">Page ${objects[0].period_id and objects[0].period_id.fiscalyear_id and objects[0].period_id.fiscalyear_id.name or ''|entity}/<span class="page"/></td><td style="text-align:left;font-size:12;"></td>
+            </tr>
+        </table>
+    </body>
+</html>]]></field><field name="css" ><![CDATA[
+tr {
+    page-break-inside: avoid;
+}
+thead{
+    display: table-header-group; /* http://code.google.com/p/wkhtmltopdf/issues/detail?id=9#c8 */
+}
+]]> </field>
+            <field  name="name">Registro IVA acquisti</field>
+        </record>
+        <record id="ir_header_webkit_vat_registry_corrispettivi" model="ir.header_webkit">
+            <field name="orientation">Landscape</field>
+            <field name="format">A4</field>
+            <field name="margin_top">60</field>
+            <field name="html"><![CDATA[<html>
+    <head>
+        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+        <script>
+            function subst() {
+            var vars={};
+            var x=document.location.search.substring(1).split('&');
+            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+            for(var i in x) {
+            var y = document.getElementsByClassName(x[i]);
+            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+                }
+            }
+        </script>
+    </head>
+    <body style="border:0; margin: 0;" onload="subst()">
+    <% setLang(company.partner_id.lang or "en_US") %>
+    <h1>Registro I.V.A. Corrispettivi</h1>
+    <h3>${company.partner_id.name or ''|entity}</h3>
+    <table style="border-bottom: 4px solid black; width: 100%; padding-bottom: 8px">
+    <tr>
+    <td>
+    <div>${company.partner_id.street or ''|entity}</div>
+    <div>${company.partner_id.street2 or ''|entity}</div>
+    <div>${company.partner_id.zip or ''|entity}</div>
+    <div>${company.partner_id.city or ''|entity}</div>
+    <div>${company.partner_id.province and company.partner_id.province.code or ''|entity}</div>
+    </td>
+    <td>
+    <div>P. IVA: ${company.partner_id.vat or ''|entity}</div>
+    <div>Codice Fiscale: ${company.partner_id.fiscalcode or ''|entity}</div>
+    <div>Codice Attività:</div>
+    <div>Registro Imprese:</div>
+    </td>
+    </tr>
+    </table>
+    <br/>
+    </body>
+</html>]]>
+</field>
+            <field name="footer_html"><![CDATA[<html>
+    <head>
+        <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
+        <script>
+            function subst() {
+            var vars={};
+            var x=document.location.search.substring(1).split('&');
+            for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
+            var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
+            for(var i in x) {
+            var y = document.getElementsByClassName(x[i]);
+            for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
+                }
+            }
+        </script>
+    </head>
+    <body style="border:0; margin: 0;" onload="subst()">
+        <table style="border-top: 1px solid black; width: 100%">
+            <tr >
+                <td style="text-align:right;font-size:12;" width="95%">Page ${objects[0].period_id and objects[0].period_id.fiscalyear_id and objects[0].period_id.fiscalyear_id.name or ''|entity}/<span class="page"/></td><td style="text-align:left;font-size:12;"></td>
+            </tr>
+        </table>
+    </body>
+</html>]]></field><field name="css" ><![CDATA[
+tr {
+    page-break-inside: avoid;
+}
+thead{
+    display: table-header-group; /* http://code.google.com/p/wkhtmltopdf/issues/detail?id=9#c8 */
+}
+]]> </field>
+            <field  name="name">Registro IVA corrispettivi</field>
+        </record>
+
+        <record id="registro_iva_vendite_report_id" model="ir.actions.report.xml">
+            <field name="name">Customer Invoices VAT Registry</field>
+            <field name="type">ir.actions.report.xml</field>
+            <field name="model">account.move</field>
+            <field name="report_name">registro_iva_vendite</field>
+            <field name="report_type">webkit</field>
+            <field name="report_rml">l10n_it_vat_registries/templates/registro_iva_vendite.mako</field>
+            <field name="webkit_header" ref="ir_header_webkit_vat_registry_sale"/>
+        </record>
+        <record id="registro_iva_acquisti_report_id" model="ir.actions.report.xml">
+            <field name="name">Supplier Invoices VAT Registry</field>
+            <field name="type">ir.actions.report.xml</field>
+            <field name="model">account.move</field>
+            <field name="report_name">registro_iva_acquisti</field>
+            <field name="report_type">webkit</field>
+            <field name="report_rml">l10n_it_vat_registries/templates/registro_iva_acquisti.mako</field>
+            <field name="webkit_header" ref="ir_header_webkit_vat_registry_purchase"/>
+        </record>
+        <record id="registro_iva_corrispettivi_report_id" model="ir.actions.report.xml">
+            <field name="name">Corrispettivi VAT Registry</field>
+            <field name="type">ir.actions.report.xml</field>
+            <field name="model">account.move</field>
+            <field name="report_name">registro_iva_corrispettivi</field>
+            <field name="report_type">webkit</field>
+            <field name="report_rml">l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako</field>
+            <field name="webkit_header" ref="ir_header_webkit_vat_registry_corrispettivi"/>
+        </record>
+    </data>
+</openerp>
+

=== added directory 'l10n_it_vat_registries/templates'
=== added file 'l10n_it_vat_registries/templates/registro_iva_acquisti.mako'
--- l10n_it_vat_registries/templates/registro_iva_acquisti.mako	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/templates/registro_iva_acquisti.mako	2013-01-08 23:03:22 +0000
@@ -0,0 +1,169 @@
+<html>
+<head>
+    <style type="text/css">
+        ${css}
+        .left_with_line {
+            text-align:left; vertical-align:text-top; border-top:1px solid #000; padding:5px
+        }
+        .right_with_line {
+            text-align:right; vertical-align:text-top; border-top:1px solid #000; padding:5px
+        }
+        .left_without_line {
+            text-align:left; vertical-align:text-top; padding:5px
+        }
+        .right_without_line {
+            text-align:right; vertical-align:text-top; padding:5px
+        }
+    </style>
+</head>
+<body>
+    <h2>Fatture Ricevute</h2>
+    <% setLang(objects[0].company_id.partner_id.lang or "en_US") %>
+    <table style="width:100%;" cellspacing="0">
+        <thead>
+        <tr>
+            <th class="left_without_line">Data registrazione</th>
+            <th class="left_without_line">Numero</th>
+            <th class="left_without_line">Ragione sociale</th>
+            <th class="left_without_line">Numero fattura</th>
+            <th class="left_without_line">Data fattura</th>
+            <th class="left_without_line">Causale</th>
+            <th class="right_without_line">Totale fattura</th>
+            <th class="right_without_line">Imponibile</th>
+            <th class="right_without_line">% IVA</th>
+            <th class="right_without_line">Imposta</th>
+            <th class="right_without_line">% inded.</th>
+            <th></th>
+        </tr>
+        </thead>
+        <tbody>
+        <% counter = 0 %>
+        %for object in objects :
+            <% counter += 1 %>
+            %for line in tax_lines(object) :
+                %if line['index']==0:
+                    <tr><td class="left_with_line">
+                %else:
+                    <tr><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(object.date,date=True) or '' | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ counter | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${object.partner_id.name  or ''| entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${object.name or ''| entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(object.date,date=True) or '' | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    %if line['amount_total'] >= 0:
+                        Fattura
+                    %else:
+                        Nota di credito
+                    %endif
+                %endif
+                %if line['index']==0:
+                    </td><td class="right_with_line">
+                %else:
+                    </td><td class="right_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(line['amount_total']) | entity}
+                %endif
+                </td>
+                %if line['index']==0:
+                    <td class="right_with_line">${ formatLang(line['base'])  or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ formatLang(line['base'])  or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">${ line['tax_percentage'] or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ line['tax_percentage'] or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">${ formatLang(line['amount'])  or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ formatLang(line['amount'])  or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">
+                %else:
+                    <td class="right_without_line">
+                %endif
+                %if line['non_deductible']:
+                    ${ line['non_deductible'] | entity} %
+                %endif
+                </td>
+                <td></td>
+                </tr>
+            %endfor
+        %endfor
+        </tbody>
+    </table>
+    <div style="page-break-inside: avoid;">
+        <br/>
+        <table style="width:100%;  " border="1">
+            <tr style="border-style:ridge;border-width:5px">
+                <td colspan="4" style="padding:10; ">Periodo di stampa dal <strong>${formatLang(data['form']['date_from'],date=True)| entity}</strong> al <strong>${formatLang(data['form']['date_to'],date=True)| entity}</strong></td>
+            </tr>
+            <tr>
+                <td rowspan="2" style="vertical-align:text-top;padding:10">
+                    <table style="width:100%;">
+                        <tr>
+                            <th style="text-align:left">Descrizione</th>
+                            <th style="text-align:right">Imponibile</th>
+                            <th style="text-align:right">Imposta</th>
+                        </tr>
+                        %for tax_code in tax_codes :
+                        <tr>
+                            <td>${tax_code|entity}
+                            </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['base'])|entity}
+                            </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['amount']) or ''|entity}
+                            </td>
+                        </tr>
+                        %endfor
+                    </table>
+                </td><td style="padding:10">Totale operazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_operazioni'])|entity}</strong></p><br/></td>
+                <td colspan="2" style="padding:10">Totale imponibili:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_imponibili'])|entity}</strong></p><br/></td>
+            </tr>
+            <tr>
+                <td style="padding:10">Totale variazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_variazioni'])|entity}</strong></p><br/></td>
+                <td style="padding:10">Totale IVA Detraibile:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva'])|entity}</strong></p><br/></td>
+                <td style="padding:10">Totale IVA Indetraibile:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva_inded'])|entity}</strong></p><br/></td>
+            </tr>
+        </table>
+    </div>
+</body>
+</html>

=== added file 'l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako'
--- l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/templates/registro_iva_corrispettivi.mako	2013-01-08 23:03:22 +0000
@@ -0,0 +1,127 @@
+<html>
+<head>
+    <style type="text/css">
+        ${css}
+        .left_with_line {
+            text-align:left; vertical-align:text-top; border-top:1px solid #000; padding:5px
+        }
+        .right_with_line {
+            text-align:right; vertical-align:text-top; border-top:1px solid #000; padding:5px
+        }
+        .left_without_line {
+            text-align:left; vertical-align:text-top; padding:5px
+        }
+        .right_without_line {
+            text-align:right; vertical-align:text-top; padding:5px
+        }
+    </style>
+</head>
+<body>
+    <h2>Corrispettivi</h2>
+    <% setLang(objects[0].company_id.partner_id.lang or "en_US") %>
+    <table style="width:100%;" cellspacing="0">
+        <thead>
+        <tr>
+            <th class="left_without_line">Numero</th>
+            <th class="left_without_line">Data registrazione</th>
+            <th class="left_without_line">Causale</th>
+            <th class="right_without_line">Importo totale</th>
+            <th class="right_without_line">Imponibile</th>
+            <th class="right_without_line">% IVA</th>
+            <th class="right_without_line">Imposta</th>
+            <th></th>
+        </tr>
+        </thead>
+        <tbody>
+        <% counter = 0 %>
+        %for object in objects :
+            <% counter += 1 %>
+            %for line in tax_lines(object) :
+                %if line['index']==0:
+                    <tr><td class="left_with_line">
+                %else:
+                    <tr><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ counter | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0: 
+                    ${ formatLang(object.date,date=True) or ''| entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    Corrispettivi
+                %endif
+                %if line['index']==0:
+                    </td><td class="right_with_line">
+                %else:
+                    </td><td class="right_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(line['amount_total']) | entity}
+                %endif
+                </td>
+                %if line['index']==0:
+                    <td class="right_with_line">${ formatLang(line['base'])  or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ formatLang(line['base'])  or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">${ line['tax_percentage'] or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ line['tax_percentage'] or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">${ formatLang(line['amount'])  or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ formatLang(line['amount'])  or ''| entity}</td>
+                %endif
+                <td></td>
+                </tr>
+            %endfor
+        %endfor
+        </tbody>
+    </table>
+    <div style="page-break-inside: avoid;">
+        <br/>
+        <table style="width:100%;  " border="1">
+            <tr style="border-style:ridge;border-width:5px">
+                <td colspan="3" style="padding:10; ">Periodo di stampa dal <strong>${formatLang(data['form']['date_from'],date=True)| entity}</strong> al <strong>${formatLang(data['form']['date_to'],date=True)| entity}</strong></td>
+            </tr>
+            <tr>
+                <td rowspan="2" style="vertical-align:text-top;padding:10">
+                    <table style="width:100%;">
+                        <tr>
+                            <th style="text-align:left">Descrizione</th>
+                            <th style="text-align:right">Imponibile</th>
+                            <th style="text-align:right">Imposta</th>
+                        </tr>
+                        %for tax_code in tax_codes :
+                        <tr>
+                            <td>${tax_code|entity}
+                            </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['base'])|entity}
+                            </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['amount']) or ''|entity}
+                            </td>
+                        </tr>
+                        %endfor
+                    </table>
+                </td><td style="padding:10">Totale operazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_operazioni'])|entity}</strong></p><br/></td>
+                <td style="padding:10">Totale imponibili:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_imponibili'])|entity}</strong></p><br/></td>
+            </tr>
+            <tr>
+                <td style="padding:10">Totale variazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_variazioni'])|entity}</strong></p><br/></td>
+                <td style="padding:10">Totale IVA:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva'])|entity}</strong></p><br/></td>
+            </tr>
+        </table>
+    </div>
+</body>
+</html>

=== added file 'l10n_it_vat_registries/templates/registro_iva_vendite.mako'
--- l10n_it_vat_registries/templates/registro_iva_vendite.mako	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/templates/registro_iva_vendite.mako	2013-01-08 23:03:22 +0000
@@ -0,0 +1,158 @@
+<html>
+<head>
+    <style type="text/css">
+        ${css}
+        .left_with_line {
+            text-align:left; vertical-align:text-top; border-top:1px solid #000; padding:5px
+        }
+        .right_with_line {
+            text-align:right; vertical-align:text-top; border-top:1px solid #000; padding:5px
+        }
+        .left_without_line {
+            text-align:left; vertical-align:text-top; padding:5px
+        }
+        .right_without_line {
+            text-align:right; vertical-align:text-top; padding:5px
+        }
+    </style>
+</head>
+<body>
+    <h2>Fatture Emesse</h2>
+    <% setLang(objects[0].company_id.partner_id.lang or "en_US") %>
+    <table style="width:100%;" cellspacing="0">
+        <thead>
+        <tr>
+            <th class="left_without_line">Data registrazione</th>
+            <th class="left_without_line">Numero</th>
+            <th class="left_without_line">Ragione sociale</th>
+            <th class="left_without_line">Numero fattura</th>
+            <th class="left_without_line">Data fattura</th>
+            <th class="left_without_line">Causale</th>
+            <th class="right_without_line">Totale fattura</th>
+            <th class="right_without_line">Imponibile</th>
+            <th class="right_without_line">% IVA</th>
+            <th class="right_without_line">Imposta</th>
+            <th></th>
+        </tr>
+        </thead>
+        <tbody>
+        <% counter = 0 %>
+        %for object in objects :
+            <% counter += 1 %>
+            %for line in tax_lines(object) :
+                %if line['index']==0:
+                    <tr><td class="left_with_line">
+                %else:
+                    <tr><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(object.date,date=True) or '' | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ counter | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${object.partner_id.name or ''| entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${object.name or ''| entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(object.date,date=True) or '' | entity}
+                %endif
+                %if line['index']==0:
+                    </td><td class="left_with_line">
+                %else:
+                    </td><td class="left_without_line">
+                %endif
+                %if line['index']==0:
+                    %if line['amount_total'] >= 0:
+                        Fattura
+                    %else:
+                        Nota di credito
+                    %endif
+                %endif
+                %if line['index']==0:
+                    </td><td class="right_with_line">
+                %else:
+                    </td><td class="right_without_line">
+                %endif
+                %if line['index']==0:
+                    ${ formatLang(line['amount_total']) | entity}
+                %endif
+                </td>
+                %if line['index']==0:
+                    <td class="right_with_line">${ formatLang(line['base'])  or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ formatLang(line['base'])  or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">${ line['tax_percentage'] or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ line['tax_percentage'] or ''| entity}</td>
+                %endif
+                %if line['index']==0:
+                    <td class="right_with_line">${ formatLang(line['amount'])  or ''| entity}</td>
+                %else:
+                    <td class="right_without_line">${ formatLang(line['amount'])  or ''| entity}</td>
+                %endif
+                <td></td>
+                </tr>
+            %endfor
+        %endfor
+        </tbody>
+    </table>
+    <div style="page-break-inside: avoid;">
+        <br/>
+        <table style="width:100%;  " border="1">
+            <tr style="border-style:ridge;border-width:5px">
+                <td colspan="3" style="padding:10; ">Periodo di stampa dal <strong>${formatLang(data['form']['date_from'],date=True)| entity}</strong> al <strong>${formatLang(data['form']['date_to'],date=True)| entity}</strong></td>
+            </tr>
+            <tr>
+                <td rowspan="2" style="vertical-align:text-top;padding:10">
+                    <table style="width:100%;">
+                        <tr>
+                            <th style="text-align:left">Descrizione</th>
+                            <th style="text-align:right">Imponibile</th>
+                            <th style="text-align:right">Imposta</th>
+                        </tr>
+                        %for tax_code in tax_codes :
+                        <tr>
+                            <td>${tax_code|entity}
+                            </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['base'])|entity}
+                            </td><td style="text-align:right">${formatLang(tax_codes[tax_code]['amount']) or ''|entity}
+                            </td>
+                        </tr>
+                        %endfor
+                    </table>
+                </td><td style="padding:10">Totale operazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_operazioni'])|entity}</strong></p><br/></td>
+                <td style="padding:10">Totale imponibili:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_imponibili'])|entity}</strong></p><br/></td>
+            </tr>
+            <tr>
+                <td style="padding:10">Totale variazioni:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_variazioni'])|entity}</strong></p><br/></td>
+                <td style="padding:10">Totale IVA:<br/><p style="text-align:center"><strong>${formatLang(totali['totale_iva'])|entity}</strong></p><br/></td>
+            </tr>
+        </table>
+    </div>
+</body>
+</html>

=== added directory 'l10n_it_vat_registries/wizard'
=== added file 'l10n_it_vat_registries/wizard/__init__.py'
--- l10n_it_vat_registries/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/wizard/__init__.py	2013-01-08 23:03:22 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>). 
+#    All Rights Reserved
+#
+#    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 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/>.
+#
+##############################################################################
+
+import print_registro_iva

=== added file 'l10n_it_vat_registries/wizard/print_registro_iva.py'
--- l10n_it_vat_registries/wizard/print_registro_iva.py	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/wizard/print_registro_iva.py	2013-01-08 23:03:22 +0000
@@ -0,0 +1,114 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 Associazione OpenERP Italia
+#    (<http://www.openerp-italia.org>). 
+#    All Rights Reserved
+#
+#    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 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 fields,osv
+from tools.translate import _
+import time
+
+class wizard_registro_iva(osv.osv_memory):
+
+    _name = "wizard.registro.iva"
+    _columns = {
+        'date_from': fields.date('From date', required=True),
+        'date_to': fields.date('To date', required=True),
+        'type': fields.selection([
+            ('customer', 'Customer Invoices'),
+            ('supplier', 'Supplier Invoices'),
+            ('corrispettivi', 'Corrispettivi'),
+            ], 'Layout', required=True),
+        'journal_ids': fields.many2many('account.journal', 'registro_iva_journals_rel', 'journal_id', 'registro_id', 'Journals', help='Select journals you want retrieve documents from', required=True),
+        'message': fields.char('Message', size=64, readonly=True),
+        }
+    _defaults = {
+        'type': 'customer',
+        'date_from': lambda * a: time.strftime('%Y-%m-%d'),
+        'date_to': lambda * a: time.strftime('%Y-%m-%d'),
+        #'journal_ids': lambda s, cr, uid, c: s.pool.get('account.journal').search(cr, uid, []),
+        }
+        
+    def counterparts_number(self, move_line):
+        counter = 0
+        if  not move_line.credit:
+            for line in move_line.move_id.line_id:
+                if line.credit:
+                    counter += 1
+        elif not move_line.debit:
+            for line in move_line.move_id.line_id:
+                if line.debit:
+                    counter += 1
+        return counter
+
+    def print_registro(self, cr, uid, ids, context=None):
+        move_ids = []
+        wizard = self.read(cr, uid, ids)[0]
+        move_line_obj = self.pool.get('account.move.line')
+        tax_pool = self.pool.get('account.tax')
+        search_list = []
+        search_list = [
+            ('journal_id', 'in', wizard['journal_ids']),
+            ('move_id.date', '<=', wizard['date_to']),
+            ('move_id.date', '>=', wizard['date_from']),
+            ('move_id.state', '=', 'posted'),
+            ('tax_code_id', '!=', False),
+            ]
+        move_line_ids = move_line_obj.search(cr, uid, search_list, order='date')
+        if context is None:
+            context = {}
+        for move_line in move_line_obj.browse(cr, uid, move_line_ids):
+            # verifico che sia coinvolto un conto imposta legato ad un'imposta tramite conto standard o conto refund
+            if move_line.tax_code_id.tax_ids or move_line.tax_code_id.ref_tax_ids:
+                if move_line.tax_code_id.tax_ids:
+                    if not tax_pool._have_same_rate(move_line.tax_code_id.tax_ids):
+                        raise osv.except_osv(_('Error'), _('Taxes %s have different rates')
+                            % str(move_line.tax_code_id.tax_ids))
+                if move_line.tax_code_id.ref_tax_ids:
+                    if not tax_pool._have_same_rate(move_line.tax_code_id.ref_tax_ids):
+                        raise osv.except_osv(_('Error'), _('Taxes %s have different rates')
+                            % str(move_line.tax_code_id.ref_tax_ids))
+                # controllo che ogni tax code abbia una e una sola imposta
+                ''' non posso farlo per via dell IVA inclusa nel prezzo
+                if len(move_line.tax_code_id.tax_ids) != 1:
+                    raise osv.except_osv(_('Error'), _('Wrong tax configuration for tax code %s')
+                        % move_line.tax_code_id.name)
+                '''
+                if move_line.move_id.id not in move_ids:
+                    move_ids.append(move_line.move_id.id)
+        if not move_ids:
+            self.write(cr, uid,  ids, {'message': _('No documents found in the current selection')})
+            return True
+        datas = {'ids': move_ids}
+        datas['model'] = 'account.move'
+        datas['form'] = wizard
+        datas['move_ids'] = move_ids
+        res= {
+            'type': 'ir.actions.report.xml',
+            'datas': datas,
+        }
+        if wizard['type'] == 'customer':
+            res['report_name'] = 'registro_iva_vendite'
+        elif wizard['type'] == 'supplier':
+            res['report_name'] = 'registro_iva_acquisti'
+        elif wizard['type'] == 'corrispettivi':
+            res['report_name'] = 'registro_iva_corrispettivi'
+        return res
+
+wizard_registro_iva()

=== added file 'l10n_it_vat_registries/wizard/print_registro_iva.xml'
--- l10n_it_vat_registries/wizard/print_registro_iva.xml	1970-01-01 00:00:00 +0000
+++ l10n_it_vat_registries/wizard/print_registro_iva.xml	2013-01-08 23:03:22 +0000
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record id="wizard_registro_iva" model="ir.ui.view">
+            <field name="name">VAT Registry</field>
+            <field name="model">wizard.registro.iva</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Tax Journal">
+                    <field name="date_from"/>
+                    <field name="date_to"/>
+                    <field name="type" colspan="4"/>
+                    <separator string="Journals" colspan="4"/>
+                    <field name="journal_ids" colspan="4" nolabel="1" height="250"/>
+                    <button icon="gtk-cancel" special="cancel" string="Cancel"/>
+                    <button icon="gtk-ok" name="print_registro" string="Print" type="object"/>
+                    <newline/>
+                    <field name="message" nolabel="1" colspan="4"/>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_registro_iva" model="ir.actions.act_window">
+            <field name="name">VAT Registry</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">wizard.registro.iva</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="target">new</field>
+        </record>
+
+        <menuitem
+            name="VAT Registries"
+            parent="account.menu_finance_reporting"
+            action="action_registro_iva"
+            id="menu_registro_iva"
+            icon="STOCK_PRINT"/>
+
+    </data>
+</openerp>


Follow ups