From e1bd03ea83d9e422c0ec64ca8fe9c92c97d871be Mon Sep 17 00:00:00 2001
From: eLBati
Date: Wed, 5 Sep 2018 12:32:59 +0200
Subject: [PATCH 001/155] copying l10n_it_fatturapa_in from 7.0 as is
---
l10n_it_fatturapa_in/__init__.py | 24 +
l10n_it_fatturapa_in/__openerp__.py | 94 ++
l10n_it_fatturapa_in/i18n/it.po | 570 +++++++
l10n_it_fatturapa_in/models/__init__.py | 24 +
l10n_it_fatturapa_in/models/account.py | 75 +
l10n_it_fatturapa_in/models/attachment.py | 40 +
.../security/ir.model.access.csv | 3 +
l10n_it_fatturapa_in/static/src/img/icon.png | Bin 0 -> 4829 bytes
l10n_it_fatturapa_in/tests/__init__.py | 23 +
.../tests/data/IT01234567890_11002.xml | 134 ++
.../tests/data/IT02780790107_11003.xml | 172 +++
.../tests/data/IT02780790107_11004.xml | 211 +++
.../tests/data/IT02780790107_11005.xml | 214 +++
.../tests/data/IT02780790107_11006.xml | 94 ++
.../tests/data/IT02780790107_11007.xml | 96 ++
.../tests/data/IT03638121008_X11111.xml | 155 ++
.../tests/data/IT05979361218_001.xml | 107 ++
.../tests/data/IT05979361218_002.xml | 103 ++
.../tests/data/IT05979361218_002.xml.p7m | Bin 0 -> 6367 bytes
.../tests/data/IT05979361218_003.xml | 95 ++
.../tests/data/IT05979361218_004.xml | 118 ++
.../tests/data/IT05979361218_005.xml | 109 ++
.../tests/data/IT05979361218_006.XML | 108 ++
.../tests/data/IT05979361218_007.xml | 94 ++
.../tests/data/IT05979361218_008.xml | 90 ++
.../tests/data/IT05979361218_fake.xml.p7m | 1 +
.../tests/test_import_fatturapa_xml.py | 329 ++++
l10n_it_fatturapa_in/views/account_view.xml | 290 ++++
l10n_it_fatturapa_in/views/partner_view.xml | 24 +
l10n_it_fatturapa_in/wizard/__init__.py | 22 +
.../wizard/wizard_import_fatturapa.py | 1373 +++++++++++++++++
.../wizard/wizard_import_fatturapa_view.xml | 34 +
32 files changed, 4826 insertions(+)
create mode 100644 l10n_it_fatturapa_in/__init__.py
create mode 100644 l10n_it_fatturapa_in/__openerp__.py
create mode 100644 l10n_it_fatturapa_in/i18n/it.po
create mode 100644 l10n_it_fatturapa_in/models/__init__.py
create mode 100644 l10n_it_fatturapa_in/models/account.py
create mode 100644 l10n_it_fatturapa_in/models/attachment.py
create mode 100644 l10n_it_fatturapa_in/security/ir.model.access.csv
create mode 100644 l10n_it_fatturapa_in/static/src/img/icon.png
create mode 100644 l10n_it_fatturapa_in/tests/__init__.py
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml.p7m
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_003.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_fake.xml.p7m
create mode 100644 l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
create mode 100644 l10n_it_fatturapa_in/views/account_view.xml
create mode 100644 l10n_it_fatturapa_in/views/partner_view.xml
create mode 100644 l10n_it_fatturapa_in/wizard/__init__.py
create mode 100644 l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
create mode 100644 l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
diff --git a/l10n_it_fatturapa_in/__init__.py b/l10n_it_fatturapa_in/__init__.py
new file mode 100644
index 000000000000..823e6fcb9a56
--- /dev/null
+++ b/l10n_it_fatturapa_in/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2015 AgileBG SAGL
+# Copyright (C) 2015 innoviu Srl
+#
+# 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 . import models
+from . import tests
+from . import wizard
diff --git a/l10n_it_fatturapa_in/__openerp__.py b/l10n_it_fatturapa_in/__openerp__.py
new file mode 100644
index 000000000000..8a8013b893fc
--- /dev/null
+++ b/l10n_it_fatturapa_in/__openerp__.py
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2015 AgileBG SAGL
+# Copyright (C) 2015 innoviu Srl
+#
+# 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 .
+#
+##############################################################################
+{
+ 'name': 'Italian Localization - FatturaPA reception',
+ 'version': '0.1',
+ 'category': 'Localization/Italy',
+ 'summary': 'Electronic invoices reception',
+ 'author': 'Agile Business Group, Innoviu, '
+ 'Odoo Community Association (OCA)',
+ 'description': """
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :alt: License
+
+
+Italian Localization - FatturaPA - Reception
+============================================
+
+This module allows you to receive and parse the fatturaPA XML file version 1.1
+http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm
+received from the Exchange System
+http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm
+
+
+Configuration
+=============
+
+See l10n_it_fatturapa
+
+Usage
+=====
+
+ * Go to knowledge -> Documents
+ * Create a Incoming fatturaPA file
+ * Run Import FatturaPA wizard
+
+Credits
+=======
+
+Contributors
+------------
+
+* Lorenzo Battistini
+* Roberto Onnis
+* Alessio Gerace
+
+Maintainer
+----------
+
+.. image:: http://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: http://odoo-community.org
+
+This module is maintained by the OCA.
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+To contribute to this module, please visit http://odoo-community.org.
+""",
+ 'website': 'http://www.agilebg.com',
+ 'license': 'AGPL-3',
+ "depends": [
+ 'l10n_it_fatturapa',
+ 'partner_firstname',
+ 'stock_invoice_picking_incoterm',
+ 'l10n_it_withholding_tax',
+ ],
+ "data": [
+ 'views/account_view.xml',
+ 'views/partner_view.xml',
+ 'wizard/wizard_import_fatturapa_view.xml',
+ 'security/ir.model.access.csv',
+ ],
+ "installable": True
+}
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
new file mode 100644
index 000000000000..8ccb9628d9b1
--- /dev/null
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -0,0 +1,570 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * l10n_it_fatturapa_in
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: l10n-italy (7.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-11-25 16:46+0000\n"
+"PO-Revision-Date: 2015-11-18 17:08+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Italian (http://www.transifex.com/oca/OCA-l10n-italy-7-0/language/it/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: it\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice,fatturapa_attachment_in_id:0
+msgid "FatturaPA Import File"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1229
+#, python-format
+msgid "Parsing PEM to DER file %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice.line,cod_article_ids:0
+msgid "Cod. Articles"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:97
+#, python-format
+msgid "DatiAnagrafici.Anagrafica.Cognome contains \"%s\". Your System contains \"%s\""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1208
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1228
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1235
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1256
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1263
+#, python-format
+msgid "Errore"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.article.code,code_val:0
+msgid "Code Value"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:res.partner:0
+msgid "FatturaPA Registration"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Inconsistencies"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: selection:account.invoice.line,service_type:0
+msgid "sconto"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1257
+#, python-format
+msgid "Signed Xml file %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,message_unread:0
+msgid "Unread Messages"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:771
+#, python-format
+msgid "tipoDocumento %s not handled"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Related Documents "
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:311
+#, python-format
+msgid "Too many taxes with percentage %s and nature %s found"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1061
+#, python-format
+msgid "Payment method Code %s is incorrect"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:fatturapa.attachment.in:0
+msgid "History"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:453
+#, python-format
+msgid "TipoCassa is not defined "
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,message_ids:0
+msgid "Messages"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:248
+#, python-format
+msgid "REA Office Code ( %s ) not present in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
+#, python-format
+msgid "File is linked to invoices yet"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:232
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:304
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:310
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:452
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:561
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:697
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:743
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1052
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1060
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1084
+#, python-format
+msgid "Error!"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:533
+#, python-format
+msgid "Global invoice discount from DatiGeneraliDocumento"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: help:fatturapa.attachment.in,message_unread:0
+msgid "If checked new messages require your attention."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice.line,service_type:0
+msgid "Service Type"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:fatturapa.attachment.in:0
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_import_fatturapa
+#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_import_fatturapa
+#: view:wizard.import.fatturapa:0
+msgid "Import FatturaPA"
+msgstr "Importa FatturaPA"
+
+#. module: l10n_it_fatturapa_in
+#: help:fatturapa.attachment.in,message_summary:0
+msgid ""
+"Holds the Chatter summary (number of messages, ...). This summary is "
+"directly in html format in order to be inserted in kanban views."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Related Documents"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Welfare Fund Details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:698
+#, python-format
+msgid "Define a purchase journal for this company: \"%s\" (id:%d)."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:562
+#, python-format
+msgid "ModalitaPagamento %s not defined in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,message_follower_ids:0
+msgid "Followers"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Rise Price Discount"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice.line:0
+msgid "Articles Code"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:132
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:171
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:212
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:247
+#, python-format
+msgid "Error !"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "FatturaPA Payment"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice.line,service_start:0
+msgid "Service start at"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:623
+#, python-format
+msgid "Name of Bank with BIC \"%s\" is not set. Can't create bank"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Payments Details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,in_invoice_ids:0
+msgid "In Invoices"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "FatturaPA"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:135
+#, python-format
+msgid ""
+"Two distinct partners with Vat %s and Fiscalcode %s already present in db"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice.line,ftpa_uom:0
+msgid "Fattura Pa Unit of Measure"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:328
+#, python-format
+msgid ""
+"XML contains tax with percentage \"%s\" but it does not exist in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:fatturapa.attachment.in:0
+msgid "on"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:fatturapa.attachment.in:0
+msgid "Invoices"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:fatturapa.attachment.in:0
+msgid "Xml Attachment"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.article.code,invoice_line_id:0
+msgid "Related Invoice line"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:84
+#, python-format
+msgid "DatiAnagrafici.Anagrafica.Nome contains \"%s\". Your System contains \"%s\""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: selection:account.invoice.line,service_type:0
+msgid "abbuono"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,ir_attachment_id:0
+msgid "Attachment"
+msgstr "Allegato"
+
+#. module: l10n_it_fatturapa_in
+#: view:wizard.import.fatturapa:0
+msgid "Import"
+msgstr "Importa"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1120
+#, python-format
+msgid "XML IPA code (%s) different from company IPA code (%s)"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice.line:0
+msgid "Discount Rise Price"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: selection:account.invoice.line,service_type:0
+msgid "premio"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:744
+#, python-format
+msgid "No currency found with code %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:213
+#, python-format
+msgid "ProvinciaAlbo ( %s ) not present in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1053
+#, python-format
+msgid "Payment method Code not found in document"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,message_is_follower:0
+msgid "Is a Follower"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice,inconsistencies:0
+msgid "Import Inconsistencies"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:172
+#, python-format
+msgid "Country Code %s not found in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
+msgid "FatturaPA Article Code"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1085
+#, python-format
+msgid "Attachment Name is Required"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.attachment.in,message_summary:0
+msgid "Summary"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:473
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:770
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
+#, python-format
+msgid "Error"
+msgstr "Errore"
+
+#. module: l10n_it_fatturapa_in
+#: field:fatturapa.article.code,name:0
+msgid "Cod Type"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:305
+#, python-format
+msgid "No tax with percentage %s and nature %s found"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Fattura PA V1.1 Schema"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Attachments"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice
+msgid "Invoice"
+msgstr "Fattura"
+
+#. module: l10n_it_fatturapa_in
+#: selection:account.invoice.line,service_type:0
+msgid "spesa accessoria"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:wizard.import.fatturapa:0
+msgid "Cancel"
+msgstr "Annulla"
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Summary Data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice.line,discount_rise_price_ids:0
+msgid "Discount and Rise Price Details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:337
+#, python-format
+msgid ""
+"Line '%s': Too many taxes with percentage equals to \"%s\"\n"
+"fix it if required"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:fatturapa.attachment.in:0
+msgid "Creation"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Welfare Fund"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1175
+#, python-format
+msgid "Computed amount untaxed %s is different from DatiRiepilogo %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1264
+#, python-format
+msgid "Signed Xml file not decryptable"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
+#, python-format
+msgid "Check PEM file %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1158
+#, python-format
+msgid "Invoice total %s is different from ImportoTotaleDocumento %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
+msgid "FatturaPA import File"
+msgstr "Fattura PA Importazione File"
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Delivery"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Progress Work"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:474
+#, python-format
+msgid "TipoCassa %s is not present in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:wizard.import.fatturapa:0
+msgid "Confirm?"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "FatturaPA attachments"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:653
+#, python-format
+msgid ""
+"BIC is required and not exist in Xml\n"
+"Curr bank data is: \n"
+"IBAN: %s\n"
+"Bank Name: %s\n"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Payments"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: field:account.invoice.line,service_end:0
+msgid "Service end at"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: help:fatturapa.attachment.in,message_ids:0
+msgid "Messages and communication history"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1236
+#, python-format
+msgid "ASN.1 structure is not parsable in DER"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_fattura_pa_in
+#: model:ir.ui.menu,name:l10n_it_fatturapa_in.menu_fattura_pa_in_tree
+msgid "Incoming fatturaPA files"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: view:account.invoice:0
+msgid "Results"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:71
+#, python-format
+msgid ""
+"DatiAnagrafici.Anagrafica.Denominazione contains \"%s\". Your System "
+"contains \"%s\""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:233
+#, python-format
+msgid "RegimeFiscale %s is not present in your system"
+msgstr ""
diff --git a/l10n_it_fatturapa_in/models/__init__.py b/l10n_it_fatturapa_in/models/__init__.py
new file mode 100644
index 000000000000..98b75af48313
--- /dev/null
+++ b/l10n_it_fatturapa_in/models/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2015 AgileBG SAGL
+# Copyright (C) 2015 innoviu Srl
+#
+# 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 . import attachment
+from . import account
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
new file mode 100644
index 000000000000..91a13940e8de
--- /dev/null
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2014 Davide Corio
+#
+# 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 openerp.osv import fields, orm
+
+
+class account_invoice(orm.Model):
+ _inherit = "account.invoice"
+
+ _columns = {
+ 'fatturapa_attachment_in_id': fields.many2one(
+ 'fatturapa.attachment.in', 'FatturaPA Import File',
+ ondelete='restrict'),
+ 'inconsistencies': fields.text('Import Inconsistencies'),
+ }
+
+
+class fatturapa_article_code(orm.Model):
+ # _position = ['2.2.1.3']
+ _name = "fatturapa.article.code"
+ _description = 'FatturaPA Article Code'
+
+ _columns = {
+ 'name': fields.char('Cod Type', size=35),
+ 'code_val': fields.char('Code Value', size=35),
+ 'invoice_line_id': fields.many2one(
+ 'account.invoice.line', 'Related Invoice line',
+ ondelete='cascade', select=True
+ )
+ }
+
+
+class account_invoice_line(orm.Model):
+ # _position = [
+ # '2.2.1.3', '2.2.1.6', '2.2.1.7',
+ # '2.2.1.8', '2.1.1.10'
+ # ]
+ _inherit = "account.invoice.line"
+
+ _columns = {
+ 'cod_article_ids': fields.one2many(
+ 'fatturapa.article.code', 'invoice_line_id',
+ 'Cod. Articles'
+ ),
+ 'service_type': fields.selection([
+ ('SC', 'sconto'),
+ ('PR', 'premio'),
+ ('AB', 'abbuono'),
+ ('AC', 'spesa accessoria'),
+ ], string="Service Type"),
+ 'ftpa_uom': fields.char('Fattura Pa Unit of Measure', size=10),
+ 'service_start': fields.date('Service start at'),
+ 'service_end': fields.date('Service end at'),
+ 'discount_rise_price_ids': fields.one2many(
+ 'discount.rise.price', 'invoice_line_id',
+ 'Discount and Rise Price Details'
+ ),
+ }
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
new file mode 100644
index 000000000000..83d8767d2d67
--- /dev/null
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2015 AgileBG SAGL
+# Copyright (C) 2015 innoviu Srl
+#
+# 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 openerp.osv import fields, orm
+
+
+class FatturaPAAttachmentIn(orm.Model):
+ _name = "fatturapa.attachment.in"
+ _description = "FatturaPA import File"
+ _inherits = {'ir.attachment': 'ir_attachment_id'}
+ _inherit = ['mail.thread']
+
+ _columns = {
+ 'ir_attachment_id': fields.many2one(
+ 'ir.attachment', 'Attachment', required=True, ondelete="cascade"),
+ 'in_invoice_ids': fields.one2many(
+ 'account.invoice', 'fatturapa_attachment_in_id',
+ string="In Invoices", readonly=True),
+ }
+
+ def set_name(self, cr, uid, ids, datas_fname, context=None):
+ return {'value': {'name': datas_fname}}
diff --git a/l10n_it_fatturapa_in/security/ir.model.access.csv b/l10n_it_fatturapa_in/security/ir.model.access.csv
new file mode 100644
index 000000000000..93910a1eca6c
--- /dev/null
+++ b/l10n_it_fatturapa_in/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_fatturapa_attachment_in,access_fatturapa_attachment_in,model_fatturapa_attachment_in,account.group_account_invoice,1,1,1,1
+access_fatturapa_article_code,access_fatturapa_article_code,model_fatturapa_article_code,account.group_account_invoice,1,1,1,1
diff --git a/l10n_it_fatturapa_in/static/src/img/icon.png b/l10n_it_fatturapa_in/static/src/img/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..1f07394c3b7990a313c758a4aaf6eab53e23e072
GIT binary patch
literal 4829
zcmZ`-cQ_l|7mlK0r}iEdvy_@qdlNf+Myg7cR<(%LsJ*GyUbQJj&1j93*rTe%s8D;S
zipJjKm+$%h{@wSv_uS|Fb?-UveeQWroSBIpEfoh9005vh(AS0$t=Yd5c$2s$+}f)q
znwyUe^|S%k|Dq66mP+(cdg|MH0|3;F|4tG>b}k#yN#SE)tV1zR!OqCaO)9&d3ji=Y
zH_+CwL{4vK`zNjaQsVo-1v8L@W2O4^Z5p;2&DX5Gyfaix6NT1fn_xs1vmKA4Z}9G5*bP>lYs0l_86{-EfemL$wYtEX~XFx(6Qx0z}MQ_X8yQ)<{$_5%>mlWCZ#N>H?O@k12f83Q?X?mNv
z#HYs~2E5I{ERY+ui$c)xsv0rr5R?CXO&ad@8pDIJPlO~Gq(q|8in-qU6)4=&IX}i;
zt#|h_RI^AQMCQ{ncU4;^2dx;VDD1vPrkZDxBk~4#gBK*5V_Ym!YFkQ&4f6&31~h(;ym$rC=OmP`=DBt?8Ao-ms#nh
zMy95W(fr=t-aoKd`jj>MTD^R{w)w(mToO`BIf5PatA7%Iz&VG>AR9T&8
z2yhq&;LfnBY{-Tvm_zT$V3L)wuCg5ZqOJ{aHYXcf+afa&DHRo3^-`G5rqgTy0RzDk
zk7HzPO#3O74=9oj1siClfJx~Ol|9T*${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9LI9hS`6o$?LXIJu6S49q>KkY&15rhx(N09=nv|2~SEf@m
z;^Ey-nS%$fF&cLkwH2@NFWs)T$jGE`7j~RUa8A{q|DcfaQg;`J
z59pB*N>*Otvcs&2I&c{xGzbgtc#1$IYsJtJX>;e!ovm4P>cBu;ThHpT1#p2n3AS{8
z^*sAFh11JRMDvP8RXdPC3aS+IGeFAT-!I`Rv46xTBPvEHlX3gh1iSw1hWv({na080
zuZOmYmR*K-qKQ0#QZZHb1wzouY3qn{y-IkJd}kN!U`
r8aiT|hVCWM^FKV(3jG&l)t9W+$TKay
+#
+# 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 . import test_import_fatturapa_xml
+
+checks = [test_import_fatturapa_xml]
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml
new file mode 100644
index 000000000000..a5e9e02cc1b9
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml
@@ -0,0 +1,134 @@
+
+
+
+
+
+ IT
+ 01234567890
+
+ 00001
+ SDI11
+ AAAAAA
+
+
+
+
+
+ IT
+ 02537410900
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 02537410900
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18
+ 123
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+ 1
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+
+
+ IT
+ 24681012141
+
+
+ Trasporto spa
+
+
+ 2012-10-22T16:46:12.000+02:00
+
+
+
+
+ 1
+ LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 27.00
+ 5.95
+ D
+
+
+
+ TP01
+
+ MP01
+ 2015-01-30
+ 32.95
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml
new file mode 100644
index 000000000000..c4b664bd73d4
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml
@@ -0,0 +1,172 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ 00001
+ SDI11
+ AAAAAA
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 09876543210
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-23
+ 125
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+ 1
+ 1
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+ 2
+ 666852
+ 2012-10-01
+ 4
+ 123cba2
+ 456fed2
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 2
+ 1232
+ 2012-08-01
+ 4
+ 123abc2
+ 456def2
+
+
+ 1
+ 2
+ 123
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 1
+ 123abc
+ 456def
+
+
+
+
+ IT
+ 05714511002
+
+
+ Trasporto spa
+
+
+ 2012-10-22T16:46:12.000+02:00
+
+
+
+
+ 1
+ LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 27.00
+ 5.95
+ D
+
+
+
+ TP01
+
+ MP01
+ 2015-01-30
+ 32.95
+
+
+
+ test.png
+ png
+ descrizione test
+ iVBORw0KGgoAA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DefwLNTH7xakvz5u6mDELyHHBpgWkgEEAnp8wAge0e2bVESi8UcIsLMSZPeCgYCb8e6YQbAUz0cx1HZbBaM8/cfeeSRkvPPP9999dVX+bZt246LIaq3bNGvueYaedmIEbjv3nufNAOBB5UXkAs/Y1E4GPyaoeupO9ev95maA8Dll1/u0UR0ddDTo7sdmEIINDU1YeCgQdNWr127ctiwYZBSyoMHDx5XH+3evVt77bXXaMmSJVizfv0KJsR17777bo+JIo8XR8XQbLnnovhs04FaYirlSeni7qFtL4wLvJt6HwEhbqkZd9/G3++ZgdN/MtD923easfeHyaNa5e794RT9b985xD5+x31OPnUVqq+4525G5gPvp5tAIOoufa9Syi0NxqBp5v/865opf9iMaoSWHxkals16DK6Fw1ODgYAfm9glbZxznsvlKONlWGp56KGHvvi5z31ONTQ0yA0bNuhHuVhkO3bsMDOZDCZPmeI8VF2Nl3772zc1wxizd+9eWJblKqVIKUX5fF4dOnTINkOhyKm6/hQAVFZWEgCEQiGHiDB9+vSXhRB/725gtmfqAwcOIGia19y/cuUzQ4YMwZAhQ9zm5mYkk0fZR3v36rt378Y555zj7t27F7+85541hqb98NChQ/3OzMAx5LazbiI9dBtz6sevuYgZ9NsDyQ8guGeB7i4hOYFQHohBKpU1BT9n1LYl//C98zB9o/EkBkC/HtL6goXxGE+P4lEWejkE5y6Iy4PvAqsX2F6DGZ4cty6eg/U3g2untOZb/LMBWLE2tOWfALHSQAlKA+FBwzde1VD3uzox5qLOuR785OGVGze+aFnW8EQi4TAvPWy3abRM02TxeBxpy1oXC4fnzCocZVZTU8MCgYA+evRo2rZtm5o4cSIBwOOPP85efPFFPmLECDZixAjFOW9juocfeWSMct0niQiJZLJTtqH2WZtisRgGlJcfkb/i2muv1e+77z5n49atH80lk283NjX1ipn88gCAdP38xXPn/tW/vn79euOUU04BAGlZFsaPH0+PPvooM00To0eP5g888ABfvHhx3m/f6tWrB+UcZ7ehafHW1tZj9tdgAE7/6EfNKePG2fX19T0ebXds2Ud3rgX79znYMXX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+lM5uMggiIC5xwa5w8rpRYuWbIEnt9Z72bcExkPx2pn7TLU7EZ74qgjrQ51Sx5BrDUEcFWuMxFziQwtz2zHlElTqCY26AMM+/m3jihs3a5KFl0ZMirWV9j4JzByR9TV1QmdMTFi9Ogj8jLv3r0bb775JnK5nG4YxkAQhVwpGec8S0StgUAg/e6776LjSbNLly7Vbr/9dmaa5onMm8F27dpl7Nu3z77qqquOeKe1tbUgpSB1vVS5bgkRGQaQA2MJSNn6SjCI2664ou35wkA0FyxYYLMumNFnagB47NFHoYjO4Zw72Wx277Rp0/CjH/0IN910E+vq9x8aPPF8vaDp9QbNrzV7G0BLIEbza80t3m8+LBmLioERkb59+3bDdd1eu17W19eLuro6k7zA0X86fUTEa2trzdraWpN6mQzmmaefFvX19WZtbe+DOOrr60VNTU2n8t944w1BJy5fSN+CQLxyV62g5+pE8ruunr85r+dvJt394TJ9K7aLDzkD9wRORHz71q1imevqlM/r+Xxed11Xr6ur6zLo9cOGAoOLuro64bquns/ndSLSly1bpv/ud787bhr8cpPJpP6/lpFP4iRO4iRO4iRO4iRO4iT+F+L/AviS5OZi+9hAAAAAAElFTkSuQmCC
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml
new file mode 100644
index 000000000000..1bb43017a3b2
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml
@@ -0,0 +1,211 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ 00001
+ SDI11
+ 79SRAK
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+
+ IT
+ 03339130126
+
+ 03339130126
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+ IT
+ 03339130126
+
+ 03339130126
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18
+ 123
+
+ TC01
+ 4.00
+ 9.00
+ 22.00
+ rif. amm
+
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+ 1
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+
+
+ IT
+ 05714511002
+
+
+ Trasporto spa
+
+
+ KGM
+ DAP
+
+ strada dei test
+ 150/B
+ 12042
+ Bra
+ CN
+ IT
+
+ 2012-10-22T16:46:12.000+02:00
+
+
+
+
+ 1
+ LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 25.00
+ 5.50
+ D
+
+
+
+ TP01
+
+ MP05
+ 2015-04-30
+ 20.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 2.00
+ 2015-05-01
+
+
+ MP05
+ 2015-05-30
+ 9.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 1.00
+ 2015-05-31
+
+
+
+ TP02
+
+ MP05
+ 2015-06-30
+ 1.50
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 0.15
+ 2015-07-01
+
+
+
+ test.png
+ png
+ descrizione test
+ iVBORw0KGgoAAAANSUhEUgAAALQAAABMCAYAAADEDJ1GAAA0DklEQVR4nO19eZwVxbX/t6p6ufudBRDUiJo8jTFm471EE/KMEVlUYNgX2UHEl8UIhpiIPrMYX0yiZlFxQWQbGBiYUdTRUaMgJvH3jMmLMRo0IBgEnfVufe/t7qrz+6NvD8PMnQWYIb7fj++H+2Fud9+qOl2nTp06dc4p4CRO4iRO4iRO4iRO4iRO4iRO4iT+vwX7ZzegCAQAXvi4AORR/A5H8fxJ/D+IDwtD6/AYON/NMwKHmRbwGPck855Ev0MAMOExqVH4iG6eLYbzAUwBUFr43tXA86U5APwbgPIenj+Jkzgq8B7udcXAnwewFUAOAHX4+GAAfgVgE4CvFSnDf94fBN215SROotcwAKwAUAtgPYCFHe53ZOwMOjOxAmAV/j6z8FzHZwjADwv3bi9831P4f2i7uk7iJI4ZN6A44xGAmnbP+SrBS4V7LgAbnk6sOvzunXZ/5wrPOe2urS78v6hQ5luF7x/rUNdJnESv4DNMe2a2O3zaM+i0dr/tivkJRzJtx+sKHvMXU00A4PnCtfMK37tSdU7iJI6AzygfwWHG6shoxRh0K4Cydt9deExajFFHFeq4t4ty04X/v9qhbU8Vrn+278g9if9f8EccZsyOurCDzlK62w8HJw6+FUALgNvgWUx8/KyL3zUVadczhXsj+o7U4wYnIt/O/r9Vx+dE1J6O/yfgS+cYjpS0Njx7ckdd2P+8BuAWeBJ1mM75Fp1rJDj376fgWTI+WSj/XMG0uvOipw8GA+hI7aIc3qKzo9rRfgD8pXDvC0Xu9RuIiFuWpdfV1Rn19fXGrl27iqo9RMRra2vN+vp6o7a29kOnGtXW1or6+nqjrq7OsCxLJ6JiaxJGRPr27dsNItLr6u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6eqtUUaOHCmrq6sxvqIiEY1GX4vGYn5uuk7wpXTSy9b/kfLy8k2MMbz66qt077339k0fEbGVK1fShAkTULlhw92c888UUhl0mYXqeHFUCwG6w1PiSwKxawLcAME7C6Wjqul3usYF3ml9F9DwzbpJj3w/UjsNly1bJ//xna6PPesN3lx+rf7qsla6+DefwLNTH7xakvz5u6mDELyHHBpgWkgEEAnp8wAge0e2bVESi8UcIsLMSZPeCgYCb8e6YQbAUz0cx1HZbBaM8/cfeeSRkvPPP9999dVX+bZt246LIaq3bNGvueYaedmIEbjv3nufNAOBB5UXkAs/Y1E4GPyaoeupO9ev95maA8Dll1/u0UR0ddDTo7sdmEIINDU1YeCgQdNWr127ctiwYZBSyoMHDx5XH+3evVt77bXXaMmSJVizfv0KJsR17777bo+JIo8XR8XQbLnnovhs04FaYirlSeni7qFtL4wLvJt6HwEhbqkZd9/G3++ZgdN/MtD923easfeHyaNa5e794RT9b985xD5+x31OPnUVqq+4525G5gPvp5tAIOoufa9Syi0NxqBp5v/865opf9iMaoSWHxkals16DK6Fw1ODgYAfm9glbZxznsvlKONlWGp56KGHvvi5z31ONTQ0yA0bNuhHuVhkO3bsMDOZDCZPmeI8VF2Nl3772zc1wxizd+9eWJblKqVIKUX5fF4dOnTINkOhyKm6/hQAVFZWEgCEQiGHiDB9+vSXhRB/725gtmfqAwcOIGia19y/cuUzQ4YMwZAhQ9zm5mYkk0fZR3v36rt378Y555zj7t27F7+85541hqb98NChQ/3OzMAx5LazbiI9dBtz6sevuYgZ9NsDyQ8guGeB7i4hOYFQHohBKpU1BT9n1LYl//C98zB9o/EkBkC/HtL6goXxGE+P4lEWejkE5y6Iy4PvAqsX2F6DGZ4cty6eg/U3g2untOZb/LMBWLE2tOWfALHSQAlKA+FBwzde1VD3uzox5qLOuR785OGVGze+aFnW8EQi4TAvPWy3abRM02TxeBxpy1oXC4fnzCocZVZTU8MCgYA+evRo2rZtm5o4cSIBwOOPP85efPFFPmLECDZixAjFOW9juocfeWSMct0ni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nG4YxkAQhVwpGec8S0StgUAg/e6776LjSbNLly7Vbr/9dmaa5onMm8F27dpl7Nu3z77qqquOeKe1tbUgpSB1vVS5bgkRGQaQA2MJSNn6SjCI2664ou35wkA0FyxYYLMumNFnagB47NFHoYjO4Zw72Wx277Rp0/CjH/0IN910E+vq9x8aPPF8vaDp9QbNrzV7G0BLIEbza80t3m8+LBmLioERkb59+3bDdd1eu17W19eLuro6k7zA0X86fUTEa2trzdraWpN6mQzmmaefFvX19WZtbe+DOOrr60VNTU2n8t944w1BJy5fSN+CQLxyV62g5+pE8ruunr85r+dvJt394TJ9K7aLDzkD9wRORHz71q1imevqlM/r+Xxed11Xr6ur6zLo9cOGAoOLuro64bquns/ndSLSly1bpv/ud787bhr8cpPJpP6/lpFP4iRO4iRO4iRO4iRO4iT+F+L/AviS5OZi+9hAAAAAAElFTkSuQmCC
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml
new file mode 100644
index 000000000000..d14bfb7c3095
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml
@@ -0,0 +1,214 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ 11005
+ SDI11
+ 79SRAK
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ Societa' Alpha SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+
+ IT
+ 03339130126
+
+ 03339130126
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+ IT
+ 03339130126
+
+ 03339130126
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18
+ 124
+
+ TC01
+ 4.00
+ 9.00
+ 225.00
+ 22.00
+ rif. amm
+
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+ 1
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+
+
+ IT
+ 05714511002
+
+
+ Trasporto spa
+
+
+
+ strada dei test
+ 150/B
+ 12042
+ Bra
+ CN
+ IT
+
+ 2012-10-22T16:46:12.000+02:00
+
+
+
+
+ 1
+
+ EAN
+ 12345
+
+ LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 25.00
+ 5.50
+ D
+
+
+
+ TP01
+
+ MP05
+ 2015-04-30
+ 20.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 2.00
+ 2015-05-01
+
+
+ MP05
+ 2015-05-30
+ 9.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 1.00
+ 2015-05-31
+
+
+
+ TP02
+
+ MP05
+ 2015-06-30
+ 1.50
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 0.15
+ 2015-07-01
+
+
+
+ test.png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sNly1bJ//xna6PPesN3lx+rf7qsla6+DefwLNTH7xakvz5u6mDELyHHBpgWkgEEAnp8wAge0e2bVESi8UcIsLMSZPeCgYCb8e6YQbAUz0cx1HZbBaM8/cfeeSRkvPPP9999dVX+bZt246LIaq3bNGvueYaedmIEbjv3nufNAOBB5UXkAs/Y1E4GPyaoeupO9ev95maA8Dll1/u0UR0ddDTo7sdmEIINDU1YeCgQdNWr127ctiwYZBSyoMHDx5XH+3evVt77bXXaMmSJVizfv0KJsR17777bo+JIo8XR8XQbLnnovhs04FaYirlSeni7qFtL4wLvJt6HwEhbqkZd9/G3++ZgdN/MtD923easfeHyaNa5e794RT9b985xD5+x31OPnUVqq+4525G5gPvp5tAIOoufa9Syi0NxqBp5v/865opf9iMaoSWHxkals16DK6Fw1ODgYAfm9glbZxznsvlKONlWGp56KGHvvi5z31ONTQ0yA0bNuhHuVhkO3bsMDOZDCZPmeI8VF2Nl3772zc1wxizd+9eWJblKqVIKUX5fF4dOnTINkOhyKm6/hQAVFZWEgCEQiGHiDB9+vSXhRB/725gtmfqAwcOIGia19y/cuUzQ4YMwZAhQ9zm5mYkk0fZR3v36rt378Y555zj7t27F7+85541hqb98NChQ/3OzMAx5LazbiI9dBtz6sevuYgZ9NsDyQ8guGeB7i4hOYFQHohBKpU1BT9n1LYl//C98zB9o/EkBkC/HtL6goXxGE+P4lEWejkE5y6Iy4PvAqsX2F6DGZ4cty6eg/U3g2untOZb/LMBWLE2tOWfALHSQAlKA+FBwzde1VD3uzox5qLOuR785OGVGze+aFnW8EQi4TAvPWy3abRM02TxeBxpy1oXC4fnzCocZVZTU8MCgYA+evRo2rZtm5o4cSIBwOOPP85efPFFPmLECDZixAjFOW9juocfeWSMct0niQiJZLJTtqH2WZtisRgGlJcfkb/i2muv1e+77z5n49atH80lk283NjX1ipn88gCAdP38xXPn/tW/vn79euOUU04BAGlZFsaPH0+PPvooM00To0eP5g888ABfvHhx3m/f6tWrB+UcZ7ehafHW1tZj9tdgAE7/6EfN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rp0/CjH/0IN910E+vq9x8aPPF8vaDp9QbNrzV7G0BLIEbza80t3m8+LBmLioERkb59+3bDdd1eu17W19eLuro6k7zA0X86fUTEa2trzdraWpN6mQzmmaefFvX19WZtbe+DOOrr60VNTU2n8t944w1BJy5fSN+CQLxyV62g5+pE8ruunr85r+dvJt394TJ9K7aLDzkD9wRORHz71q1imevqlM/r+Xxed11Xr6ur6zLo9cOGAoOLuro64bquns/ndSLSly1bpv/ud787bhr8cpPJpP6/lpFP4iRO4iRO4iRO4iRO4iT+F+L/AviS5OZi+9hAAAAAAElFTkSuQmCC
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml
new file mode 100644
index 000000000000..969383576ed9
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ 11005
+ SDI11
+ 79SRAK
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ Societa' Alpha SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18
+ 125
+
+
+ 60
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+
+
+ 1
+
+ EAN
+ 12345
+
+
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 25.00
+ 5.50
+ D
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml
new file mode 100644
index 000000000000..52f3df99f6c6
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ 11007
+ SDI11
+ 79SRAK
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ Societa' Alpha SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-06-18
+ 136
+ 56.50
+
+
+ 60
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+
+
+ 1
+
+ EAN
+ 12345
+
+ ABC
+ 5.00
+ 1.00
+ 5.00
+ 15.55
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 15.55
+
+
+ 15.55
+ 26.00
+ 25.00
+ 5.50
+ D
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml b/l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml
new file mode 100644
index 000000000000..50eb005f9678
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml
@@ -0,0 +1,155 @@
+
+
+
+
+ IT
+ 03638121008
+
+ 00001
+ SDI11
+ 79SRAK
+
+ 060601
+ prova@mail.it
+
+
+
+
+
+ IT
+ 03638121008
+
+
+ Societa' alpha S.r.l.
+
+ RF01
+
+
+ Via Roma
+ 00166
+ Roma
+ RM
+ IT
+
+
+ Piazza Garibaldi
+ 00100
+ Roma
+ RM
+ IT
+
+
+
+
+ 09876543210
+
+ Societa beta' S.r.l.
+
+
+
+ Via Milano
+ 00100
+ Roma
+ RM
+ IT
+
+
+ CC
+
+
+
+
+ TD01
+ EUR
+ 2012-11-27
+ 00001
+ SI
+
+
+ 1
+ 123
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+
+
+ IT
+ 09399880153
+
+
+ Trasporto spa
+
+
+ 2012-10-22T16:46:12.000+02:00
+
+
+
+
+ 1
+ BADGES MAGNETICI - PVC laminato bianco
+ 3.00000000
+ 3.00
+ 22.00
+
+
+ 22.00
+ 3.00
+ 0.66
+
+
+
+ TP01
+
+ MP01
+ 2012-12-31
+ 3.66
+
+
+
+/descendant::ds:Signature dXKU0DEkuP9UUU+vhmUkS43CFwrQNcB370Om70mNRBM= wVXlY0vXFkhGtIf2w4o8RUkSO+8g2F2gnIBW4Y3NlMY= NoitlOJ+CRggD+X9ohF6Pw1gEHPXOu7ra1/by4BO0/U= lkOsFVW6pP/h/iMlQqKQLOqQX0I4ur/2xqoYNdjAkpNX36iSPispzDX+NMw56mkdmex0vaKZEdZU
+5zjKMnXM5QGJMP85osa/ju57G2sneF66N6J0vfEttEhCeC6fV/k7fxa0OCSp7jy37ozvKE3+wZ6y
+UfjuD+r/TfgLwKp1kiE= MIIEYDCCA0igAwIBAgIDEIgbMA0GCSqGSIb3DQEBBQUAMG0xCzAJBgNVBAYTAklUMR4wHAYDVQQK
+ExVBZ2VuemlhIGRlbGxlIEVudHJhdGUxGzAZBgNVBAsTElNlcnZpemkgVGVsZW1hdGljaTEhMB8G
+A1UEAxMYQ0EgQWdlbnppYSBkZWxsZSBFbnRyYXRlMB4XDTExMDcwNDEzMTkyNFoXDTE0MDcwNDEz
+MTkyM1owdDELMAkGA1UEBhMCSVQxHjAcBgNVBAoTFUFnZW56aWEgZGVsbGUgRW50cmF0ZTEbMBkG
+A1UECxMSU2Vydml6aSBUZWxlbWF0aWNpMSgwJgYDVQQDEx9TaXN0ZW1hIEludGVyc2NhbWJpbyBG
+YXR0dXJhIFBBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMxOQj1dj6xg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RIkj2Bz63bpjuJU+8ptRfxHrVnzyCr9M4= 2014-06-05T14:21:40Z
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml
new file mode 100644
index 000000000000..07076657a068
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml
@@ -0,0 +1,107 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 001
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ Albo di test
+ TO
+ TO1258B
+ 2010-01-16
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-02-16
+ FT/2015/0006
+
+ TC22
+ 0.00
+ 3.00
+ 3.00
+ 0.00
+ N4
+
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+ 0.00
+ 0.00
+
+
+
+
+ 1
+ Prodotto di test al giorno
+ 15.00
+ Giorno(i)
+ 3.60
+ 54.00
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 54.00
+ 0.00
+ Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
+
+
+
+ TP01
+
+ MP05
+ 2015-03-18
+ 27.00
+
+
+ MP05
+ 2015-04-17
+ 27.00
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml
new file mode 100644
index 000000000000..e264753a1e0a
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml
@@ -0,0 +1,103 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 002
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ Albo di test
+ TO
+ TO1258B
+ 2010-01-16
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-02-16
+ FT/2015/0007
+
+ TC22
+ 0.00
+ 3.00
+ 3.00
+ 0.00
+ N4
+
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+ Prodotto di test al giorno
+ 15.00
+ Giorno(i)
+ 3.60
+ 54.00
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 54.00
+ 0.00
+ Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
+
+
+
+ TP01
+
+ MP05
+ 2015-03-18
+ 27.00
+
+
+ MP05
+ 2015-04-17
+ 27.00
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml.p7m b/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml.p7m
new file mode 100644
index 0000000000000000000000000000000000000000..59f6c323f0b57ad5b21ff5966e7f3ed2981b8255
GIT binary patch
literal 6367
zcmd5=dvp}l8PDu)7V;uQAVh1z7z8wQckb+F^Kw|&Y&OYCvWdG3;wsuK$xhujUvY(TpyeQ16rj4kYJTgQ0$n}VTF3}d
zx~Y|wY&WbFJ^^N8_+C(>C{={sC0G=OvQKnlGgAxbE_KQxT
zpBJqNnHVZ-HdAG*D1}*B%-E=>#Yxi)m5Y=qtQy(EMIn5w%u29keWS;1o6k@=NGVx{
z8r!#woeN-xcEe6&FiaZdS_X^S1U4wKJ-naK3<~xtc(j#|`q>cYTxiQCCs@uRGzreL
z504@MA^NuE8C6|^#ky$GBA?IKh#V$MGfmTgluUZcWmq@_}YqR$N*2u5H^O&
zrf07J^8LKv=UL2b^>!&x9Wj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
+
+
+
+
+ IT
+ 05979361228
+
+ MRORSS90E25B111T
+
+ MARIO
+ ROSSI
+
+
+
+ TZ
+
+
+
+
+ TD01
+ EUR
+ 2015-02-16
+ FT/2015/0008
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+ Prodotto di test al giorno
+ 1.00
+ 10.00
+
+ SC
+ 10.00
+
+ 9.00
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 9.00
+ 0.00
+ Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml
new file mode 100644
index 000000000000..1c2e8121e678
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 004
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+ IT
+ 05979361228
+
+ MRORSS90E25B111T
+
+ MARIO
+ ROSSI
+
+
+
+ TZ
+
+
+
+
+ TD01
+ EUR
+ 2015-02-16
+ FT/2015/0009
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+
+ SA
+ 123456-01
+
+ USB
+ 4.00
+ PZ
+ 177.00
+
+ SC
+ 10.00
+
+ 637.20
+ 22.00
+ D122353
+
+
+ 2
+
+ SA
+ 123456-04
+
+ USB
+ 1.00
+ PZ
+ 596.00
+
+ SC
+ 10.00
+
+ 536.40
+ 22.00
+ D122354
+
+
+ 22.00
+ 1173.60
+ 258.19
+ S
+ SCISSIONE PAGAMENTI Split Payment art.17-ter del DPR 633/1972
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml
new file mode 100644
index 000000000000..dc9f4267c8d8
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml
@@ -0,0 +1,109 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 005
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-02-16
+ FT/2015/0010
+
+ SC
+ 10.00
+
+ 1288.61
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+
+ SA
+ 123456-01
+
+ USB
+ 4.00
+ PZ
+ 177.00
+
+ SC
+ 10.00
+
+ 637.20
+ 22.00
+
+
+
+ 2
+
+ SA
+ 123456-04
+
+ USB
+ 1.00
+ PZ
+ 596.00
+
+ SC
+ 10.00
+
+ 536.40
+ 22.00
+
+
+
+ 22.00
+ 1173.60
+ 258.19
+ S
+ SCISSIONE PAGAMENTI Split Payment art.17-ter del DPR 633/1972
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML b/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML
new file mode 100644
index 000000000000..e86b6765c2e6
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML
@@ -0,0 +1,108 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 006
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-02-17
+ FT/2015/0011
+
+ SC
+ 10.00
+
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+
+ SA
+ 123456-01
+
+ USB
+ 4.00
+ PZ
+ 177.00
+
+ SC
+ 10.00
+
+ 637.20
+ 22.00
+
+
+
+ 2
+
+ SA
+ 123456-04
+
+ USB
+ 1.00
+ PZ
+ 596.00
+
+ SC
+ 10.00
+
+ 536.40
+ 22.00
+
+
+
+ 22.00
+ 1173.60
+ 258.19
+ S
+ SCISSIONE PAGAMENTI Split Payment art.17-ter del DPR 633/1972
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml
new file mode 100644
index 000000000000..f6385a9f6685
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 007
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-03-16+02:00
+ FT/2015/0009
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+ Prodotto di test al giorno
+ 1.00
+ 10.00
+
+ SC
+ 10.00
+
+ 9.00
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 9.00
+ 0.00
+ Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
+
+
+
+ TP02
+
+ MP18
+ 2015-06-03+02:00
+ 9.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 2.00
+ 2015-06-04+02:00
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml
new file mode 100644
index 000000000000..a054f728f770
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 008
+ SDI11
+ 79SRAK
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+ MARIO
+ ROSSI
+
+
+
+ TZ
+
+
+
+
+ TD01
+ EUR
+ 2015-06-22
+ FT/2015/0012
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+
+
+ 1
+ Prodotto di test al giorno
+ 1.00
+ 10.00
+
+ SC
+ 10.00
+
+ 9.00
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 9.00
+ 0.00
+ Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_fake.xml.p7m b/l10n_it_fatturapa_in/tests/data/IT05979361218_fake.xml.p7m
new file mode 100644
index 000000000000..8d1c8b69c3fc
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_fake.xml.p7m
@@ -0,0 +1 @@
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
new file mode 100644
index 000000000000..e613cc138dfe
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -0,0 +1,329 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2014 Davide Corio
+# Copyright (C) 2015 Lorenzo Battistini
+#
+# 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 .
+#
+##############################################################################
+
+import base64
+import tempfile
+import openerp.tests.common as test_common
+from openerp import addons
+from openerp.osv.orm import except_orm
+
+
+class TestFatturaPAXMLValidation(test_common.SingleTransactionCase):
+
+ def getFile(self, filename):
+ path = addons.get_module_resource('l10n_it_fatturapa_in',
+ 'tests', 'data', filename)
+ with open(path) as test_data:
+ with tempfile.TemporaryFile() as out:
+ base64.encode(test_data, out)
+ out.seek(0)
+ return path, out.read()
+
+ def setUp(self):
+ super(TestFatturaPAXMLValidation, self).setUp()
+ self.wizard_model = self.registry('wizard.import.fatturapa')
+ self.data_model = self.registry('ir.model.data')
+ self.attach_model = self.registry('fatturapa.attachment.in')
+ self.invoice_model = self.registry('account.invoice')
+
+ def run_wizard(self, name, file_name):
+ cr, uid = self.cr, self.uid
+ attach_id = self.attach_model .create(
+ cr, uid,
+ {
+ 'name': name,
+ 'datas': self.getFile(file_name)[1],
+ 'datas_fname': file_name
+ })
+ wizard_id = self.wizard_model.create(cr, uid, {})
+
+ return self.wizard_model.importFatturaPA(
+ cr, uid, wizard_id, context={'active_ids': [attach_id]})
+
+ def run_wizard_multi(self, file_name_list):
+ cr, uid = self.cr, self.uid
+ active_ids = []
+ for file_name in file_name_list:
+ active_ids.append(self.attach_model .create(
+ cr, uid,
+ {
+ 'name': file_name,
+ 'datas': self.getFile(file_name)[1],
+ 'datas_fname': file_name
+ }))
+ wizard_id = self.wizard_model.create(cr, uid, {})
+
+ return self.wizard_model.importFatturaPA(
+ cr, uid, wizard_id, context={'active_ids': active_ids})
+
+ def test_00_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test0', 'IT05979361218_001.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.partner_id.register_code, 'TO1258B')
+ self.assertEqual(
+ invoice.partner_id.register_fiscalpos.code, 'RF02')
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0006')
+ self.assertEqual(invoice.amount_total, 54.00)
+ self.assertEqual(invoice.gross_weight, 0.00)
+ self.assertEqual(invoice.net_weight, 0.00)
+
+ def test_01_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test1', 'IT02780790107_11004.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, '123')
+ self.assertEqual(invoice.amount_untaxed, 25.00)
+ self.assertEqual(invoice.amount_tax, 5.50)
+ self.assertEqual(
+ len(invoice.invoice_line[0].invoice_line_tax_id), 1)
+ self.assertEqual(
+ invoice.invoice_line[0].invoice_line_tax_id[0].name, '22% ftPA')
+ self.assertEqual(
+ invoice.fatturapa_summary_ids[0].amount_untaxed, 25.00)
+ self.assertEqual(
+ invoice.fatturapa_summary_ids[0].amount_tax, 5.50)
+ self.assertEqual(
+ invoice.fatturapa_summary_ids[0].payability, 'D')
+ self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
+ self.assertEqual(invoice.partner_id.street, "VIALE ROMA 543")
+ self.assertEqual(invoice.partner_id.province.code, "SS")
+ self.assertEqual(
+ invoice.tax_representative_id.name, "Rappresentante fiscale")
+ self.assertEqual(invoice.welfare_fund_ids[0].welfare_rate_tax, 0.04)
+ self.assertEqual(
+ invoice.related_documents[0].type, "order")
+ self.assertEqual(
+ invoice.related_documents[0].cig, '456def')
+ self.assertEqual(
+ invoice.related_documents[0].cup, '123abc')
+ self.assertEqual(
+ invoice.welfare_fund_ids[0].welfare_amount_tax, 9)
+ self.assertFalse(invoice.welfare_fund_ids[0].welfare_taxable)
+ self.assertEqual(invoice.unit_weight, 'KGM')
+ self.assertEqual(invoice.incoterm.code, 'DAP')
+
+ def test_02_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test2', 'IT03638121008_X11111.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, '00001')
+ self.assertEqual(invoice.amount_untaxed, 3)
+ self.assertEqual(invoice.amount_tax, 0.66)
+ self.assertEqual(
+ invoice.fatturapa_summary_ids[0].amount_untaxed, 3)
+ self.assertEqual(
+ invoice.fatturapa_summary_ids[0].amount_tax, 0.66)
+ self.assertEqual(invoice.partner_id.name, "Societa' alpha S.r.l.")
+
+ def test_03_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test3', 'IT05979361218_002.xml.p7m')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.partner_id.register_code, 'TO1258B')
+ self.assertEqual(
+ invoice.partner_id.register_fiscalpos.code, 'RF02')
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0007')
+ self.assertEqual(invoice.amount_total, 54.00)
+
+ def test_04_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test4', 'IT02780790107_11005.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, '124')
+ self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
+ self.assertEqual(
+ invoice.invoice_line[0].invoice_line_tax_id[0].name, '22% ftPA')
+ self.assertEqual(
+ invoice.invoice_line[1].invoice_line_tax_id[0].name, '22% ftPA')
+ self.assertEqual(
+ invoice.invoice_line[0].invoice_line_tax_id[0].amount, 0.22)
+ self.assertEqual(
+ invoice.invoice_line[1].invoice_line_tax_id[0].amount, 0.22)
+ self.assertEqual(
+ invoice.invoice_line[1].price_unit, 2)
+ self.assertEqual(
+ invoice.invoice_line[0].cod_article_ids[0].name, 'EAN')
+ self.assertEqual(
+ invoice.invoice_line[0].cod_article_ids[0].code_val, '12345')
+ self.assertEqual(
+ invoice.inconsistencies,
+ u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"')
+
+ def test_05_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test5', 'IT05979361218_003.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0008')
+ self.assertEqual(invoice.sender, 'TZ')
+ self.assertEqual(invoice.intermediary.name, 'ROSSI MARIO')
+ self.assertEqual(invoice.intermediary.firstname, 'MARIO')
+ self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
+ self.assertEqual(
+ invoice.invoice_line[0].discount_rise_price_ids[0].name, 'SC')
+ self.assertEqual(
+ invoice.invoice_line[0].discount_rise_price_ids[0].percentage, 10)
+ self.assertEqual(invoice.amount_untaxed, 9)
+ self.assertEqual(invoice.amount_tax, 0)
+ self.assertEqual(invoice.amount_total, 9)
+
+ def test_06_import_except(self):
+ # File not exist Exception
+ self.assertRaises(
+ Exception, self.run_wizard, 'test6_Exception', '')
+ # fake Signed file is passed , generate orm_exception
+ self.assertRaises(
+ except_orm, self.run_wizard, 'test6_orm_exception',
+ 'IT05979361218_fake.xml.p7m'
+ )
+
+ def test_07_xml_import(self):
+ cr, uid = self.cr, self.uid
+ # 2 lines with quantity != 1 and discounts
+ res = self.run_wizard('test7', 'IT05979361218_004.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0009')
+ self.assertEqual(invoice.amount_untaxed, 1173.60)
+ self.assertEqual(invoice.amount_tax, 258.19)
+ self.assertEqual(invoice.amount_total, 1431.79)
+ self.assertEqual(invoice.invoice_line[0].admin_ref, 'D122353')
+
+ def test_08_xml_import(self):
+ cr, uid = self.cr, self.uid
+ # using ImportoTotaleDocumento
+ res = self.run_wizard('test8', 'IT05979361218_005.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0010')
+ self.assertEqual(invoice.amount_total, 1288.61)
+ self.assertFalse(invoice.inconsistencies)
+
+ def test_09_xml_import(self):
+ cr, uid = self.cr, self.uid
+ # using DatiGeneraliDocumento.ScontoMaggiorazione without
+ # ImportoTotaleDocumento
+ # add test file name case sensitive
+ res = self.run_wizard('test9', 'IT05979361218_006.XML')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0011')
+ self.assertEqual(invoice.amount_total, 1288.61)
+ self.assertEqual(
+ invoice.inconsistencies,
+ 'Computed amount untaxed 1030.42 is different from'
+ ' DatiRiepilogo 1173.6')
+
+ def test_10_xml_import(self):
+ # Fix Date format
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test6', 'IT05979361218_007.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0009')
+ self.assertEqual(
+ invoice.date_invoice, '2015-03-16')
+ self.assertEqual(
+ invoice.fatturapa_payments[0].payment_methods[0].payment_due_date,
+ '2015-06-03'
+ )
+ self.assertEqual(
+ invoice.fatturapa_payments[0].payment_methods[0].
+ fatturapa_pm_id.code,
+ 'MP18'
+ )
+
+ def test_11_xml_import(self):
+ # DatiOrdineAcquisto with RiferimentoNumeroLinea referring to
+ # not existing invoice line
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test11', 'IT02780790107_11006.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(
+ len(invoice.invoice_line[0].related_documents), 0)
+ self.assertEqual(
+ invoice.invoice_line[0].sequence, 1)
+ self.assertEqual(
+ invoice.related_documents[0].type, "order")
+ self.assertEqual(
+ invoice.related_documents[0].lineRef, 60)
+
+ def test_12_xml_import(self):
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test12', 'IT05979361218_008.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0012')
+ self.assertEqual(invoice.sender, 'TZ')
+ self.assertEqual(invoice.intermediary.name, 'ROSSI MARIO')
+ self.assertEqual(invoice.intermediary.firstname, 'MARIO')
+ self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
+
+ def test_13_xml_import(self):
+ # inconsistencies must not be duplicated
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard_multi([
+ 'IT02780790107_11005.xml',
+ 'IT02780790107_11005.xml',
+ ])
+ invoice1_id = res.get('domain')[0][2][0]
+ invoice2_id = res.get('domain')[0][2][1]
+ invoice1 = self.invoice_model.browse(cr, uid, invoice1_id)
+ invoice2 = self.invoice_model.browse(cr, uid, invoice2_id)
+ self.assertEqual(
+ invoice1.inconsistencies,
+ u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"')
+ self.assertEqual(
+ invoice2.inconsistencies,
+ u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"')
+
+ def test_14_xml_import(self):
+ # check: no tax code found , write inconsisteance and anyway
+ # create draft
+ cr, uid = self.cr, self.uid
+ res = self.run_wizard('test14', 'IT02780790107_11007.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ self.assertEqual(invoice.supplier_invoice_number, '136')
+ self.assertEqual(invoice.partner_id.name, 'SOCIETA\' ALPHA SRL')
+ self.assertEqual(invoice.amount_untaxed, 25.00)
+ self.assertEqual(invoice.amount_tax, 0.0)
+ # check: filling check_total invoice field with summary data take from
+ # ''DatitRiepilogo'
+ self.assertEqual(invoice.check_total, 56.50)
+ self.assertEqual(
+ invoice.inconsistencies,
+ u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n'
+ u'XML contains tax with percentage "15.55"'
+ ' but it does not exist in your system\n'
+ 'XML contains tax with percentage "15.55"'
+ ' but it does not exist in your system')
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
new file mode 100644
index 000000000000..5074a2a50ac5
--- /dev/null
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -0,0 +1,290 @@
+
+
+
+
+
+ fatturapa.attachment.in.form
+ fatturapa.attachment.in
+
+
+
+
+
+ fatturapa.attachment.in.tree
+ fatturapa.attachment.in
+
+
+
+
+
+
+
+
+ Incoming fatturaPA files
+ fatturapa.attachment.in
+ form
+ tree,form
+
+
+
+
+
+ account.invoice.line.fatturapa.in
+ account.invoice.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.invoice.fatturapa_in
+ account.invoice
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/views/partner_view.xml b/l10n_it_fatturapa_in/views/partner_view.xml
new file mode 100644
index 000000000000..171671e26fb4
--- /dev/null
+++ b/l10n_it_fatturapa_in/views/partner_view.xml
@@ -0,0 +1,24 @@
+
+
+
+
+ partner.form.fatturapa.in
+ res.partner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/__init__.py b/l10n_it_fatturapa_in/wizard/__init__.py
new file mode 100644
index 000000000000..a45fc832329f
--- /dev/null
+++ b/l10n_it_fatturapa_in/wizard/__init__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2015 AgileBG SAGL
+# Copyright (C) 2015 innoviu Srl
+#
+# 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 . import wizard_import_fatturapa
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
new file mode 100644
index 000000000000..c252b594faf9
--- /dev/null
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -0,0 +1,1373 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2015 AgileBG SAGL
+# Copyright (C) 2015 innoviu Srl
+#
+# 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 .
+#
+##############################################################################
+import base64
+import os
+import shlex
+import subprocess
+from openerp.osv import orm
+from openerp.tools.translate import _
+import logging
+
+
+from openerp.addons.l10n_it_fatturapa.bindings import fatturapa_v_1_1
+from openerp.addons.base_iban import base_iban
+from lxml import etree
+
+_logger = logging.getLogger(__name__)
+
+
+class WizardImportFatturapa(orm.TransientModel):
+ _name = "wizard.import.fatturapa"
+ _description = "Import FatturaPA"
+
+ def saveAttachment(self, cr, uid, context=None):
+ if not context:
+ context = {}
+
+ return False
+
+ def CountryByCode(self, cr, uid, CountryCode, context=None):
+ country_model = self.pool['res.country']
+ return country_model.search(
+ cr, uid, [('code', '=', CountryCode)], context=context)
+
+ def ProvinceByCode(self, cr, uid, provinceCode, context=None):
+ province_model = self.pool['res.province']
+ return province_model.search(
+ cr, uid, [('code', '=', provinceCode)], context=context)
+
+ def check_partner_base_data(
+ self, cr, uid, partner_id, DatiAnagrafici, context=None
+ ):
+ if context is None:
+ context = {}
+ partner = self.pool['res.partner'].browse(
+ cr, uid, partner_id, context=context)
+ if (
+ DatiAnagrafici.Anagrafica.Denominazione and
+ partner.name != DatiAnagrafici.Anagrafica.Denominazione
+ ):
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _(
+ "DatiAnagrafici.Anagrafica.Denominazione contains \"%s\"."
+ " Your System contains \"%s\""
+ )
+ % (DatiAnagrafici.Anagrafica.Denominazione, partner.name)
+ )
+ if (
+ DatiAnagrafici.Anagrafica.Nome and
+ partner.firstname != DatiAnagrafici.Anagrafica.Nome
+ ):
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _(
+ "DatiAnagrafici.Anagrafica.Nome contains \"%s\"."
+ " Your System contains \"%s\""
+ )
+ % (DatiAnagrafici.Anagrafica.Nome, partner.firstname)
+ )
+ if (
+ DatiAnagrafici.Anagrafica.Cognome and
+ partner.lastname != DatiAnagrafici.Anagrafica.Cognome
+ ):
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _(
+ "DatiAnagrafici.Anagrafica.Cognome contains \"%s\"."
+ " Your System contains \"%s\""
+ )
+ % (DatiAnagrafici.Anagrafica.Cognome, partner.lastname)
+ )
+
+ def getPartnerBase(self, cr, uid, DatiAnagrafici, context=None):
+ if not DatiAnagrafici:
+ return False
+ partner_model = self.pool['res.partner']
+ cf = DatiAnagrafici.CodiceFiscale or False
+ vat = False
+ if DatiAnagrafici.IdFiscaleIVA:
+ vat = "%s%s" % (
+ DatiAnagrafici.IdFiscaleIVA.IdPaese,
+ DatiAnagrafici.IdFiscaleIVA.IdCodice
+ )
+ partner_ids = partner_model.search(
+ cr, uid,
+ ['|',
+ ('vat', '=', vat or 0),
+ ('fiscalcode', '=', cf or 0),
+ ],
+ context=context)
+ commercial_partner = False
+ if len(partner_ids) > 1:
+ for partner in partner_model.browse(
+ cr, uid, partner_ids, context=context
+ ):
+ if (
+ commercial_partner and
+ partner.commercial_partner_id.id != commercial_partner
+ ):
+ raise orm.except_orm(
+ _('Error !'),
+ _("Two distinct partners with "
+ "Vat %s and Fiscalcode %s already present in db" %
+ (vat, cf))
+ )
+ commercial_partner = partner.commercial_partner_id.id
+ if not partner_ids:
+ if DatiAnagrafici.Anagrafica.Denominazione:
+ partner_ids = partner_model.search(
+ cr, uid,
+ [('name', '=', DatiAnagrafici.Anagrafica.Denominazione)],
+ context=context)
+ elif (
+ DatiAnagrafici.Anagrafica.Nome and
+ DatiAnagrafici.Anagrafica.Cognome
+ ):
+ partner_ids = partner_model.search(
+ cr, uid,
+ [
+ ('firstname', '=', DatiAnagrafici.Anagrafica.Nome),
+ ('lastname', '=', DatiAnagrafici.Anagrafica.Cognome),
+ ],
+ context=context)
+ if partner_ids:
+ commercial_partner = partner_ids[0]
+ self.check_partner_base_data(
+ cr, uid, commercial_partner, DatiAnagrafici, context=context)
+ return commercial_partner
+ else:
+ # partner to be created
+ country_id = False
+ if DatiAnagrafici.IdFiscaleIVA:
+ CountryCode = DatiAnagrafici.IdFiscaleIVA.IdPaese
+ country_ids = self.CountryByCode(
+ cr, uid, CountryCode, context=context)
+ if country_ids:
+ country_id = country_ids[0]
+ else:
+ raise orm.except_orm(
+ _('Error !'),
+ _("Country Code %s not found in system") % CountryCode
+ )
+ vals = {
+ 'vat': vat,
+ 'fiscalcode': cf,
+ 'customer': False,
+ 'supplier': True,
+ 'is_company': (
+ DatiAnagrafici.Anagrafica.Denominazione and True or False),
+ 'eori_code': DatiAnagrafici.Anagrafica.CodEORI or '',
+ 'country_id': country_id,
+ }
+ if DatiAnagrafici.Anagrafica.Nome:
+ vals['firstname'] = DatiAnagrafici.Anagrafica.Nome
+ if DatiAnagrafici.Anagrafica.Cognome:
+ vals['lastname'] = DatiAnagrafici.Anagrafica.Cognome
+ if DatiAnagrafici.Anagrafica.Denominazione:
+ vals['name'] = DatiAnagrafici.Anagrafica.Denominazione
+
+ return partner_model.create(cr, uid, vals, context=context)
+
+ def getCedPrest(self, cr, uid, cedPrest, context=None):
+ partner_model = self.pool['res.partner']
+ partner_id = self.getPartnerBase(
+ cr, uid, cedPrest.DatiAnagrafici, context=context)
+ fiscalPosModel = self.pool['fatturapa.fiscal_position']
+ vals = {}
+ if partner_id:
+ vals = {
+ 'street': cedPrest.Sede.Indirizzo,
+ 'zip': cedPrest.Sede.CAP,
+ 'city': cedPrest.Sede.Comune,
+ 'register': cedPrest.DatiAnagrafici.AlboProfessionale or ''
+ }
+ if cedPrest.DatiAnagrafici.ProvinciaAlbo:
+ ProvinciaAlbo = cedPrest.DatiAnagrafici.ProvinciaAlbo
+ prov_ids = self.ProvinceByCode(
+ cr, uid, ProvinciaAlbo, context=context)
+ if not prov_ids:
+ raise orm.except_orm(
+ _('Error !'),
+ _('ProvinciaAlbo ( %s ) not present in system') %
+ ProvinciaAlbo
+ )
+ vals['register_province'] = prov_ids[0]
+
+ vals['register_code'] = (
+ cedPrest.DatiAnagrafici.NumeroIscrizioneAlbo)
+ vals['register_regdate'] = (
+ cedPrest.DatiAnagrafici.DataIscrizioneAlbo)
+
+ if cedPrest.DatiAnagrafici.RegimeFiscale:
+ rfPos = cedPrest.DatiAnagrafici.RegimeFiscale
+ FiscalPosIds = fiscalPosModel.search(
+ cr, uid,
+ [('code', '=', rfPos)],
+ context=context
+ )
+ if not FiscalPosIds:
+ raise orm.except_orm(
+ _('Error!'),
+ _('RegimeFiscale %s is not present in your system')
+ % rfPos
+ )
+ else:
+ vals['register_fiscalpos'] = FiscalPosIds[0]
+
+ if cedPrest.IscrizioneREA:
+ REA = cedPrest.IscrizioneREA
+ vals['rea_code'] = REA.NumeroREA
+ office_id = False
+ office_ids = self.ProvinceByCode(
+ cr, uid, REA.Ufficio, context=context)
+ if not office_ids:
+ raise orm.except_orm(
+ _('Error !'),
+ _('REA Office Code ( %s ) not present in system') %
+ REA.Ufficio
+ )
+ office_id = office_ids[0]
+ vals['rea_office'] = office_id
+ vals['rea_capital'] = REA.CapitaleSociale or 0.0
+ vals['rea_member_type'] = REA.SocioUnico or False
+ vals['rea_liquidation_state'] = REA.StatoLiquidazione or False
+
+ if cedPrest.Contatti:
+ vals['phone'] = cedPrest.Contatti.Telefono
+ vals['email'] = cedPrest.Contatti.Email
+ vals['fax'] = cedPrest.Contatti.Fax
+ partner_model.write(cr, uid, partner_id, vals, context=context)
+ return partner_id
+
+ def getCarrirerPartner(self, cr, uid, Carrier, context=None):
+ partner_model = self.pool['res.partner']
+ partner_id = self.getPartnerBase(
+ cr, uid, Carrier.DatiAnagraficiVettore, context=context)
+ vals = {}
+ if partner_id:
+ vals = {
+ 'license_number':
+ Carrier.DatiAnagraficiVettore.NumeroLicenzaGuida or '',
+ }
+ partner_model.write(cr, uid, partner_id, vals, context=context)
+ return partner_id
+
+ def _prepareInvoiceLine(
+ self, cr, uid, credit_account_id, line, context=None
+ ):
+ account_tax_model = self.pool['account.tax']
+ # check if a default tax exists and generate def_purchase_tax object
+ ir_values = self.pool.get('ir.values')
+ company_id = self.pool.get('res.company')._company_default_get(
+ cr, uid, 'account.invoice.line', context=context
+ )
+ supplier_taxes_ids = ir_values.get_default(
+ cr, uid, 'product.product', 'supplier_taxes_id',
+ company_id=company_id
+ )
+ def_purchase_tax = False
+ if supplier_taxes_ids:
+ def_purchase_tax = account_tax_model.browse(
+ cr, uid, supplier_taxes_ids, context=context)[0]
+ if float(line.AliquotaIVA) == 0.0 and line.Natura:
+ account_tax_ids = account_tax_model.search(
+ cr, uid,
+ [
+ ('type_tax_use', 'in', ('purchase', 'all')),
+ ('non_taxable_nature', '=', line.Natura),
+ ('amount', '=', 0.0),
+ ], context=context)
+ if not account_tax_ids:
+ raise orm.except_orm(
+ _('Error!'),
+ _('No tax with percentage '
+ '%s and nature %s found')
+ % (line.AliquotaIVA, line.Natura))
+ if len(account_tax_ids) > 1:
+ raise orm.except_orm(
+ _('Error!'),
+ _('Too many taxes with percentage '
+ '%s and nature %s found')
+ % (line.AliquotaIVA, line.Natura))
+ else:
+ account_tax_ids = account_tax_model.search(
+ cr, uid,
+ [
+ ('type_tax_use', 'in', ('purchase', 'all')),
+ ('amount', '=', float(line.AliquotaIVA) / 100),
+ ('price_include', '=', False),
+ # partially deductible VAT must be set by user
+ ('child_ids', '=', False),
+ ], context=context)
+ if not account_tax_ids:
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _(
+ 'XML contains tax with percentage "%s" '
+ 'but it does not exist in your system'
+ ) % line.AliquotaIVA
+ )
+ # check if there are multiple taxes with
+ # same percentage
+ if len(account_tax_ids) > 1:
+ # just logging because this is an usual case: see split payment
+ _logger.warning(_(
+ "Line '%s': Too many taxes with percentage equals "
+ "to \"%s\"\nfix it if required"
+ ) % (line.Descrizione, line.AliquotaIVA))
+ # if there are multiple taxes with same percentage
+ # and there is a default tax with this percentage,
+ # set taxes list equal to supplier_taxes_id, loaded before
+ if (
+ def_purchase_tax and
+ def_purchase_tax.amount == (float(line.AliquotaIVA) / 100)
+ ):
+ account_tax_ids = supplier_taxes_ids
+ retLine = {
+ 'name': line.Descrizione,
+ 'sequence': int(line.NumeroLinea),
+ 'account_id': credit_account_id,
+ }
+ if account_tax_ids:
+ retLine['invoice_line_tax_id'] = [(6, 0, [account_tax_ids[0]])]
+ if line.PrezzoUnitario:
+ retLine['price_unit'] = float(line.PrezzoUnitario)
+ if line.Quantita:
+ retLine['quantity'] = float(line.Quantita)
+ if line.TipoCessionePrestazione:
+ retLine['service_type'] = line.TipoCessionePrestazione
+ if line.TipoCessionePrestazione:
+ retLine['service_type'] = line.TipoCessionePrestazione
+ if line.UnitaMisura:
+ retLine['ftpa_uom'] = line.UnitaMisura
+ if line.DataInizioPeriodo:
+ retLine['service_start'] = line.DataInizioPeriodo
+ if line.DataFinePeriodo:
+ retLine['service_end'] = line.DataFinePeriodo
+ if (
+ line.PrezzoTotale and line.PrezzoUnitario and line.Quantita and
+ line.ScontoMaggiorazione
+ ):
+ retLine['discount'] = self._computeDiscount(
+ cr, uid, line, context=context)
+ if line.RiferimentoAmministrazione:
+ retLine['admin_ref'] = line.RiferimentoAmministrazione
+
+ return retLine
+
+ def _prepareRelDocsLine(
+ self, cr, uid, invoice_id, line, type, context=None
+ ):
+ res = []
+ lineref = line.RiferimentoNumeroLinea or False
+ IdDoc = line.IdDocumento or 'Error'
+ Data = line.Data or False
+ NumItem = line.NumItem or ''
+ Code = line.CodiceCommessaConvenzione or ''
+ Cig = line.CodiceCIG or ''
+ Cup = line.CodiceCUP or ''
+ invoice_lineid = False
+ if lineref:
+ for numline in lineref:
+ invoice_lineid = False
+ invoice_line_model = self.pool['account.invoice.line']
+ invoice_line_ids = invoice_line_model.search(
+ cr, uid,
+ [
+ ('invoice_id', '=', invoice_id),
+ ('sequence', '=', int(numline)),
+ ], context=context)
+ if invoice_line_ids:
+ invoice_lineid = invoice_line_ids[0]
+ val = {
+ 'type': type,
+ 'name': IdDoc,
+ 'lineRef': numline,
+ 'invoice_line_id': invoice_lineid,
+ 'invoice_id': invoice_id,
+ 'date': Data,
+ 'numitem': NumItem,
+ 'code': Code,
+ 'cig': Cig,
+ 'cup': Cup,
+ }
+ res.append(val)
+ else:
+ val = {
+ 'type': type,
+ 'name': IdDoc,
+ 'invoice_line_id': invoice_lineid,
+ 'invoice_id': invoice_id,
+ 'date': Data,
+ 'numitem': NumItem,
+ 'code': Code,
+ 'cig': Cig,
+ 'cup': Cup
+ }
+ res.append(val)
+ return res
+
+ def _prepareWelfareLine(
+ self, cr, uid, invoice_id, line, context=None
+ ):
+ res = []
+ TipoCassa = line.TipoCassa or False
+ AlCassa = line.AlCassa and (float(line.AlCassa)/100) or None
+ ImportoContributoCassa = (
+ line.ImportoContributoCassa and
+ float(line.ImportoContributoCassa) or None)
+ ImponibileCassa = (
+ line.ImponibileCassa and float(line.ImponibileCassa) or None)
+ AliquotaIVA = (
+ line.AliquotaIVA and (float(line.AliquotaIVA)/100) or None)
+ Ritenuta = line.Ritenuta or ''
+ Natura = line.Natura or False
+ RiferimentoAmministrazione = line.RiferimentoAmministrazione or ''
+ WelfareTypeModel = self.pool['welfare.fund.type']
+ if not TipoCassa:
+ raise orm.except_orm(
+ _('Error!'),
+ _('TipoCassa is not defined ')
+ )
+ WelfareTypeId = WelfareTypeModel.search(
+ cr, uid,
+ [('name', '=', TipoCassa)],
+ context=context
+ )
+
+ res = {
+ 'welfare_rate_tax': AlCassa,
+ 'welfare_amount_tax': ImportoContributoCassa,
+ 'welfare_taxable': ImponibileCassa,
+ 'welfare_Iva_tax': AliquotaIVA,
+ 'subjected_withholding': Ritenuta,
+ 'fund_nature': Natura or False,
+ 'pa_line_code': RiferimentoAmministrazione,
+ 'invoice_id': invoice_id,
+ }
+ if not WelfareTypeId:
+ raise orm.except_orm(
+ _('Error'),
+ _('TipoCassa %s is not present in your system') % TipoCassa)
+ else:
+ res['name'] = WelfareTypeId[0]
+
+ return res
+
+ def _prepareDiscRisePriceLine(
+ self, cr, uid, id, line, context=None
+ ):
+ res = []
+ Tipo = line.Tipo or False
+ Percentuale = line.Percentuale and float(line.Percentuale) or 0.0
+ Importo = line.Importo and float(line.Importo) or 0.0
+ res = {
+ 'percentage': Percentuale,
+ 'amount': Importo,
+ context.get('drtype'): id,
+ }
+ res['name'] = Tipo
+
+ return res
+
+ def _computeDiscount(
+ self, cr, uid, DettaglioLinea, context=None
+ ):
+ line_total = float(DettaglioLinea.PrezzoTotale)
+ line_unit = line_total / float(DettaglioLinea.Quantita)
+ discount = (
+ 1 - (line_unit / float(DettaglioLinea.PrezzoUnitario))
+ ) * 100.0
+ return discount
+
+ def _addGlobalDiscount(
+ self, cr, uid, invoice_id, DatiGeneraliDocumento, context=None
+ ):
+ discount = 0.0
+ if DatiGeneraliDocumento.ScontoMaggiorazione:
+ invoice = self.pool['account.invoice'].browse(
+ cr, uid, invoice_id, context=context)
+ invoice.button_compute(context=context, set_total=True)
+ for DiscRise in DatiGeneraliDocumento.ScontoMaggiorazione:
+ if DiscRise.Percentuale:
+ amount = (
+ invoice.amount_total * (
+ float(DiscRise.Percentuale) / 100))
+ if DiscRise.Tipo == 'SC':
+ discount -= amount
+ elif DiscRise.Tipo == 'MG':
+ discount += amount
+ elif DiscRise.Importo:
+ if DiscRise.Tipo == 'SC':
+ discount -= float(DiscRise.Importo)
+ elif DiscRise.Tipo == 'MG':
+ discount += float(DiscRise.Importo)
+ journal = self.get_purchase_journal(
+ cr, uid, invoice.company_id, context=context)
+ credit_account_id = journal.default_credit_account_id.id
+ line_vals = {
+ 'invoice_id': invoice_id,
+ 'name': _(
+ "Global invoice discount from DatiGeneraliDocumento"),
+ 'account_id': credit_account_id,
+ 'price_unit': discount,
+ 'quantity': 1,
+ }
+ self.pool['account.invoice.line'].create(
+ cr, uid, line_vals, context=context)
+ return True
+
+ def _createPayamentsLine(
+ self, cr, uid, payment_id, line, partner_id,
+ context=None
+ ):
+ PaymentModel = self.pool['fatturapa.payment.detail']
+ PaymentMethodModel = self.pool['fatturapa.payment_method']
+ details = line.DettaglioPagamento or False
+ if details:
+ for dline in details:
+ BankModel = self.pool['res.bank']
+ PartnerBankModel = self.pool['res.partner.bank']
+ method_id = PaymentMethodModel.search(
+ cr, uid,
+ [('code', '=', dline.ModalitaPagamento)],
+ context=context
+ )
+ if not method_id:
+ raise orm.except_orm(
+ _('Error!'),
+ _(
+ 'ModalitaPagamento %s not defined in your system'
+ % dline.ModalitaPagamento
+ )
+ )
+ val = {
+ 'recipient': dline.Beneficiario,
+ 'fatturapa_pm_id': method_id[0],
+ 'payment_term_start':
+ dline.DataRiferimentoTerminiPagamento or False,
+ 'payment_days':
+ dline.GiorniTerminiPagamento or 0,
+ 'payment_due_date':
+ dline.DataScadenzaPagamento or False,
+ 'payment_amount':
+ dline.ImportoPagamento or 0.0,
+ 'post_office_code':
+ dline.CodUfficioPostale or '',
+ 'recepit_surname':
+ dline.CognomeQuietanzante or '',
+ 'recepit_name':
+ dline.NomeQuietanzante or '',
+ 'recepit_cf':
+ dline.CFQuietanzante or '',
+ 'recepit_title':
+ dline.TitoloQuietanzante or '1',
+ 'payment_bank_name':
+ dline.IstitutoFinanziario or '',
+ 'payment_bank_iban':
+ dline.IBAN or '',
+ 'payment_bank_abi':
+ dline.ABI or '',
+ 'payment_bank_cab':
+ dline.CAB or '',
+ 'payment_bank_bic':
+ dline.BIC or '',
+ 'payment_bank': False,
+ 'prepayment_discount':
+ dline.ScontoPagamentoAnticipato or 0.0,
+ 'max_payment_date':
+ dline.DataLimitePagamentoAnticipato or False,
+ 'penalty_amount':
+ dline.PenalitaPagamentiRitardati or 0.0,
+ 'penalty_date':
+ dline.DataDecorrenzaPenale or False,
+ 'payment_code':
+ dline.CodicePagamento or '',
+ 'payment_data_id': payment_id
+ }
+ bankid = False
+ payment_bank_id = False
+ if dline.BIC:
+ bankids = BankModel.search(
+ cr, uid,
+ [('bic', '=', dline.BIC.strip())], context=context
+ )
+ if not bankids:
+ if not dline.IstitutoFinanziario:
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _("Name of Bank with BIC \"%s\" is not set."
+ " Can't create bank") % dline.BIC
+ )
+ else:
+ bankid = BankModel.create(
+ cr, uid,
+ {
+ 'name': dline.IstitutoFinanziario,
+ 'bic': dline.BIC,
+ },
+ context=context
+ )
+ else:
+ bankid = bankids[0]
+ if dline.IBAN:
+ SearchDom = [
+ ('state', '=', 'iban'),
+ (
+ 'acc_number', '=',
+ base_iban._pretty_iban(dline.IBAN.strip())
+ ),
+ ('partner_id', '=', partner_id),
+ ]
+ payment_bank_id = False
+ payment_bank_ids = PartnerBankModel.search(
+ cr, uid, SearchDom, context=context)
+ if not payment_bank_ids and not bankid:
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _(
+ 'BIC is required and not exist in Xml\n'
+ 'Curr bank data is: \n'
+ 'IBAN: %s\n'
+ 'Bank Name: %s\n'
+ )
+ % (
+ dline.IBAN.strip() or '',
+ dline.IstitutoFinanziario or ''
+ )
+ )
+
+ elif not payment_bank_ids and bankid:
+ payment_bank_id = PartnerBankModel.create(
+ cr, uid,
+ {
+ 'state': 'iban',
+ 'acc_number': dline.IBAN.strip(),
+ 'partner_id': partner_id,
+ 'bank': bankid,
+ 'bank_name': dline.IstitutoFinanziario,
+ 'bank_bic': dline.BIC
+ },
+ context=context
+ )
+ if payment_bank_ids:
+ payment_bank_id = payment_bank_ids[0]
+
+ if payment_bank_id:
+ val['payment_bank'] = payment_bank_id
+ PaymentModel.create(cr, uid, val, context=context)
+ return True
+
+ def get_purchase_journal(self, cr, uid, company, context=None):
+ journal_model = self.pool['account.journal']
+ journal_ids = journal_model.search(
+ cr, uid,
+ [
+ ('type', '=', 'purchase'),
+ ('company_id', '=', company.id)
+ ],
+ limit=1, context=context)
+ if not journal_ids:
+ raise orm.except_orm(
+ _('Error!'),
+ _(
+ 'Define a purchase journal '
+ 'for this company: "%s" (id:%d).'
+ ) % (company.name, company.id)
+ )
+ purchase_journal = journal_model.browse(
+ cr, uid, journal_ids[0], context=context)
+ return purchase_journal
+
+ def invoiceCreate(
+ self, cr, uid, fatt, fatturapa_attachment, FatturaBody,
+ partner_id, context=None
+ ):
+ if context is None:
+ context = {}
+ partner_model = self.pool['res.partner']
+ invoice_model = self.pool['account.invoice']
+ currency_model = self.pool['res.currency']
+ invoice_line_model = self.pool['account.invoice.line']
+ ftpa_doctype_poll = self.pool['fatturapa.document_type']
+ rel_docs_model = self.pool['fatturapa.related_document_type']
+ WelfareFundLineModel = self.pool['welfare.fund.data.line']
+ DiscRisePriceModel = self.pool['discount.rise.price']
+ SalModel = self.pool['faturapa.activity.progress']
+ DdTModel = self.pool['fatturapa.related_ddt']
+ PaymentDataModel = self.pool['fatturapa.payment.data']
+ PaymentTermsModel = self.pool['fatturapa.payment_term']
+ SummaryDatasModel = self.pool['faturapa.summary.data']
+
+ company = self.pool['res.users'].browse(
+ cr, uid, uid, context=context).company_id
+ partner = partner_model.browse(cr, uid, partner_id, context=context)
+ pay_acc_id = partner.property_account_payable.id
+ # currency 2.1.1.2
+ currency_id = currency_model.search(
+ cr, uid,
+ [
+ (
+ 'name', '=',
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa
+ )
+ ],
+ context=context)
+ if not currency_id:
+ raise orm.except_orm(
+ _('Error!'),
+ _(
+ 'No currency found with code %s'
+ % FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa
+ )
+ )
+ purchase_journal = self.get_purchase_journal(
+ cr, uid, company, context=context)
+ credit_account_id = purchase_journal.default_credit_account_id.id
+ invoice_lines = []
+ comment = ''
+ # 2.1.1
+ docType_id = False
+ invtype = 'in_invoice'
+ docType = FatturaBody.DatiGenerali.DatiGeneraliDocumento.TipoDocumento
+ if docType:
+ docType_ids = ftpa_doctype_poll.search(
+ cr, uid,
+ [
+ ('code', '=', docType)
+ ],
+ context=context
+ )
+ if docType_ids:
+ docType_id = docType_ids[0]
+ else:
+ raise orm.except_orm(
+ _("Error"),
+ _("tipoDocumento %s not handled")
+ % docType)
+ if docType == 'TD04' or docType == 'TD05':
+ invtype = 'in_refund'
+ # 2.1.1.11
+ causLst = FatturaBody.DatiGenerali.DatiGeneraliDocumento.Causale
+ if causLst:
+ for item in causLst:
+ comment += item + '\n'
+ # 2.2.1
+ CodeArts = self.pool['fatturapa.article.code']
+ for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
+ invoice_line_data = self._prepareInvoiceLine(
+ cr, uid, credit_account_id, line, context=context)
+ invoice_line_id = invoice_line_model.create(
+ cr, uid, invoice_line_data, context=context)
+
+ if line.CodiceArticolo:
+ for caline in line.CodiceArticolo:
+ CodeArts.create(
+ cr, uid,
+ {
+ 'name': caline.CodiceTipo or '',
+ 'code_val': caline.CodiceValore or '',
+ 'invoice_line_id': invoice_line_id
+ },
+ context=context
+ )
+ if line.ScontoMaggiorazione:
+ context['drtype'] = 'invoice_line_id'
+ for DiscRisePriceLine in line.ScontoMaggiorazione:
+ DiscRisePriceVals = self._prepareDiscRisePriceLine(
+ cr, uid, invoice_line_id, DiscRisePriceLine,
+ context=context
+ )
+ DiscRisePriceModel.create(
+ cr, uid, DiscRisePriceVals, context=context)
+ invoice_lines.append(invoice_line_id)
+
+ invoice_data = {
+ 'doc_type': docType_id,
+ 'date_invoice':
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data,
+ 'supplier_invoice_number':
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
+ 'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
+ 'account_id': pay_acc_id,
+ 'type': invtype,
+ 'partner_id': partner_id,
+ 'currency_id': currency_id[0],
+ 'journal_id': purchase_journal.id,
+ 'invoice_line': [(6, 0, invoice_lines)],
+ # 'origin': xmlData.datiOrdineAcquisto,
+ 'fiscal_position': False,
+ 'payment_term': False,
+ 'company_id': company.id,
+ 'fatturapa_attachment_in_id': fatturapa_attachment.id,
+ 'comment': comment
+ }
+ # 2.1.1.5
+ Withholding = FatturaBody.DatiGenerali.\
+ DatiGeneraliDocumento.DatiRitenuta
+ if Withholding:
+ invoice_data['withholding_amount'] = Withholding.ImportoRitenuta
+ invoice_data['ftpa_withholding_type'] = Withholding.TipoRitenuta
+ invoice_data['ftpa_withholding_rate'] = float(
+ Withholding.AliquotaRitenuta)/100
+ invoice_data['ftpa_withholding_payment_reason'] = Withholding.\
+ CausalePagamento
+ # 2.1.1.6
+ Stamps = FatturaBody.DatiGenerali.\
+ DatiGeneraliDocumento.DatiBollo
+ if Stamps:
+ invoice_data['virtual_stamp'] = Stamps.BolloVirtuale
+ invoice_data['stamp_amount'] = float(Stamps.ImportoBollo)
+ invoice_id = invoice_model.create(
+ cr, uid, invoice_data, context=context)
+
+ invoice = invoice_model.browse(cr, uid, invoice_id, context=context)
+ # 2.1.1.7
+ Walfares = FatturaBody.DatiGenerali.\
+ DatiGeneraliDocumento.DatiCassaPrevidenziale
+ if Walfares:
+ for walfareLine in Walfares:
+ WalferLineVals = self._prepareWelfareLine(
+ cr, uid, invoice_id, walfareLine, context=context)
+ WelfareFundLineModel.create(
+ cr, uid, WalferLineVals, context=context)
+ # 2.1.1.8
+ DiscountRises = FatturaBody.DatiGenerali.\
+ DatiGeneraliDocumento.ScontoMaggiorazione
+ if DiscountRises:
+ context['drtype'] = 'invoice_id'
+ for DiscRisePriceLine in DiscountRises:
+ DiscRisePriceVals = self._prepareDiscRisePriceLine(
+ cr, uid, invoice_id, DiscRisePriceLine, context=context)
+ DiscRisePriceModel.create(
+ cr, uid, DiscRisePriceVals, context=context)
+ # 2.1.2
+ relOrders = FatturaBody.DatiGenerali.DatiOrdineAcquisto
+ if relOrders:
+ for order in relOrders:
+ doc_datas = self._prepareRelDocsLine(
+ cr, uid, invoice_id, order, 'order', context=context)
+ if doc_datas:
+ for doc_data in doc_datas:
+ rel_docs_model.create(
+ cr, uid, doc_data, context=context)
+ # 2.1.3
+ relContracts = FatturaBody.DatiGenerali.DatiContratto
+ if relContracts:
+ for contract in relContracts:
+ doc_datas = self._prepareRelDocsLine(
+ cr, uid, invoice_id, contract, 'contract', context=context)
+ if doc_datas:
+ for doc_data in doc_datas:
+ rel_docs_model.create(
+ cr, uid, doc_data, context=context)
+ # 2.1.4
+ relAgreements = FatturaBody.DatiGenerali.DatiConvenzione
+ if relAgreements:
+ for agreement in relAgreements:
+ doc_datas = self._prepareRelDocsLine(
+ cr, uid, invoice_id, agreement,
+ 'agreement', context=context)
+ if doc_datas:
+ for doc_data in doc_datas:
+ rel_docs_model.create(
+ cr, uid, doc_data, context=context)
+ # 2.1.5
+ relReceptions = FatturaBody.DatiGenerali.DatiRicezione
+ if relReceptions:
+ for reception in relReceptions:
+ doc_datas = self._prepareRelDocsLine(
+ cr, uid, invoice_id, reception,
+ 'reception', context=context)
+ if doc_datas:
+ for doc_data in doc_datas:
+ rel_docs_model.create(
+ cr, uid, doc_data, context=context)
+ # 2.1.6
+ RelInvoices = FatturaBody.DatiGenerali.DatiFattureCollegate
+ if RelInvoices:
+ for invoice in RelInvoices:
+ doc_datas = self._prepareRelDocsLine(
+ cr, uid, invoice_id, invoice, 'invoice', context=context)
+ if doc_datas:
+ for doc_data in doc_datas:
+ rel_docs_model.create(
+ cr, uid, doc_data, context=context)
+ # 2.1.7
+ SalDatas = FatturaBody.DatiGenerali.DatiSAL
+ if SalDatas:
+ for SalDataLine in SalDatas:
+ SalModel.create(
+ cr, uid,
+ {
+ 'fatturapa_activity_progress': (
+ SalDataLine.RiferimentoFase or 0),
+ 'invoice_id': invoice_id
+ }, context=context
+ )
+ # 2.1.8
+ DdtDatas = FatturaBody.DatiGenerali.DatiDDT
+ if DdtDatas:
+ for DdtDataLine in DdtDatas:
+ if not DdtDataLine.RiferimentoNumeroLinea:
+ DdTModel.create(
+ cr, uid,
+ {
+ 'name': DdtDataLine.NumeroDDT or '',
+ 'date': DdtDataLine.DataDDT or False,
+ 'invoice_id': invoice_id
+ }, context=context
+ )
+ else:
+ for numline in DdtDataLine.RiferimentoNumeroLinea:
+ invoice_line_ids = invoice_line_model.search(
+ cr, uid,
+ [
+ ('invoice_id', '=', invoice_id),
+ ('sequence', '=', int(numline)),
+ ], context=context)
+ invoice_lineid = False
+ if invoice_line_ids:
+ invoice_lineid = invoice_line_ids[0]
+ DdTModel.create(
+ cr, uid,
+ {
+ 'name': DdtDataLine.NumeroDDT or '',
+ 'date': DdtDataLine.DataDDT or False,
+ 'invoice_id': invoice_id,
+ 'invoice_line_id': invoice_lineid
+ }, context=context
+ )
+ # 2.1.9
+ Delivery = FatturaBody.DatiGenerali.DatiTrasporto
+ if Delivery:
+ delivery_id = self.getCarrirerPartner(
+ cr, uid, Delivery, context=context)
+ delivery_dict = {
+ 'carrier_id': delivery_id,
+ 'transport_vehicle': Delivery.MezzoTrasporto or '',
+ 'transport_reason': Delivery.CausaleTrasporto or '',
+ 'number_items': Delivery.NumeroColli or 0,
+ 'description': Delivery.Descrizione or '',
+ 'unit_weight': Delivery.UnitaMisuraPeso or 0.0,
+ 'gross_weight': Delivery.PesoLordo or 0.0,
+ 'net_weight': Delivery.PesoNetto or 0.0,
+ 'pickup_datetime': Delivery.DataOraRitiro or False,
+ 'transport_date': Delivery.DataInizioTrasporto or False,
+ 'delivery_datetime': Delivery.DataOraConsegna or False,
+ 'delivery_address': '',
+ }
+
+ if Delivery.IndirizzoResa:
+ delivery_dict['delivery_address'] = (
+ '{0}, {1}\n{2} - {3}\n{4} {5}'.format(
+ Delivery.IndirizzoResa.Indirizzo or '',
+ Delivery.IndirizzoResa.NumeroCivico or '',
+ Delivery.IndirizzoResa.CAP or '',
+ Delivery.IndirizzoResa.Comune or '',
+ Delivery.IndirizzoResa.Provincia or '',
+ Delivery.IndirizzoResa.Nazione or ''
+ )
+ )
+ if Delivery.TipoResa:
+ StockModel = self.pool['stock.incoterms']
+ stock_incoterm_id = StockModel.search(
+ cr, uid, [('code', '=', Delivery.TipoResa)],
+ context=context
+ )
+ if stock_incoterm_id:
+ delivery_dict['incoterm'] = stock_incoterm_id[0]
+ invoice_model.write(
+ cr, uid, invoice_id, delivery_dict, context=context)
+ # 2.2.2
+ Summary_datas = FatturaBody.DatiBeniServizi.DatiRiepilogo
+ if Summary_datas:
+ for summary in Summary_datas:
+ summary_line = {
+ 'tax_rate': summary.AliquotaIVA or 0.0,
+ 'non_taxable_nature': summary.Natura or False,
+ 'incidental charges': summary.SpeseAccessorie or 0.0,
+ 'rounding': summary.Arrotondamento or 0.0,
+ 'amount_untaxed': summary.ImponibileImporto or 0.0,
+ 'amount_tax': summary.Imposta or 0.0,
+ 'payability': summary.EsigibilitaIVA or False,
+ 'law_reference': summary.RiferimentoNormativo or '',
+ 'invoice_id': invoice_id,
+ }
+ SummaryDatasModel.create(
+ cr, uid, summary_line, context=context)
+
+ # 2.1.10
+ ParentInvoice = FatturaBody.DatiGenerali.FatturaPrincipale
+ if ParentInvoice:
+ parentinv_vals = {
+ 'related_invoice_code':
+ ParentInvoice.NumeroFatturaPrincipale or '',
+ 'related_invoice_date':
+ ParentInvoice.DataFatturaPrincipale or False
+ }
+ invoice_model.write(
+ cr, uid, invoice_id, parentinv_vals, context=context)
+ # 2.3
+ Vehicle = FatturaBody.DatiVeicoli
+ if Vehicle:
+ veicle_vals = {
+ 'vehicle_registration': Vehicle.Data or False,
+ 'total_travel': Vehicle.TotalePercorso or '',
+ }
+ invoice_model.write(
+ cr, uid, invoice_id, veicle_vals, context=context)
+ # 2.4
+ PaymentsData = FatturaBody.DatiPagamento
+ if PaymentsData:
+ for PaymentLine in PaymentsData:
+ cond = PaymentLine.CondizioniPagamento or False
+ if not cond:
+ raise orm.except_orm(
+ _('Error!'),
+ _('Payment method Code not found in document')
+ )
+ term_id = False
+ term_ids = PaymentTermsModel.search(
+ cr, uid, [('code', '=', cond)], context=context)
+ if not term_ids:
+ raise orm.except_orm(
+ _('Error!'),
+ _('Payment method Code %s is incorrect') % cond
+ )
+ else:
+ term_id = term_ids[0]
+ PayDataId = PaymentDataModel.create(
+ cr, uid,
+ {
+ 'payment_terms': term_id,
+ 'invoice_id': invoice_id
+ },
+ context=context
+ )
+ self._createPayamentsLine(
+ cr, uid, PayDataId, PaymentLine, partner_id,
+ context=context
+ )
+ # 2.5
+ AttachmentsData = FatturaBody.Allegati
+ if AttachmentsData:
+ AttachModel = self.pool['fatturapa.attachments']
+ for attach in AttachmentsData:
+ if not attach.NomeAttachment:
+ raise orm.except_orm(
+ _('Error!'),
+ _('Attachment Name is Required')
+ )
+ content = attach.Attachment
+ name = attach.NomeAttachment
+ _attach_dict = {
+ 'name': name,
+ 'datas': base64.b64encode(str(content)),
+ 'datas_fname': name,
+ 'description': attach.DescrizioneAttachment or '',
+ 'compression': attach.AlgoritmoCompressione or '',
+ 'format': attach.FormatoAttachment or '',
+ 'invoice_id': invoice_id,
+ }
+ AttachModel.create(
+ cr, uid, _attach_dict, context=context)
+
+ self._addGlobalDiscount(
+ cr, uid, invoice_id,
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento, context=context)
+
+ # compute the invoice
+ invoice_model.button_compute(
+ cr, uid, [invoice_id], context=context,
+ set_total=True)
+ return invoice_id
+
+ def check_CessionarioCommittente(
+ self, cr, uid, company, FatturaElettronicaHeader, context=None
+ ):
+ if (
+ company.partner_id.ipa_code !=
+ FatturaElettronicaHeader.DatiTrasmissione.CodiceDestinatario
+ ):
+ raise orm.except_orm(
+ _('Error'),
+ _('XML IPA code (%s) different from company IPA code (%s)')
+ % (
+ FatturaElettronicaHeader.DatiTrasmissione.
+ CodiceDestinatario, company.partner_id.ipa_code))
+
+ def compute_xml_amount_untaxed(self, cr, uid, DatiRiepilogo, context=None):
+ amount_untaxed = 0.0
+ for Riepilogo in DatiRiepilogo:
+ amount_untaxed += float(Riepilogo.ImponibileImporto)
+ return amount_untaxed
+
+ def check_invoice_amount(
+ self, cr, uid, invoice, FatturaElettronicaBody, context=None
+ ):
+ if context is None:
+ context = {}
+
+ invoice.write(
+ {
+ 'check_total': FatturaElettronicaBody.DatiGenerali.
+ DatiGeneraliDocumento.ImportoTotaleDocumento
+ }, context=context)
+ if (
+ FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
+ ScontoMaggiorazione and
+ FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
+ ImportoTotaleDocumento
+ ):
+ # assuming that, if someone uses
+ # DatiGeneraliDocumento.ScontoMaggiorazione, also fills
+ # DatiGeneraliDocumento.ImportoTotaleDocumento
+ ImportoTotaleDocumento = float(
+ FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
+ ImportoTotaleDocumento)
+ if invoice.amount_total != ImportoTotaleDocumento:
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _('Invoice total %s is different from '
+ 'ImportoTotaleDocumento %s')
+ % (invoice.amount_total, ImportoTotaleDocumento)
+ )
+ else:
+ # else, we can only check DatiRiepilogo if
+ # DatiGeneraliDocumento.ScontoMaggiorazione is not present,
+ # because otherwise DatiRiepilogo and openerp invoice total would
+ # differ
+ amount_untaxed = self.compute_xml_amount_untaxed(
+ cr, uid,
+ FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo,
+ context=context)
+ if invoice.amount_untaxed != amount_untaxed:
+ if context.get('inconsistencies'):
+ context['inconsistencies'] += '\n'
+ context['inconsistencies'] += (
+ _('Computed amount untaxed %s is different from'
+ ' DatiRiepilogo %s')
+ % (invoice.amount_untaxed, amount_untaxed)
+ )
+
+ def strip_xml_content(self, xml):
+ root = etree.XML(xml)
+ for elem in root.iter('*'):
+ if elem.text is not None:
+ elem.text = elem.text.strip()
+ return etree.tostring(root)
+
+ def remove_xades_sign(self, xml):
+ root = etree.XML(xml)
+ for elem in root.iter('*'):
+ if elem.tag.find('Signature') > -1:
+ elem.getparent().remove(elem)
+ break
+ return etree.tostring(root)
+
+ def check_file_is_pem(self, p7m_file):
+ file_is_pem = True
+ strcmd = (
+ 'openssl asn1parse -inform PEM -in %s'
+ ) % (p7m_file)
+ cmd = shlex.split(strcmd)
+ try:
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+ stdoutdata, stderrdata = proc.communicate()
+ if proc.wait() != 0:
+ file_is_pem = False
+ except Exception as e:
+ raise orm.except_orm(
+ _('Errore'),
+ _(
+ 'Check PEM file %s'
+ ) % e.args
+ )
+ return file_is_pem
+
+ def parse_pem_2_der(self, pem_file, tmp_der_file):
+ strcmd = (
+ 'openssl asn1parse -in %s -out %s'
+ ) % (pem_file, tmp_der_file)
+ cmd = shlex.split(strcmd)
+ try:
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+ stdoutdata, stderrdata = proc.communicate()
+ if proc.wait() != 0:
+ _logger.warning(stdoutdata)
+ raise Exception(stderrdata)
+ except Exception as e:
+ raise orm.except_orm(
+ _('Errore'),
+ _(
+ 'Parsing PEM to DER file %s'
+ ) % e.args
+ )
+ if not os.path.isfile(tmp_der_file):
+ raise orm.except_orm(
+ _('Errore'),
+ _(
+ 'ASN.1 structure is not parsable in DER'
+ )
+ )
+ return tmp_der_file
+
+ def decrypt_to_xml(self, signed_file, xml_file):
+ strcmd = (
+ 'openssl smime -decrypt -verify -inform'
+ ' DER -in %s -noverify -out %s'
+ ) % (signed_file, xml_file)
+ cmd = shlex.split(strcmd)
+ try:
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+ stdoutdata, stderrdata = proc.communicate()
+ if proc.wait() != 0:
+ _logger.warning(stdoutdata)
+ raise Exception(stderrdata)
+ except Exception as e:
+ raise orm.except_orm(
+ _('Errore'),
+ _(
+ 'Signed Xml file %s'
+ ) % e.args
+ )
+ if not os.path.isfile(xml_file):
+ raise orm.except_orm(
+ _('Errore'),
+ _(
+ 'Signed Xml file not decryptable'
+ )
+ )
+ return xml_file
+
+ def importFatturaPA(self, cr, uid, ids, context=None):
+ if not context:
+ context = {}
+ context['inconsistencies'] = ''
+ fatturapa_attachment_obj = self.pool['fatturapa.attachment.in']
+ fatturapa_attachment_ids = context.get('active_ids', False)
+ invoice_model = self.pool['account.invoice']
+ new_invoices = []
+ for fatturapa_attachment_id in fatturapa_attachment_ids:
+ ctx = context.copy()
+ fatturapa_attachment = fatturapa_attachment_obj.browse(
+ cr, uid, fatturapa_attachment_id, context=ctx)
+ if fatturapa_attachment.in_invoice_ids:
+ raise orm.except_orm(
+ _("Error"), _("File is linked to invoices yet"))
+ # decrypt p7m file
+ if fatturapa_attachment.datas_fname.lower().endswith('.p7m'):
+ temp_file_name = (
+ '/tmp/%s' % fatturapa_attachment.datas_fname.lower())
+ temp_der_file_name = (
+ '/tmp/%s_tmp' % fatturapa_attachment.datas_fname.lower())
+ with open(temp_file_name, 'w') as p7m_file:
+ p7m_file.write(fatturapa_attachment.datas.decode('base64'))
+ xml_file_name = os.path.splitext(temp_file_name)[0]
+
+ # check if temp_file_name is a PEM file
+ file_is_pem = self.check_file_is_pem(temp_file_name)
+
+ # if temp_file_name is a PEM file
+ # parse it in a DER file
+ if file_is_pem:
+ temp_file_name = self.parse_pem_2_der(
+ temp_file_name, temp_der_file_name)
+
+ # decrypt signed DER file in XML readable
+ xml_file_name = self.decrypt_to_xml(
+ temp_file_name, xml_file_name)
+
+ with open(xml_file_name, 'r') as fatt_file:
+ file_content = fatt_file.read()
+ xml_string = file_content
+ elif fatturapa_attachment.datas_fname.lower().endswith('.xml'):
+ xml_string = fatturapa_attachment.datas.decode('base64')
+ xml_string = self.remove_xades_sign(xml_string)
+ xml_string = self.strip_xml_content(xml_string)
+ fatt = fatturapa_v_1_1.CreateFromDocument(xml_string)
+ cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
+ # 1.2
+ partner_id = self.getCedPrest(
+ cr, uid, cedentePrestatore, context=ctx)
+ # 1.3
+ TaxRappresentative = fatt.FatturaElettronicaHeader.\
+ RappresentanteFiscale
+ # 1.5
+ Intermediary = fatt.FatturaElettronicaHeader.\
+ TerzoIntermediarioOSoggettoEmittente
+ # 2
+ for fattura in fatt.FatturaElettronicaBody:
+ invoice_id = self.invoiceCreate(
+ cr, uid, fatt, fatturapa_attachment, fattura,
+ partner_id, context=ctx)
+ if TaxRappresentative:
+ tax_partner_id = self.getPartnerBase(
+ cr, uid, TaxRappresentative.DatiAnagrafici,
+ context=ctx)
+ invoice_model.write(
+ cr, uid, invoice_id,
+ {
+ 'tax_representative_id': tax_partner_id
+ }, context=ctx
+ )
+ if Intermediary:
+ Intermediary_id = self.getPartnerBase(
+ cr, uid, Intermediary.DatiAnagrafici, context=ctx)
+ invoice_model.write(
+ cr, uid, invoice_id,
+ {
+ 'intermediary': Intermediary_id
+ }, context=ctx
+ )
+ new_invoices.append(invoice_id)
+ invoice = invoice_model.browse(cr, uid, invoice_id, ctx)
+ self.check_CessionarioCommittente(
+ cr, uid, invoice.company_id, fatt.FatturaElettronicaHeader,
+ context=ctx)
+ self.check_invoice_amount(
+ cr, uid, invoice,
+ fattura,
+ context=ctx)
+
+ if ctx.get('inconsistencies'):
+ invoice.write(
+ {'inconsistencies': ctx['inconsistencies']},
+ context=ctx)
+
+ return {
+ 'view_type': 'form',
+ 'name': "PA Supplier Invoices",
+ 'view_mode': 'tree,form',
+ 'res_model': 'account.invoice',
+ 'type': 'ir.actions.act_window',
+ 'domain': [('id', 'in', new_invoices)],
+ 'context': context
+ }
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
new file mode 100644
index 000000000000..ad207b533b44
--- /dev/null
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ Import FatturaPA
+ wizard.import.fatturapa
+
+
+
+
+
+
+
+
+
From 7b027d4587bfe0e757481770a31a122f58a8a8f0 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Tue, 10 Jul 2018 07:57:12 +0200
Subject: [PATCH 002/155] porting l10n_it_fatturapa_in to 10 (REF withholding
tax integration, invoice interface, fiscal document type ADD some
DatiGeneraliDocumento fields) ADD _setTerzoIntermediarioOSoggettoEmittente to
l10n_it_fatturapa_out
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
l10n_it_ipa ADD is_pa bool field
ADD PECDestinatario, CodiceDestinatario , FormatoTrasmissione handling
ADD Lotto di fatture verso soggetto privato
ADD gestione prodotti nelle fatture passive
ADD l10n_it_fatturapa_in_purchase
ADD einvoice.line model
IMP form fatture
ADD Livello di dettaglio Fatture elettroniche
ADD PDF preview dell'XML
ADD Link to existing supplier invoice
and handle "registered" XML
ADD rappresentante fiscale e stabile organizzazione in emissione
gestione prodotti DatiBollo , DatiCassaPrevidenziale e ScontoMaggiorazione
CodiceArticolo, ftpa_line_number
IMP "show preview" as link
FIX invoice duplication
ADD constraints and Nome Cognome
Avoid to cancel invoice with XML
Mostra i dati fattura elettronica solo se il cliente è soggetto
IMP READMEs
Gestione IVA inclusa nel prezzo
ADD l10n_it_fatturapa_out_ddt
IMP PEP8
IMP decimal precision
ADD Export E-invoice button
IMP README
---
l10n_it_fatturapa_in/README.rst | 117 ++
l10n_it_fatturapa_in/__init__.py | 19 -
l10n_it_fatturapa_in/__manifest__.py | 28 +
l10n_it_fatturapa_in/__openerp__.py | 94 --
l10n_it_fatturapa_in/i18n/it.po | 1041 +++++++++----
.../i18n/l10n_it_fatturapa_in.pot | 898 ++++++++++++
l10n_it_fatturapa_in/models/__init__.py | 22 +-
l10n_it_fatturapa_in/models/account.py | 157 +-
l10n_it_fatturapa_in/models/attachment.py | 92 +-
l10n_it_fatturapa_in/models/company.py | 69 +
l10n_it_fatturapa_in/models/partner.py | 29 +
l10n_it_fatturapa_in/readme/CONFIGURE.rst | 14 +
l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst | 3 +
l10n_it_fatturapa_in/readme/DESCRIPTION.rst | 7 +
l10n_it_fatturapa_in/readme/INSTALL.rst | 3 +
l10n_it_fatturapa_in/readme/USAGE.rst | 6 +
.../security/ir.model.access.csv | 2 +
.../static/description/index.html | 460 ++++++
l10n_it_fatturapa_in/tests/__init__.py | 20 -
...7890_11002.xml => IT01234567890_FPR03.xml} | 94 +-
.../tests/data/IT02780790107_11003.xml | 172 ---
.../tests/data/IT02780790107_11004.xml | 14 +-
.../tests/data/IT02780790107_11005.xml | 25 +-
.../tests/data/IT02780790107_11006.xml | 9 +-
.../tests/data/IT02780790107_11007.xml | 12 +-
.../tests/data/IT05979361218_001.xml | 24 +-
.../tests/data/IT05979361218_002.xml | 15 +-
.../tests/data/IT05979361218_003.xml | 19 +-
.../tests/data/IT05979361218_004.xml | 15 +-
.../tests/data/IT05979361218_005.xml | 13 +-
.../tests/data/IT05979361218_006.XML | 13 +-
.../tests/data/IT05979361218_007.xml | 17 +-
.../tests/data/IT05979361218_008.xml | 13 +-
.../tests/data/IT05979361218_009.xml | 95 ++
.../tests/test_import_fatturapa_xml.py | 374 +++--
l10n_it_fatturapa_in/views/account_view.xml | 558 +++----
l10n_it_fatturapa_in/views/company_view.xml | 25 +
l10n_it_fatturapa_in/views/partner_view.xml | 22 +-
l10n_it_fatturapa_in/wizard/__init__.py | 20 +-
.../wizard/link_to_existing_invoice.py | 20 +
.../wizard/link_to_existing_invoice.xml | 34 +
.../wizard/wizard_import_fatturapa.py | 1306 ++++++++---------
.../wizard/wizard_import_fatturapa_view.xml | 25 +-
43 files changed, 4053 insertions(+), 1962 deletions(-)
create mode 100644 l10n_it_fatturapa_in/README.rst
create mode 100644 l10n_it_fatturapa_in/__manifest__.py
delete mode 100644 l10n_it_fatturapa_in/__openerp__.py
create mode 100644 l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
create mode 100644 l10n_it_fatturapa_in/models/company.py
create mode 100644 l10n_it_fatturapa_in/models/partner.py
create mode 100644 l10n_it_fatturapa_in/readme/CONFIGURE.rst
create mode 100644 l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
create mode 100644 l10n_it_fatturapa_in/readme/DESCRIPTION.rst
create mode 100644 l10n_it_fatturapa_in/readme/INSTALL.rst
create mode 100644 l10n_it_fatturapa_in/readme/USAGE.rst
create mode 100644 l10n_it_fatturapa_in/static/description/index.html
rename l10n_it_fatturapa_in/tests/data/{IT01234567890_11002.xml => IT01234567890_FPR03.xml} (53%)
delete mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_009.xml
create mode 100644 l10n_it_fatturapa_in/views/company_view.xml
create mode 100644 l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
create mode 100644 l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
new file mode 100644
index 000000000000..91656857baa3
--- /dev/null
+++ b/l10n_it_fatturapa_in/README.rst
@@ -0,0 +1,117 @@
+====================================================
+Italian Localization - Fattura Elettronica reception
+====================================================
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
+ :target: https://odoo-community.org/page/development-status
+ :alt: Beta
+.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License: LGPL-3
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
+ :target: https://github.com/OCA/l10n-italy/tree/10.0/l10n_it_fatturapa_in
+ :alt: OCA/l10n-italy
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_in
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/122/10.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
+This module allows to import XML files of electronic invoices, version 1.2
+
+http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
+
+received through the exchange system (SDI)
+
+http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
+
+**Table of contents**
+
+.. contents::
+ :local:
+
+Installation
+============
+
+odoo server must run on linux and be able to run
+
+``openssl``
+
+Configuration
+=============
+
+Also see the README file of l10n_it_fatturapa module.
+
+For every supplier, it is possible to set the 'details level of electronic invoices':
+
+ - Minimum level: Supplier invoice is created without lines; user will have to create them, according to what specified in electronic invoice
+ - Maximum level: every line contained in electronic invoice will create a line in supplier invoice.
+
+Moreover, it is possible, in supplier form, to set the 'default product for electronic invoices': this product will be used, during generation of supplier invoices, when no other possible product is found. Tax and account of invoice line will be set according to what configured in the product.
+
+Every product code used by suppliers can be set, in product form, in
+
+Inventory --> Suppliers
+
+If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in invoice line, setting the related tax and account.
+
+Usage
+=====
+
+ * Go to Accounting --> Purchases --> Electronic Invoice
+ * Upload XML file
+ * View invoice content clicking on 'show preview'
+ * Run 'import electronic invoice' wizard to create a draft invoice or run 'link to existing supplier invoice' to link the XML file to an already (automatically) created invoice
+
+In the incoming electronic invoice files list, by default you will see files to be registered, that is files not yet linked to one or more supplier invoices
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* Agile Business Group
+* Innoviu
+
+Contributors
+~~~~~~~~~~~~
+
+* Lorenzo Battistini
+* Roberto Onnis
+* Alessio Gerace
+
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
+This module is part of the `OCA/l10n-italy `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/l10n_it_fatturapa_in/__init__.py b/l10n_it_fatturapa_in/__init__.py
index 823e6fcb9a56..574498c3b125 100644
--- a/l10n_it_fatturapa_in/__init__.py
+++ b/l10n_it_fatturapa_in/__init__.py
@@ -1,23 +1,4 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2015 AgileBG SAGL
-# Copyright (C) 2015 innoviu Srl
-#
-# 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 . import models
from . import tests
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
new file mode 100644
index 000000000000..e00688104d9a
--- /dev/null
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+# Copyright 2015 AgileBG SAGL
+# Copyright 2015 innoviu Srl
+# Copyright 2018 Lorenzo Battistini
+
+{
+ 'name': 'Italian Localization - Fattura Elettronica reception',
+ 'version': '10.0.1.0.0',
+ 'category': 'Localization/Italy',
+ 'summary': 'Electronic invoices reception',
+ 'author': 'Agile Business Group, Innoviu, '
+ 'Odoo Community Association (OCA)',
+ 'website': 'http://www.agilebg.com',
+ 'license': 'LGPL-3',
+ "depends": [
+ 'l10n_it_fatturapa',
+ 'l10n_it_withholding_tax_causali',
+ ],
+ "data": [
+ 'views/account_view.xml',
+ 'views/partner_view.xml',
+ 'wizard/wizard_import_fatturapa_view.xml',
+ 'security/ir.model.access.csv',
+ 'wizard/link_to_existing_invoice.xml',
+ 'views/company_view.xml',
+ ],
+ "installable": True
+}
diff --git a/l10n_it_fatturapa_in/__openerp__.py b/l10n_it_fatturapa_in/__openerp__.py
deleted file mode 100644
index 8a8013b893fc..000000000000
--- a/l10n_it_fatturapa_in/__openerp__.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2015 AgileBG SAGL
-# Copyright (C) 2015 innoviu Srl
-#
-# 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 .
-#
-##############################################################################
-{
- 'name': 'Italian Localization - FatturaPA reception',
- 'version': '0.1',
- 'category': 'Localization/Italy',
- 'summary': 'Electronic invoices reception',
- 'author': 'Agile Business Group, Innoviu, '
- 'Odoo Community Association (OCA)',
- 'description': """
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :alt: License
-
-
-Italian Localization - FatturaPA - Reception
-============================================
-
-This module allows you to receive and parse the fatturaPA XML file version 1.1
-http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm
-received from the Exchange System
-http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm
-
-
-Configuration
-=============
-
-See l10n_it_fatturapa
-
-Usage
-=====
-
- * Go to knowledge -> Documents
- * Create a Incoming fatturaPA file
- * Run Import FatturaPA wizard
-
-Credits
-=======
-
-Contributors
-------------
-
-* Lorenzo Battistini
-* Roberto Onnis
-* Alessio Gerace
-
-Maintainer
-----------
-
-.. image:: http://odoo-community.org/logo.png
- :alt: Odoo Community Association
- :target: http://odoo-community.org
-
-This module is maintained by the OCA.
-
-OCA, or the Odoo Community Association, is a nonprofit organization whose
-mission is to support the collaborative development of Odoo features and
-promote its widespread use.
-
-To contribute to this module, please visit http://odoo-community.org.
-""",
- 'website': 'http://www.agilebg.com',
- 'license': 'AGPL-3',
- "depends": [
- 'l10n_it_fatturapa',
- 'partner_firstname',
- 'stock_invoice_picking_incoterm',
- 'l10n_it_withholding_tax',
- ],
- "data": [
- 'views/account_view.xml',
- 'views/partner_view.xml',
- 'wizard/wizard_import_fatturapa_view.xml',
- 'security/ir.model.access.csv',
- ],
- "installable": True
-}
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 8ccb9628d9b1..12c0439947bf 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -1,570 +1,979 @@
-# Translation of OpenERP Server.
+# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * l10n_it_fatturapa_in
-#
-# Translators:
+# * l10n_it_fatturapa_in
+#
msgid ""
msgstr ""
-"Project-Id-Version: l10n-italy (7.0)\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-11-25 16:46+0000\n"
-"PO-Revision-Date: 2015-11-18 17:08+0000\n"
+"POT-Creation-Date: 2018-09-27 08:07+0000\n"
+"PO-Revision-Date: 2018-09-27 08:07+0000\n"
"Last-Translator: <>\n"
-"Language-Team: Italian (http://www.transifex.com/oca/OCA-l10n-italy-7-0/language/it/)\n"
+"Language-Team: \n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: it\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: \n"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice,fatturapa_attachment_in_id:0
-msgid "FatturaPA Import File"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_amount
+msgid "Aliquota IVA"
+msgstr "Aliquota IVA"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Altri Dati Gestionali"
+msgstr "Altri Dati Gestionali"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_ids
+msgid "Altri dati gestionali"
+msgstr "Altri dati gestionali"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_ir_attachment_id
+msgid "Attachment"
+msgstr "Allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1229
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_name
+msgid "Attachment Name"
+msgstr "Nome Allegato"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_local_url
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_website_url
+msgid "Attachment URL"
+msgstr "URL Allegato"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1161
#, python-format
-msgid "Parsing PEM to DER file %s"
-msgstr ""
+msgid "Attachment without name"
+msgstr "Allegato senza nome"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice.line,cod_article_ids:0
-msgid "Cod. Articles"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Attachments"
+msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:97
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:691
#, python-format
-msgid "DatiAnagrafici.Anagrafica.Cognome contains \"%s\". Your System contains \"%s\""
+msgid ""
+"BIC is required and not exist in Xml\n"
+"Curr bank data is: \n"
+"IBAN: %s\n"
+"Bank Name: %s\n"
msgstr ""
+"BIC è richiesto e non esiste nell'XML\n"
+"I dati della banca corrente sono: \n"
+"IBAN: %s\n"
+"Nome banca: %s\n"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1208
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1228
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1235
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1256
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1263
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:578
#, python-format
-msgid "Errore"
+msgid "Bollo assolto ai sensi del decreto MEF 17 giugno 2014 (art. 6)"
+msgstr "Bollo assolto ai sensi del decreto MEF 17 giugno 2014 (art. 6)"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
+msgid "Cancel"
+msgstr "Annulla"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:954
+#, python-format
+msgid "Cassa Previdenziale: %s"
+msgstr "Cassa Previdenziale: %s"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:962
+#, python-format
+msgid ""
+"CassaPrevidenziale %s has Ritenuta but no withholding tax was found in the "
+"system"
msgstr ""
+"CassaPrevidenziale %s ha la ritenuta me nessuna ritenuta è stata trovata nel "
+"sistema"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.article.code,code_val:0
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_checksum
+msgid "Checksum/SHA1"
+msgstr "Checksum/SHA1"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_name
+msgid "Cod Type"
+msgstr "Tipo codice"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_cod_article_ids
+msgid "Cod. Articles"
+msgstr "Codici articoli"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_code_val
msgid "Code Value"
-msgstr ""
+msgstr "Valore codice"
#. module: l10n_it_fatturapa_in
-#: view:res.partner:0
-msgid "FatturaPA Registration"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Codice Articoli"
+msgstr "Codice Articoli"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Inconsistencies"
-msgstr ""
+#: model:ir.model,name:l10n_it_fatturapa_in.model_res_company
+msgid "Companies"
+msgstr "Aziende"
#. module: l10n_it_fatturapa_in
-#: selection:account.invoice.line,service_type:0
-msgid "sconto"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_company_id
+msgid "Company"
+msgstr "Azienda"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1257
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1221
#, python-format
-msgid "Signed Xml file %s"
-msgstr ""
+msgid "Computed amount untaxed %s is different from DatiRiepilogo %s"
+msgstr "L'imponibile calcolato %s è diverso da quello di DatiRiepilogo %s"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,message_unread:0
-msgid "Unread Messages"
-msgstr ""
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:151
+#, python-format
+msgid "Country Code %s not found in system"
+msgstr "Codice nazione %s non trovato nel sistema"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:771
-#, python-format
-msgid "tipoDocumento %s not handled"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_create_uid
+msgid "Created by"
+msgstr "Creato da"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Related Documents "
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_create_date
+msgid "Created on"
+msgstr "Creato il"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:311
-#, python-format
-msgid "Too many taxes with percentage %s and nature %s found"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Creation"
+msgstr "Creazione"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_end_date
+msgid "Data Fine Periodo"
+msgstr "Data Fine Periodo"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_start_date
+msgid "Data Inizio Periodo"
+msgstr "Data Inizio Periodo"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_db_datas
+msgid "Database Data"
+msgstr "Dati Database"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Dati generali"
+msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1061
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:102
#, python-format
-msgid "Payment method Code %s is incorrect"
+msgid ""
+"DatiAnagrafici.Anagrafica.Cognome contains \"%s\". Your System contains \"%s"
+"\""
msgstr ""
+"DatiAnagrafici.Anagrafica.Cognome contiene \"%s\". Il tuo database contiene "
+"\"%s\""
#. module: l10n_it_fatturapa_in
-#: view:fatturapa.attachment.in:0
-msgid "History"
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:85
+#, python-format
+msgid ""
+"DatiAnagrafici.Anagrafica.Denominazione contains \"%s\". Your System "
+"contains \"%s\""
msgstr ""
+"DatiAnagrafici.Anagrafica.Denominazione contiene \"%s\". Il tuo database "
+"contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:453
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:93
#, python-format
-msgid "TipoCassa is not defined "
+msgid ""
+"DatiAnagrafici.Anagrafica.Nome contains \"%s\". Your System contains \"%s\""
msgstr ""
+"DatiAnagrafici.Anagrafica.Nome contiene \"%s\". Il tuo database contiene \"%s"
+"\""
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,message_ids:0
-msgid "Messages"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_partner_e_invoice_default_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_default_product_id
+msgid "Default product electronic invoice"
+msgstr "Default product electronic invoice"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:248
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:746
#, python-format
-msgid "REA Office Code ( %s ) not present in system"
-msgstr ""
+msgid "Define a purchase journal for this company: \"%s\" (id:%d)."
+msgstr "Definire un sezionale di acquisto per questa azienda: \"%s\" (id:%d)."
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Delivery"
+msgstr "Consegna"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_description
+msgid "Description"
+msgstr "Descrizione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_name
+msgid "Descrizione"
+msgstr "Descrizione"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Dettaglio Linea"
+msgstr "Dettaglio Linea"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_e_invoice_line_ids
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Dettaglio Linee"
+msgstr "Dettaglio Linee"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_discount_rise_price_ids
+msgid "Discount and Rise Price Details"
+msgstr "Dettagli sconto e maggiorazione"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_display_name
+msgid "Display Name"
+msgstr "Nome Visualizzato"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_fatturapa_attachment_in_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_line_fatturapa_attachment_in_id
+msgid "E-Invoice Import File"
+msgstr "File fattura elettronica"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "E-invoice Inconsistencies"
+msgstr "Inconsistenze fattura elettronica"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "E-invoice details"
+msgstr "Dettagli fattura elettronica"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Fattura PA V1.2 Schema"
+msgstr "XML Schema V1.2"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
+msgid "FatturaPA Article Code"
+msgstr "Codice articolo fattura elettronica"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_discount_rise_price
+msgid "FatturaPA Discount Rise Price Data"
+msgstr "Dati sconto maggiorazione"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
+msgid "FatturaPA import File"
+msgstr "Fattura Elettronica Importazione File"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:47
#, python-format
-msgid "File is linked to invoices yet"
-msgstr ""
+msgid "File %s is linked to invoices yet"
+msgstr "Il file %s è già collegato a delle fatture"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_datas
+msgid "File Content"
+msgstr "Contenuto del File"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:232
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:304
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:310
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:452
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:561
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:697
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:743
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1052
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1060
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1084
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_datas_fname
+msgid "File Name"
+msgstr "Nome File"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_file_size
+msgid "File Size"
+msgstr "Dimensione File"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1244
#, python-format
-msgid "Error!"
-msgstr ""
+msgid "File is linked to invoices yet"
+msgstr "Il file è già collegato a delle fatture"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:533
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
#, python-format
msgid "Global invoice discount from DatiGeneraliDocumento"
-msgstr ""
+msgstr "Sconto globale da DatiGeneraliDocumento"
#. module: l10n_it_fatturapa_in
-#: help:fatturapa.attachment.in,message_unread:0
-msgid "If checked new messages require your attention."
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "History"
+msgstr "Storico"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice.line,service_type:0
-msgid "Service Type"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_id
+msgid "ID"
+msgstr "ID"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+msgid "Import"
+msgstr "Importa"
#. module: l10n_it_fatturapa_in
-#: view:fatturapa.attachment.in:0
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_import_fatturapa
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+msgid "Import Fattura Elettronica"
+msgstr "Import Fattura Elettronica"
+
+#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_import_fatturapa
-#: view:wizard.import.fatturapa:0
msgid "Import FatturaPA"
-msgstr "Importa FatturaPA"
+msgstr "Importa Fattura Elettronica"
#. module: l10n_it_fatturapa_in
-#: help:fatturapa.attachment.in,message_summary:0
-msgid ""
-"Holds the Chatter summary (number of messages, ...). This summary is "
-"directly in html format in order to be inserted in kanban views."
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_inconsistencies
+msgid "Import Inconsistencies"
+msgstr "Inconsistenze"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Related Documents"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_in_invoice_ids
+msgid "In Invoices"
+msgstr "Fatture passive"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Welfare Fund Details"
-msgstr ""
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_fattura_pa_in
+#: model:ir.ui.menu,name:l10n_it_fatturapa_in.menu_fattura_pa_in_tree
+msgid "Incoming Fattura Elettronica files"
+msgstr "File in ingresso Fattura Elettronica"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:698
-#, python-format
-msgid "Define a purchase journal for this company: \"%s\" (id:%d)."
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_index_content
+msgid "Indexed Content"
+msgstr "Contenuto Indicizzato"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_invoice_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_invoice_id
+msgid "Invoice"
+msgstr "Fattura"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
+msgid "Invoice Line"
+msgstr "Riga Fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:562
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1206
#, python-format
-msgid "ModalitaPagamento %s not defined in your system"
-msgstr ""
+msgid "Invoice total %s is different from ImportoTotaleDocumento %s"
+msgstr "Il totale fattura %s è diverso da ImportoTotaleDocumento %s"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,message_follower_ids:0
-msgid "Followers"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Invoices"
+msgstr "Fatture"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Rise Price Discount"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_number
+msgid "Invoices number"
+msgstr "Numero fatture"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice.line:0
-msgid "Articles Code"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_total
+msgid "Invoices total"
+msgstr "Totale fatture"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:132
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:171
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:212
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:247
-#, python-format
-msgid "Error !"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_public
+msgid "Is public document"
+msgstr "È un documento pubblico"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "FatturaPA Payment"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice___last_update
+msgid "Last Modified on"
+msgstr "Ultima modifica il"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice.line,service_start:0
-msgid "Service start at"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_write_uid
+msgid "Last Updated by"
+msgstr "Ultima modifica di"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:623
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_write_date
+msgid "Last Updated on"
+msgstr "Ultima modifica il"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:308
#, python-format
-msgid "Name of Bank with BIC \"%s\" is not set. Can't create bank"
+msgid ""
+"Line '%s': Too many taxes with percentage equals to \"%s\"\n"
+"fix it if required"
msgstr ""
+"Riga '%s': Troppe imposte con aliquota uguale a\"%s\"\n"
+"correggere se necessario"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Payments Details"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
+msgid "Link"
+msgstr "Collega"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,in_invoice_ids:0
-msgid "In Invoices"
-msgstr ""
+#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice
+msgid "Link to Supplier Invoice"
+msgstr "Collega a fattura fornitore"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "FatturaPA"
-msgstr ""
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_link_supplier_invoice
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
+msgid "Link to existing supplier invoice"
+msgstr "Collega a fattura fornitore esistente"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:135
-#, python-format
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_e_invoice_detail_level
+msgid "Livello di dettaglio Fatture elettroniche"
+msgstr "Livello di dettaglio Fatture elettroniche"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_detail_level
+#, fuzzy
+msgid "Livello di dettaglio Fatture elettroniche passive"
+msgstr "Livello di dettaglio Fatture elettroniche"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_users_e_invoice_detail_level
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_wizard_import_fatturapa_e_invoice_detail_level
+#, fuzzy
msgid ""
-"Two distinct partners with Vat %s and Fiscalcode %s already present in db"
+"Livello minimo: La fattura passiva viene creata senza righe; sara' l'utente "
+"a doverle creare in base a quanto indicato dal fornitore nella fattura "
+"elettronica\n"
+"Livello Massimo: tutte le righe presenti nella fattura elettronica vengono "
+"create come righe della fattura passiva"
msgstr ""
+"Livello minimo: La fattura passiva viene creata senza righe; sarà l'utente a "
+"doverle creare in base a quanto indicato dal fornitore nella fattura "
+"elettronica\n"
+"Livello Massimo: tutte le righe presenti nella fattura elettronica vengono "
+"create come righe della fattura passiva"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice.line,ftpa_uom:0
-msgid "Fattura Pa Unit of Measure"
-msgstr ""
+#: selection:res.partner,e_invoice_detail_level:0
+#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+msgid "Massimo"
+msgstr "Massimo"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_mimetype
+msgid "Mime Type"
+msgstr "Tipo Mime"
+
+#. module: l10n_it_fatturapa_in
+#: selection:res.partner,e_invoice_detail_level:0
+#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+msgid "Minimo"
+msgstr "Minimo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:328
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:609
#, python-format
-msgid ""
-"XML contains tax with percentage \"%s\" but it does not exist in your system"
-msgstr ""
+msgid "ModalitaPagamento %s not defined in your system"
+msgstr "Modalita Pagamento %s non definito nel sistema"
#. module: l10n_it_fatturapa_in
-#: view:fatturapa.attachment.in:0
-msgid "on"
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:667
+#, python-format
+msgid "Name of Bank with BIC \"%s\" is not set. Can't create bank"
msgstr ""
+"Il nome della banca con BIC \"%s\" non è impostato. Impossibile creare la "
+"banca"
#. module: l10n_it_fatturapa_in
-#: view:fatturapa.attachment.in:0
-msgid "Invoices"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_kind
+msgid "Natura"
+msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: view:fatturapa.attachment.in:0
-msgid "Xml Attachment"
-msgstr ""
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:829
+#, python-format
+msgid "No currency found with code %s"
+msgstr "Nessuna valuta trovata con codice %s"
#. module: l10n_it_fatturapa_in
-#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
-msgid "Invoice Line"
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:279
+#, python-format
+msgid ""
+"No tax with percentage %s and nature %s found. Please configure this tax"
msgstr ""
+"Nessuna imposta con aliquota %s e natura %s trovata. Configurare questa "
+"imposta"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.article.code,invoice_line_id:0
-msgid "Related Invoice line"
-msgstr ""
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:913
+#, python-format
+msgid "No withholding tax found with Causale %s and rate %s"
+msgstr "Nessuna ritenuta trovata con Causale %s e importo %s"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_line_number
+msgid "Numero Linea"
+msgstr "Numero Linea"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_res_partner
+msgid "Partner"
+msgstr "Partner"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:84
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1144
#, python-format
-msgid "DatiAnagrafici.Anagrafica.Nome contains \"%s\". Your System contains \"%s\""
-msgstr ""
+msgid "Payment method Code %s is incorrect"
+msgstr "Codice metodo di oagamento %s non corretto"
#. module: l10n_it_fatturapa_in
-#: selection:account.invoice.line,service_type:0
-msgid "abbuono"
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1139
+#, python-format
+msgid "Payment method Code not found in document"
+msgstr "Codice metodo di pagamento non trovato nel documento"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Payments"
+msgstr "Pagamenti"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Payments Details"
+msgstr "Payments Details"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_ftpa_preview_link
+msgid "Preview link"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,ir_attachment_id:0
-msgid "Attachment"
-msgstr "Allegato"
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_total_price
+msgid "Prezzo Totale"
+msgstr "Prezzo Totale"
#. module: l10n_it_fatturapa_in
-#: view:wizard.import.fatturapa:0
-msgid "Import"
-msgstr "Importa"
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_unit_price
+msgid "Prezzo unitario"
+msgstr "Prezzo unitario"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1120
-#, python-format
-msgid "XML IPA code (%s) different from company IPA code (%s)"
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_dati_bollo_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_dati_bollo_product_id
+msgid ""
+"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
+"valorizzato l'elemento DatiBollo"
msgstr ""
+"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
+"valorizzato l'elemento DatiBollo"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice.line:0
-msgid "Discount Rise Price"
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_cassa_previdenziale_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_cassa_previdenziale_product_id
+msgid ""
+"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
+"valorizzato l'elemento DatiCassaPrevidenziale"
msgstr ""
+"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
+"valorizzato l'elemento DatiCassaPrevidenziale"
#. module: l10n_it_fatturapa_in
-#: selection:account.invoice.line,service_type:0
-msgid "premio"
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_sconto_maggiorazione_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_sconto_maggiorazione_product_id
+msgid ""
+"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
+"valorizzato l'elemento ScontoMaggiorazione"
msgstr ""
+"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
+"valorizzato l'elemento ScontoMaggiorazione"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_dati_bollo_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_dati_bollo_product_id
+msgid "Product for Dati Bollo"
+msgstr "Prodotto per Dati Bollo"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_cassa_previdenziale_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_cassa_previdenziale_product_id
+msgid "Product for Dati Cassa Previdenziale"
+msgstr "Prodotto per Dati Cassa Previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:744
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_sconto_maggiorazione_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_sconto_maggiorazione_product_id
+msgid "Product for Sconto Maggiorazione"
+msgstr "Prodotto per Sconto Maggiorazione"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:198
#, python-format
-msgid "No currency found with code %s"
-msgstr ""
+msgid "Provincia ( %s ) not present in system"
+msgstr "Provincia ( %s ) non presente nel database"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:213
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:188
#, python-format
msgid "ProvinciaAlbo ( %s ) not present in system"
-msgstr ""
+msgstr "ProvinciaAlbo ( %s ) non presente nel database"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1053
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_qty
+msgid "Quantita'"
+msgstr "Quantita'"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:228
#, python-format
-msgid "Payment method Code not found in document"
-msgstr ""
+msgid "REA Office (Province) Code ( %s ) not present in system"
+msgstr "Codice ufficio REA (Provincia) ( %s ) non presente nel database"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,message_is_follower:0
-msgid "Is a Follower"
-msgstr ""
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:216
+#, python-format
+msgid "RegimeFiscale %s is not present in your system"
+msgstr "RegimeFiscale %s non presente nel database"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice,inconsistencies:0
-msgid "Import Inconsistencies"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_registered
+msgid "Registered"
+msgstr "Registrata"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:172
-#, python-format
-msgid "Country Code %s not found in system"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Related Documents"
+msgstr "Documenti Correlati"
#. module: l10n_it_fatturapa_in
-#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
-msgid "FatturaPA Article Code"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_discount_rise_price_e_invoice_line_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_e_invoice_line_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_e_invoice_line_id
+msgid "Related E-Invoice line"
+msgstr "Riga fattura elettronica correlata"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1085
-#, python-format
-msgid "Attachment Name is Required"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Remove"
+msgstr "Rimuovi"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.attachment.in,message_summary:0
-msgid "Summary"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_field
+msgid "Resource Field"
+msgstr "Campo Risorsa"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:473
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:770
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
-#, python-format
-msgid "Error"
-msgstr "Errore"
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_id
+msgid "Resource ID"
+msgstr "ID Risorsa"
#. module: l10n_it_fatturapa_in
-#: field:fatturapa.article.code,name:0
-msgid "Cod Type"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_model
+msgid "Resource Model"
+msgstr "Modello della Risorsa"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:305
-#, python-format
-msgid "No tax with percentage %s and nature %s found"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_name
+msgid "Resource Name"
+msgstr "Nome Risorsa"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Fattura PA V1.1 Schema"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_date_ref
+msgid "Riferimento Data"
+msgstr "Riferimento Data"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Attachments"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_num_ref
+msgid "Riferimento Numero"
+msgstr "Riferimento Numero"
#. module: l10n_it_fatturapa_in
-#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice
-msgid "Invoice"
-msgstr "Fattura"
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_text_ref
+msgid "Riferimento Testo"
+msgstr "Riferimento Testo"
#. module: l10n_it_fatturapa_in
-#: selection:account.invoice.line,service_type:0
-msgid "spesa accessoria"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_admin_ref
+msgid "Riferimento mministrazione"
+msgstr "Riferimento mministrazione"
#. module: l10n_it_fatturapa_in
-#: view:wizard.import.fatturapa:0
-msgid "Cancel"
-msgstr "Annulla"
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_wt_amount
+msgid "Ritenuta"
+msgstr "Ritenuta"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Summary Data"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "SAL data"
+msgstr "Dati SAL"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice.line,discount_rise_price_ids:0
-msgid "Discount and Rise Price Details"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Sconto Maggiorazione"
+msgstr "Sconto Maggiorazione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:337
-#, python-format
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_total
msgid ""
-"Line '%s': Too many taxes with percentage equals to \"%s\"\n"
-"fix it if required"
+"Se indicato dal fornitore, Importo totale del documento al netto "
+"dell'eventuale sconto e comprensivo di imposta a debito del cessionario / "
+"committente"
msgstr ""
+"Se indicato dal fornitore, Importo totale del documento al netto "
+"dell'eventuale sconto e comprensivo di imposta a debito del cessionario / "
+"committente"
#. module: l10n_it_fatturapa_in
-#: view:fatturapa.attachment.in:0
-msgid "Creation"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Stabile Organizzazione"
+msgstr "Stabile Organizzazione"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Welfare Fund"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_store_fname
+msgid "Stored Filename"
+msgstr "Nome del File Registrato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1175
-#, python-format
-msgid "Computed amount untaxed %s is different from DatiRiepilogo %s"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Summary Data"
+msgstr "Dati riepilogo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1264
-#, python-format
-msgid "Signed Xml file not decryptable"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_xml_supplier_id
+msgid "Supplier"
+msgstr "Fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:901
#, python-format
-msgid "Check PEM file %s"
+msgid ""
+"Supplier invoice contains withholding tax with CausalePagamento %s, but such "
+"a tax is not found in your system. Please set it"
msgstr ""
+"La fattura contiene la ritenuta con Causale Pagamento %s, ma tale ritenuta "
+"non è presente nel sistema. Prego impostarla"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1158
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
#, python-format
-msgid "Invoice total %s is different from ImportoTotaleDocumento %s"
-msgstr ""
+msgid "Tax kind %s not found"
+msgstr "Tipo imposta %s non trovato"
#. module: l10n_it_fatturapa_in
-#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
-msgid "FatturaPA import File"
-msgstr "Fattura PA Importazione File"
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_model
+msgid "The database object this attachment will be attached to."
+msgstr "L'oggetto del database a cui verrà allegato questo allegato."
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Delivery"
-msgstr ""
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_id
+msgid "The record id this is attached to."
+msgstr "L'ID del record a cui questo è allegato."
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Progress Work"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_service_type
+msgid "Tipo Cessione Prestazione"
+msgstr "Tipo Cessione Prestazione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:474
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_name
+msgid "Tipo Dato"
+msgstr "Tipo Dato"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
#, python-format
msgid "TipoCassa %s is not present in your system"
-msgstr ""
+msgstr "TipoCassa %s non presente nel database"
#. module: l10n_it_fatturapa_in
-#: view:wizard.import.fatturapa:0
-msgid "Confirm?"
-msgstr ""
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
+#, python-format
+msgid "TipoCassa is not defined "
+msgstr "TipoCassa non definito "
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "FatturaPA attachments"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_search
+msgid "To Register"
+msgstr "Da registrare"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:284
+#, python-format
+msgid "Too many taxes with percentage %s and nature %s found"
+msgstr "Troppe imposte con aliquota %s e natura %s trovate"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:653
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:135
#, python-format
msgid ""
-"BIC is required and not exist in Xml\n"
-"Curr bank data is: \n"
-"IBAN: %s\n"
-"Bank Name: %s\n"
+"Two distinct partners with Vat %s and Fiscalcode %s already present in db"
msgstr ""
+"2 differenti partner con P.IVA %s e codice fiscale %s sono già presenti nel "
+"database"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Payments"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_type
+msgid "Type"
+msgstr "Tipo"
#. module: l10n_it_fatturapa_in
-#: field:account.invoice.line,service_end:0
-msgid "Service end at"
-msgstr ""
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_uom
+msgid "Unita' di misura"
+msgstr "Unita' di misura"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_url
+msgid "Url"
+msgstr "Url"
#. module: l10n_it_fatturapa_in
-#: help:fatturapa.attachment.in,message_ids:0
-msgid "Messages and communication history"
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_default_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_users_e_invoice_default_product_id
+msgid ""
+"Used by electronic invoice XML import. If filled, generated invoice lines "
+"will use this product, when no other possible product is found."
msgstr ""
+"Usato nell'importazione XML delle fatture elettroniche. Se valorizzato, le "
+"fatture generate nell'importazione utilizzeranno questo prodotto, quando "
+"nessun'altro possibile prodotto verrà trovato"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Welfare Fund"
+msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1236
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Welfare Fund Details"
+msgstr "Dettagli cassa previdenziale"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:370
#, python-format
-msgid "ASN.1 structure is not parsable in DER"
+msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
+"L'XML contiene l'imposta %s. Il prodotto %s ha l'imposta %s. Utilizzo quella "
+"dell'XML"
#. module: l10n_it_fatturapa_in
-#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_fattura_pa_in
-#: model:ir.ui.menu,name:l10n_it_fatturapa_in.menu_fattura_pa_in_tree
-msgid "Incoming fatturaPA files"
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:299
+#, python-format
+msgid ""
+"XML contains tax with percentage \"%s\" but it does not exist in your system"
msgstr ""
+"L'XML contiene l'imposta con alquota \"%s\" ma questa non esiste nel database"
#. module: l10n_it_fatturapa_in
-#: view:account.invoice:0
-msgid "Results"
-msgstr ""
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_tree
+msgid "Xml Attachment"
+msgstr "Allegato XML"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:71
-#, python-format
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_type
msgid ""
-"DatiAnagrafici.Anagrafica.Denominazione contains \"%s\". Your System "
-"contains \"%s\""
+"You can either upload a file from your computer or copy/paste an internet "
+"link to your file."
msgstr ""
+"Puoi inviare un file dal computer o copiare/incollare un indirizzo Internet "
+"che è collegato al tuo file."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:233
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:19
#, python-format
-msgid "RegimeFiscale %s is not present in your system"
-msgstr ""
+msgid "You can select only 1 XML file to link"
+msgstr "E' possibile selezionare solo un file XML da collegare"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_config_settings
+msgid "account.config.settings"
+msgstr "account.config.settings"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
+msgid "einvoice.line"
+msgstr "einvoice.line"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line_other_data
+msgid "einvoice.line.other.data"
+msgstr "einvoice.line.other.data"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "on"
+msgstr "il"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:852
+#, python-format
+msgid "tipoDocumento %s not handled"
+msgstr "tipoDocumento %s non gestito"
+
+#~ msgid "Show preview"
+#~ msgstr "Mostra anteprima"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
new file mode 100644
index 000000000000..4c50cb0b2455
--- /dev/null
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -0,0 +1,898 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * l10n_it_fatturapa_in
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \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_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_amount
+msgid "Aliquota IVA"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Altri Dati Gestionali"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_ids
+msgid "Altri dati gestionali"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_ir_attachment_id
+msgid "Attachment"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_name
+msgid "Attachment Name"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_local_url
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_website_url
+msgid "Attachment URL"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1161
+#, python-format
+msgid "Attachment without name"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Attachments"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:691
+#, python-format
+msgid "BIC is required and not exist in Xml\n"
+"Curr bank data is: \n"
+"IBAN: %s\n"
+"Bank Name: %s\n"
+""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:578
+#, python-format
+msgid "Bollo assolto ai sensi del decreto MEF 17 giugno 2014 (art. 6)"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
+msgid "Cancel"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:954
+#, python-format
+msgid "Cassa Previdenziale: %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:962
+#, python-format
+msgid "CassaPrevidenziale %s has Ritenuta but no withholding tax was found in the system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_checksum
+msgid "Checksum/SHA1"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_name
+msgid "Cod Type"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_cod_article_ids
+msgid "Cod. Articles"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_code_val
+msgid "Code Value"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Codice Articoli"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_res_company
+msgid "Companies"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_company_id
+msgid "Company"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1221
+#, python-format
+msgid "Computed amount untaxed %s is different from DatiRiepilogo %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:151
+#, python-format
+msgid "Country Code %s not found in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_create_date
+msgid "Created on"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Creation"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_end_date
+msgid "Data Fine Periodo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_start_date
+msgid "Data Inizio Periodo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_db_datas
+msgid "Database Data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Dati generali"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:102
+#, python-format
+msgid "DatiAnagrafici.Anagrafica.Cognome contains \"%s\". Your System contains \"%s\""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:85
+#, python-format
+msgid "DatiAnagrafici.Anagrafica.Denominazione contains \"%s\". Your System contains \"%s\""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:93
+#, python-format
+msgid "DatiAnagrafici.Anagrafica.Nome contains \"%s\". Your System contains \"%s\""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_partner_e_invoice_default_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_default_product_id
+msgid "Default product electronic invoice"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:746
+#, python-format
+msgid "Define a purchase journal for this company: \"%s\" (id:%d)."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Delivery"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_description
+msgid "Description"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_name
+msgid "Descrizione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Dettaglio Linea"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_e_invoice_line_ids
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Dettaglio Linee"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_discount_rise_price_ids
+msgid "Discount and Rise Price Details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_fatturapa_attachment_in_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_line_fatturapa_attachment_in_id
+msgid "E-Invoice Import File"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "E-invoice Inconsistencies"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "E-invoice details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Fattura PA V1.2 Schema"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
+msgid "FatturaPA Article Code"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_discount_rise_price
+msgid "FatturaPA Discount Rise Price Data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
+msgid "FatturaPA import File"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:47
+#, python-format
+msgid "File %s is linked to invoices yet"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_datas
+msgid "File Content"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_datas_fname
+msgid "File Name"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_file_size
+msgid "File Size"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1244
+#, python-format
+msgid "File is linked to invoices yet"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
+#, python-format
+msgid "Global invoice discount from DatiGeneraliDocumento"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "History"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_id
+msgid "ID"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+msgid "Import"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_import_fatturapa
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+msgid "Import Fattura Elettronica"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_import_fatturapa
+msgid "Import FatturaPA"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_inconsistencies
+msgid "Import Inconsistencies"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_in_invoice_ids
+msgid "In Invoices"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_fattura_pa_in
+#: model:ir.ui.menu,name:l10n_it_fatturapa_in.menu_fattura_pa_in_tree
+msgid "Incoming Fattura Elettronica files"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_index_content
+msgid "Indexed Content"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_invoice_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_invoice_id
+msgid "Invoice"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1206
+#, python-format
+msgid "Invoice total %s is different from ImportoTotaleDocumento %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Invoices"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_number
+msgid "Invoices number"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_total
+msgid "Invoices total"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_public
+msgid "Is public document"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa___last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice___last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:308
+#, python-format
+msgid "Line '%s': Too many taxes with percentage equals to \"%s\"\n"
+"fix it if required"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
+msgid "Link"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice
+msgid "Link to Supplier Invoice"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_link_supplier_invoice
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
+msgid "Link to existing supplier invoice"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_e_invoice_detail_level
+msgid "Livello di dettaglio Fatture elettroniche"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_detail_level
+msgid "Livello di dettaglio Fatture elettroniche passive"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_users_e_invoice_detail_level
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_wizard_import_fatturapa_e_invoice_detail_level
+msgid "Livello minimo: La fattura passiva viene creata senza righe; sara' l'utente a doverle creare in base a quanto indicato dal fornitore nella fattura elettronica\n"
+"Livello Massimo: tutte le righe presenti nella fattura elettronica vengono create come righe della fattura passiva"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: selection:res.partner,e_invoice_detail_level:0
+#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+msgid "Massimo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_mimetype
+msgid "Mime Type"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: selection:res.partner,e_invoice_detail_level:0
+#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+msgid "Minimo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:609
+#, python-format
+msgid "ModalitaPagamento %s not defined in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:667
+#, python-format
+msgid "Name of Bank with BIC \"%s\" is not set. Can't create bank"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_kind
+msgid "Natura"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:829
+#, python-format
+msgid "No currency found with code %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:279
+#, python-format
+msgid "No tax with percentage %s and nature %s found. Please configure this tax"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:913
+#, python-format
+msgid "No withholding tax found with Causale %s and rate %s"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_line_number
+msgid "Numero Linea"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1144
+#, python-format
+msgid "Payment method Code %s is incorrect"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1139
+#, python-format
+msgid "Payment method Code not found in document"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Payments"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Payments Details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_ftpa_preview_link
+msgid "Preview link"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_total_price
+msgid "Prezzo Totale"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_unit_price
+msgid "Prezzo unitario"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_dati_bollo_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_dati_bollo_product_id
+msgid "Prodotto da utilizzare nelle fatture passive quando nell'XML viene valorizzato l'elemento DatiBollo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_cassa_previdenziale_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_cassa_previdenziale_product_id
+msgid "Prodotto da utilizzare nelle fatture passive quando nell'XML viene valorizzato l'elemento DatiCassaPrevidenziale"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_sconto_maggiorazione_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_sconto_maggiorazione_product_id
+msgid "Prodotto da utilizzare nelle fatture passive quando nell'XML viene valorizzato l'elemento ScontoMaggiorazione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_dati_bollo_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_dati_bollo_product_id
+msgid "Product for Dati Bollo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_cassa_previdenziale_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_cassa_previdenziale_product_id
+msgid "Product for Dati Cassa Previdenziale"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_sconto_maggiorazione_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_sconto_maggiorazione_product_id
+msgid "Product for Sconto Maggiorazione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:198
+#, python-format
+msgid "Provincia ( %s ) not present in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:188
+#, python-format
+msgid "ProvinciaAlbo ( %s ) not present in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_qty
+msgid "Quantita'"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:228
+#, python-format
+msgid "REA Office (Province) Code ( %s ) not present in system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:216
+#, python-format
+msgid "RegimeFiscale %s is not present in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_registered
+msgid "Registered"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Related Documents"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_discount_rise_price_e_invoice_line_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_e_invoice_line_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_e_invoice_line_id
+msgid "Related E-Invoice line"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Remove"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_field
+msgid "Resource Field"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_id
+msgid "Resource ID"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_model
+msgid "Resource Model"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_name
+msgid "Resource Name"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_date_ref
+msgid "Riferimento Data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_num_ref
+msgid "Riferimento Numero"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_text_ref
+msgid "Riferimento Testo"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_admin_ref
+msgid "Riferimento mministrazione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_wt_amount
+msgid "Ritenuta"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "SAL data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Sconto Maggiorazione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_total
+msgid "Se indicato dal fornitore, Importo totale del documento al netto dell'eventuale sconto e comprensivo di imposta a debito del cessionario / committente"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Stabile Organizzazione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_store_fname
+msgid "Stored Filename"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Summary Data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_xml_supplier_id
+msgid "Supplier"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:901
+#, python-format
+msgid "Supplier invoice contains withholding tax with CausalePagamento %s, but such a tax is not found in your system. Please set it"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
+#, python-format
+msgid "Tax kind %s not found"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_model
+msgid "The database object this attachment will be attached to."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_id
+msgid "The record id this is attached to."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_service_type
+msgid "Tipo Cessione Prestazione"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_name
+msgid "Tipo Dato"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
+#, python-format
+msgid "TipoCassa %s is not present in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
+#, python-format
+msgid "TipoCassa is not defined "
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_search
+msgid "To Register"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:284
+#, python-format
+msgid "Too many taxes with percentage %s and nature %s found"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:135
+#, python-format
+msgid "Two distinct partners with Vat %s and Fiscalcode %s already present in db"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_type
+msgid "Type"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_uom
+msgid "Unita' di misura"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_url
+msgid "Url"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_default_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_users_e_invoice_default_product_id
+msgid "Used by electronic invoice XML import. If filled, generated invoice lines will use this product, when no other possible product is found."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Welfare Fund"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Welfare Fund Details"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:370
+#, python-format
+msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:299
+#, python-format
+msgid "XML contains tax with percentage \"%s\" but it does not exist in your system"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_tree
+msgid "Xml Attachment"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_type
+msgid "You can either upload a file from your computer or copy/paste an internet link to your file."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:19
+#, python-format
+msgid "You can select only 1 XML file to link"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_account_config_settings
+msgid "account.config.settings"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
+msgid "einvoice.line"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line_other_data
+msgid "einvoice.line.other.data"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "on"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:852
+#, python-format
+msgid "tipoDocumento %s not handled"
+msgstr ""
+
diff --git a/l10n_it_fatturapa_in/models/__init__.py b/l10n_it_fatturapa_in/models/__init__.py
index 98b75af48313..aa731e35a87e 100644
--- a/l10n_it_fatturapa_in/models/__init__.py
+++ b/l10n_it_fatturapa_in/models/__init__.py
@@ -1,24 +1,6 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2015 AgileBG SAGL
-# Copyright (C) 2015 innoviu Srl
-#
-# 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 . import attachment
from . import account
+from . import partner
+from . import company
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 91a13940e8de..33d5ff5c2ccd 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -1,75 +1,116 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2014 Davide Corio
-#
-# 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 openerp.osv import fields, orm
-
-
-class account_invoice(orm.Model):
+
+from odoo import fields, models, api
+import odoo.addons.decimal_precision as dp
+
+
+class AccountInvoice(models.Model):
_inherit = "account.invoice"
- _columns = {
- 'fatturapa_attachment_in_id': fields.many2one(
- 'fatturapa.attachment.in', 'FatturaPA Import File',
- ondelete='restrict'),
- 'inconsistencies': fields.text('Import Inconsistencies'),
- }
+ fatturapa_attachment_in_id = fields.Many2one(
+ 'fatturapa.attachment.in', 'E-Invoice Import File',
+ ondelete='restrict', copy=False)
+ inconsistencies = fields.Text('Import Inconsistencies', copy=False)
+ e_invoice_line_ids = fields.One2many(
+ "einvoice.line", "invoice_id", string="Dettaglio Linee",
+ readonly=True, copy=False)
+ @api.multi
+ def name_get(self):
+ result = super(AccountInvoice, self).name_get()
+ res = []
+ for tup in result:
+ invoice = self.browse(tup[0])
+ if invoice.type in ('in_invoice', 'in_refund'):
+ name = "%s, %s" % (tup[1], invoice.partner_id.name)
+ if invoice.origin:
+ name += ', %s' % invoice.origin
+ res.append((invoice.id, name))
+ else:
+ res.append(tup)
+ return res
-class fatturapa_article_code(orm.Model):
+ @api.multi
+ def remove_attachment_link(self):
+ self.ensure_one()
+ self.fatturapa_attachment_in_id = False
+ return {'type': 'ir.actions.client', 'tag': 'reload'}
+
+
+class fatturapa_article_code(models.Model):
# _position = ['2.2.1.3']
_name = "fatturapa.article.code"
_description = 'FatturaPA Article Code'
- _columns = {
- 'name': fields.char('Cod Type', size=35),
- 'code_val': fields.char('Code Value', size=35),
- 'invoice_line_id': fields.many2one(
- 'account.invoice.line', 'Related Invoice line',
- ondelete='cascade', select=True
- )
- }
+ name = fields.Char('Cod Type')
+ code_val = fields.Char('Code Value')
+ e_invoice_line_id = fields.Many2one(
+ 'einvoice.line', 'Related E-Invoice line', readonly=True
+ )
-class account_invoice_line(orm.Model):
+class AccountInvoiceLine(models.Model):
# _position = [
# '2.2.1.3', '2.2.1.6', '2.2.1.7',
# '2.2.1.8', '2.1.1.10'
# ]
_inherit = "account.invoice.line"
- _columns = {
- 'cod_article_ids': fields.one2many(
- 'fatturapa.article.code', 'invoice_line_id',
- 'Cod. Articles'
- ),
- 'service_type': fields.selection([
- ('SC', 'sconto'),
- ('PR', 'premio'),
- ('AB', 'abbuono'),
- ('AC', 'spesa accessoria'),
- ], string="Service Type"),
- 'ftpa_uom': fields.char('Fattura Pa Unit of Measure', size=10),
- 'service_start': fields.date('Service start at'),
- 'service_end': fields.date('Service end at'),
- 'discount_rise_price_ids': fields.one2many(
- 'discount.rise.price', 'invoice_line_id',
- 'Discount and Rise Price Details'
- ),
- }
+ fatturapa_attachment_in_id = fields.Many2one(
+ 'fatturapa.attachment.in', 'E-Invoice Import File',
+ readonly=True, related='invoice_id.fatturapa_attachment_in_id')
+
+
+class DiscountRisePrice(models.Model):
+ _inherit = "discount.rise.price"
+ e_invoice_line_id = fields.Many2one(
+ 'einvoice.line', 'Related E-Invoice line', readonly=True
+ )
+
+
+class EInvoiceLine(models.Model):
+ _name = 'einvoice.line'
+ invoice_id = fields.Many2one(
+ "account.invoice", "Invoice", readonly=True)
+ line_number = fields.Integer('Numero Linea', readonly=True)
+ service_type = fields.Char('Tipo Cessione Prestazione', readonly=True)
+ cod_article_ids = fields.One2many(
+ 'fatturapa.article.code', 'e_invoice_line_id',
+ 'Cod. Articles', readonly=True
+ )
+ name = fields.Char("Descrizione", readonly=True)
+ qty = fields.Float(
+ "Quantita'", readonly=True,
+ digits=dp.get_precision('Product Unit of Measure')
+ )
+ uom = fields.Char("Unita' di misura", readonly=True)
+ period_start_date = fields.Date("Data Inizio Periodo", readonly=True)
+ period_end_date = fields.Date("Data Fine Periodo", readonly=True)
+ unit_price = fields.Float(
+ "Prezzo unitario", readonly=True,
+ digits=dp.get_precision('Product Price')
+ )
+ discount_rise_price_ids = fields.One2many(
+ 'discount.rise.price', 'e_invoice_line_id',
+ 'Discount and Rise Price Details', readonly=True
+ )
+ total_price = fields.Float("Prezzo Totale", readonly=True)
+ tax_amount = fields.Float("Aliquota IVA", readonly=True)
+ wt_amount = fields.Char("Ritenuta", readonly=True)
+ tax_kind = fields.Char("Natura", readonly=True)
+ admin_ref = fields.Char("Riferimento mministrazione", readonly=True)
+ other_data_ids = fields.One2many(
+ "einvoice.line.other.data", "e_invoice_line_id",
+ string="Altri dati gestionali", readonly=True)
+
+
+class EInvoiceLineOtherData(models.Model):
+ _name = 'einvoice.line.other.data'
+
+ e_invoice_line_id = fields.Many2one(
+ 'einvoice.line', 'Related E-Invoice line', readonly=True
+ )
+ name = fields.Char("Tipo Dato", readonly=True)
+ text_ref = fields.Char("Riferimento Testo", readonly=True)
+ num_ref = fields.Float("Riferimento Numero", readonly=True)
+ date_ref = fields.Char("Riferimento Data", readonly=True)
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 83d8767d2d67..9b8613c6f6e2 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -1,40 +1,66 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2015 AgileBG SAGL
-# Copyright (C) 2015 innoviu Srl
-#
-# 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 openerp.osv import fields, orm
-
-
-class FatturaPAAttachmentIn(orm.Model):
+
+from odoo import fields, models, api
+
+
+class FatturaPAAttachmentIn(models.Model):
_name = "fatturapa.attachment.in"
_description = "FatturaPA import File"
_inherits = {'ir.attachment': 'ir_attachment_id'}
_inherit = ['mail.thread']
+ _order = 'id desc'
+
+ ir_attachment_id = fields.Many2one(
+ 'ir.attachment', 'Attachment', required=True, ondelete="cascade")
+ in_invoice_ids = fields.One2many(
+ 'account.invoice', 'fatturapa_attachment_in_id',
+ string="In Invoices", readonly=True)
+ xml_supplier_id = fields.Many2one(
+ "res.partner", string="Supplier", compute="_compute_xml_data",
+ store=True)
+ invoices_number = fields.Integer(
+ "Invoices number", compute="_compute_xml_data", store=True)
+ invoices_total = fields.Float(
+ "Invoices total", compute="_compute_xml_data", store=True,
+ help="Se indicato dal fornitore, Importo totale del documento al "
+ "netto dell'eventuale sconto e comprensivo di imposta a debito "
+ "del cessionario / committente"
+ )
+ registered = fields.Boolean(
+ "Registered", compute="_compute_registered", store=True)
+
+ @api.onchange('datas_fname')
+ def onchagne_datas_fname(self):
+ self.name = self.datas_fname
+
+ def get_xml_string(self):
+ return self.ir_attachment_id.get_xml_string()
- _columns = {
- 'ir_attachment_id': fields.many2one(
- 'ir.attachment', 'Attachment', required=True, ondelete="cascade"),
- 'in_invoice_ids': fields.one2many(
- 'account.invoice', 'fatturapa_attachment_in_id',
- string="In Invoices", readonly=True),
- }
+ @api.multi
+ @api.depends('ir_attachment_id.datas')
+ def _compute_xml_data(self):
+ for att in self:
+ fatt = self.env['wizard.import.fatturapa'].get_invoice_obj(att)
+ cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
+ partner_id = self.env['wizard.import.fatturapa'].getCedPrest(
+ cedentePrestatore)
+ att.xml_supplier_id = partner_id
+ att.invoices_number = len(fatt.FatturaElettronicaBody)
+ att.invoices_total = 0
+ for invoice_body in fatt.FatturaElettronicaBody:
+ att.invoices_total += float(
+ invoice_body.DatiGenerali.DatiGeneraliDocumento.
+ ImportoTotaleDocumento or 0
+ )
- def set_name(self, cr, uid, ids, datas_fname, context=None):
- return {'value': {'name': datas_fname}}
+ @api.multi
+ @api.depends('in_invoice_ids')
+ def _compute_registered(self):
+ for att in self:
+ if (
+ att.in_invoice_ids and
+ len(att.in_invoice_ids) == att.invoices_number
+ ):
+ att.registered = True
+ else:
+ att.registered = False
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
new file mode 100644
index 000000000000..d62e695d3595
--- /dev/null
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -0,0 +1,69 @@
+# -*- coding: utf-8 -*-
+
+from odoo import fields, models, api
+
+
+class ResCompany(models.Model):
+ _inherit = 'res.company'
+
+ dati_bollo_product_id = fields.Many2one(
+ 'product.product', 'Product for Dati Bollo',
+ help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
+ 'viene valorizzato l\'elemento DatiBollo'
+ )
+ cassa_previdenziale_product_id = fields.Many2one(
+ 'product.product', 'Product for Dati Cassa Previdenziale',
+ help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
+ 'viene valorizzato l\'elemento DatiCassaPrevidenziale'
+ )
+ sconto_maggiorazione_product_id = fields.Many2one(
+ 'product.product', 'Product for Sconto Maggiorazione',
+ help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
+ 'viene valorizzato l\'elemento ScontoMaggiorazione'
+ )
+
+
+class AccountConfigSettings(models.TransientModel):
+ _inherit = 'account.config.settings'
+
+ dati_bollo_product_id = fields.Many2one(
+ related='company_id.dati_bollo_product_id',
+ string="Product for Dati Bollo",
+ help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
+ 'viene valorizzato l\'elemento DatiBollo'
+ )
+ cassa_previdenziale_product_id = fields.Many2one(
+ related='company_id.cassa_previdenziale_product_id',
+ string="Product for Dati Cassa Previdenziale",
+ help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
+ 'viene valorizzato l\'elemento DatiCassaPrevidenziale'
+ )
+ sconto_maggiorazione_product_id = fields.Many2one(
+ related='company_id.sconto_maggiorazione_product_id',
+ string="Product for Sconto Maggiorazione",
+ help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
+ 'viene valorizzato l\'elemento ScontoMaggiorazione'
+ )
+
+ @api.onchange('company_id')
+ def onchange_company_id(self):
+ res = super(AccountConfigSettings, self).onchange_company_id()
+ if self.company_id:
+ company = self.company_id
+ self.dati_bollo_product_id = (
+ company.dati_bollo_product_id and
+ company.dati_bollo_product_id.id or False
+ )
+ self.cassa_previdenziale_product_id = (
+ company.cassa_previdenziale_product_id and
+ company.cassa_previdenziale_product_id.id or False
+ )
+ self.sconto_maggiorazione_product_id = (
+ company.sconto_maggiorazione_product_id and
+ company.sconto_maggiorazione_product_id.id or False
+ )
+ else:
+ self.dati_bollo_product_id = False
+ self.cassa_previdenziale_product_id = False
+ self.sconto_maggiorazione_product_id = False
+ return res
diff --git a/l10n_it_fatturapa_in/models/partner.py b/l10n_it_fatturapa_in/models/partner.py
new file mode 100644
index 000000000000..73bae4c66468
--- /dev/null
+++ b/l10n_it_fatturapa_in/models/partner.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+from odoo import models, fields
+
+
+class Partner(models.Model):
+ _inherit = 'res.partner'
+
+ e_invoice_default_product_id = fields.Many2one(
+ comodel_name='product.product',
+ string='Default product electronic invoice',
+ help="Used by electronic invoice XML import. "
+ "If filled, generated invoice lines will use this product, when "
+ "no other possible product is found."
+ )
+ e_invoice_detail_level = fields.Selection([
+ ('0', 'Minimo'),
+ # ('1', 'Aliquote'),
+ ('2', 'Massimo'),
+ ], string="Livello di dettaglio Fatture elettroniche passive",
+ help="Livello minimo: La fattura passiva viene creata senza righe; "
+ "sara' l'utente a doverle creare in base a quanto indicato dal "
+ "fornitore nella fattura elettronica\n"
+ # "Livello Aliquote: viene creata una riga fattura per ogni "
+ # "aliquota presente nella fattura elettronica\n"
+ "Livello Massimo: tutte le righe presenti nella fattura "
+ "elettronica vengono create come righe della fattura passiva",
+ default='2', required=True
+ )
diff --git a/l10n_it_fatturapa_in/readme/CONFIGURE.rst b/l10n_it_fatturapa_in/readme/CONFIGURE.rst
new file mode 100644
index 000000000000..6024e6c477ae
--- /dev/null
+++ b/l10n_it_fatturapa_in/readme/CONFIGURE.rst
@@ -0,0 +1,14 @@
+Also see the README file of l10n_it_fatturapa module.
+
+For every supplier, it is possible to set the 'details level of electronic invoices':
+
+ - Minimum level: Supplier invoice is created without lines; user will have to create them, according to what specified in electronic invoice
+ - Maximum level: every line contained in electronic invoice will create a line in supplier invoice.
+
+Moreover, it is possible, in supplier form, to set the 'default product for electronic invoices': this product will be used, during generation of supplier invoices, when no other possible product is found. Tax and account of invoice line will be set according to what configured in the product.
+
+Every product code used by suppliers can be set, in product form, in
+
+Inventory --> Suppliers
+
+If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in invoice line, setting the related tax and account.
diff --git a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
new file mode 100644
index 000000000000..b3af0988acfe
--- /dev/null
+++ b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
@@ -0,0 +1,3 @@
+* Lorenzo Battistini
+* Roberto Onnis
+* Alessio Gerace
diff --git a/l10n_it_fatturapa_in/readme/DESCRIPTION.rst b/l10n_it_fatturapa_in/readme/DESCRIPTION.rst
new file mode 100644
index 000000000000..f88850e18642
--- /dev/null
+++ b/l10n_it_fatturapa_in/readme/DESCRIPTION.rst
@@ -0,0 +1,7 @@
+This module allows to import XML files of electronic invoices, version 1.2
+
+http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
+
+received through the exchange system (SDI)
+
+http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
diff --git a/l10n_it_fatturapa_in/readme/INSTALL.rst b/l10n_it_fatturapa_in/readme/INSTALL.rst
new file mode 100644
index 000000000000..7da985ac1c84
--- /dev/null
+++ b/l10n_it_fatturapa_in/readme/INSTALL.rst
@@ -0,0 +1,3 @@
+odoo server must run on linux and be able to run
+
+``openssl``
diff --git a/l10n_it_fatturapa_in/readme/USAGE.rst b/l10n_it_fatturapa_in/readme/USAGE.rst
new file mode 100644
index 000000000000..3340773af555
--- /dev/null
+++ b/l10n_it_fatturapa_in/readme/USAGE.rst
@@ -0,0 +1,6 @@
+ * Go to Accounting --> Purchases --> Electronic Invoice
+ * Upload XML file
+ * View invoice content clicking on 'show preview'
+ * Run 'import electronic invoice' wizard to create a draft invoice or run 'link to existing supplier invoice' to link the XML file to an already (automatically) created invoice
+
+In the incoming electronic invoice files list, by default you will see files to be registered, that is files not yet linked to one or more supplier invoices
diff --git a/l10n_it_fatturapa_in/security/ir.model.access.csv b/l10n_it_fatturapa_in/security/ir.model.access.csv
index 93910a1eca6c..056d7bcb6181 100644
--- a/l10n_it_fatturapa_in/security/ir.model.access.csv
+++ b/l10n_it_fatturapa_in/security/ir.model.access.csv
@@ -1,3 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_fatturapa_attachment_in,access_fatturapa_attachment_in,model_fatturapa_attachment_in,account.group_account_invoice,1,1,1,1
access_fatturapa_article_code,access_fatturapa_article_code,model_fatturapa_article_code,account.group_account_invoice,1,1,1,1
+access_einvoice_line,access_einvoice_line,model_einvoice_line,account.group_account_invoice,1,1,1,1
+access_einvoice_line_other_data,access_einvoice_line_other_data,model_einvoice_line_other_data,account.group_account_invoice,1,1,1,1
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
new file mode 100644
index 000000000000..5b693059edef
--- /dev/null
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -0,0 +1,460 @@
+
+
+
+
+
+
+Italian Localization - Fattura Elettronica reception
+
+
+
+
+
Italian Localization - Fattura Elettronica reception
+
+
+
+
This module allows to import XML files of electronic invoices, version 1.2
+
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
+
received through the exchange system (SDI)
+
http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
+
Table of contents
+
+
+
+
odoo server must run on linux and be able to run
+
openssl
+
+
+
+
Also see the README file of l10n_it_fatturapa module.
+
For every supplier, it is possible to set the ‘details level of electronic invoices’:
+
+
+Minimum level: Supplier invoice is created without lines; user will have to create them, according to what specified in electronic invoice
+Maximum level: every line contained in electronic invoice will create a line in supplier invoice.
+
+
+
Moreover, it is possible, in supplier form, to set the ‘default product for electronic invoices’: this product will be used, during generation of supplier invoices, when no other possible product is found. Tax and account of invoice line will be set according to what configured in the product.
+
Every product code used by suppliers can be set, in product form, in
+
Inventory –> Suppliers
+
If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in invoice line, setting the related tax and account.
+
+
+
+
+
+Go to Accounting –> Purchases –> Electronic Invoice
+Upload XML file
+View invoice content clicking on ‘show preview’
+Run ‘import electronic invoice’ wizard to create a draft invoice or run ‘link to existing supplier invoice’ to link the XML file to an already (automatically) created invoice
+
+
+
In the incoming electronic invoice files list, by default you will see files to be registered, that is files not yet linked to one or more supplier invoices
+
+
+
+
Bugs are tracked on GitHub Issues .
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+feedback .
+
Do not contact contributors directly about support or help with technical issues.
+
+
+
+
+
+
+Agile Business Group
+Innoviu
+
+
+
+
+
+
This module is maintained by the OCA.
+
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
This module is part of the OCA/l10n-italy project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/__init__.py b/l10n_it_fatturapa_in/tests/__init__.py
index bea8e1ef33fa..2d2485f34333 100644
--- a/l10n_it_fatturapa_in/tests/__init__.py
+++ b/l10n_it_fatturapa_in/tests/__init__.py
@@ -1,23 +1,3 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2014 Alessio Gerace
-#
-# 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 . import test_import_fatturapa_xml
-
-checks = [test_import_fatturapa_xml]
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
similarity index 53%
rename from l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml
rename to l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
index a5e9e02cc1b9..df5f743da8b7 100644
--- a/l10n_it_fatturapa_in/tests/data/IT01234567890_11002.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
@@ -1,21 +1,21 @@
-
+
IT
- 01234567890
+ 05979361218
00001
- SDI11
- AAAAAA
+ FPR12
+ 0000000
IT
- 02537410900
+ 02780790107
SOCIETA' ALPHA SRL
@@ -32,9 +32,9 @@
- 02537410900
+ 03533590174
- AMMINISTRAZIONE BETA
+ BETA GAMMA
@@ -60,36 +60,12 @@
1
66685
1
- 123abc
- 456def
-
- 1
- 123
- 2012-09-01
- 5
- 123abc
- 456def
-
-
- 1
- 123
- 5
- 123abc
- 456def
-
-
- 1
- 123
- 5
- 123abc
- 456def
-
IT
- 24681012141
+ 04507990150
Trasporto spa
@@ -101,6 +77,10 @@
1
+
+ INT
+ ART123
+
LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
5.00
1.00
@@ -117,9 +97,9 @@
22.00
- 27.00
- 5.95
- D
+ 25.00
+ 5.50
+ I
@@ -127,8 +107,48 @@
MP01
2015-01-30
- 32.95
+ 32.50
-
+
+
+
+ TD01
+ EUR
+ 2014-12-20
+ 456
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+ 1
+ 66685
+ 1
+
+
+
+
+ 1
+ PRESTAZIONE DEL SEGUENTE SERVIZIO PROFESSIONALE: LA DESCRIZIONE DELLA PRESTAZIONE PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
+ 2000.00
+ 2000.00
+ 22.00
+
+
+ 22.00
+ 2000.00
+ 440.00
+ I
+
+
+
+ TP01
+
+ MP19
+ 2015-01-28
+ 2440.00
+
+
+
+
\ No newline at end of file
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml
deleted file mode 100644
index c4b664bd73d4..000000000000
--- a/l10n_it_fatturapa_in/tests/data/IT02780790107_11003.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
- IT
- 02780790107
-
- 00001
- SDI11
- AAAAAA
-
-
-
-
-
- IT
- 02780790107
-
-
- SOCIETA' ALPHA SRL
-
- RF01
-
-
- VIALE ROMA 543
- 07100
- SASSARI
- SS
- IT
-
-
-
-
- 09876543210
-
- AMMINISTRAZIONE BETA
-
-
-
- VIA TORINO 38-B
- 00145
- ROMA
- RM
- IT
-
-
-
-
-
-
- TD01
- EUR
- 2014-12-23
- 125
- LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL
- SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
-
-
- 1
- 1
- 66685
- 1
- 123abc
- 456def
-
-
- 2
- 666852
- 2012-10-01
- 4
- 123cba2
- 456fed2
-
-
- 1
- 123
- 2012-09-01
- 5
- 123abc
- 456def
-
-
- 2
- 1232
- 2012-08-01
- 4
- 123abc2
- 456def2
-
-
- 1
- 2
- 123
- 5
- 123abc
- 456def
-
-
- 1
- 123
- 5
- 123abc
- 456def
-
-
- 1
- 123
- 2012-09-01
- 1
- 123abc
- 456def
-
-
-
-
- IT
- 05714511002
-
-
- Trasporto spa
-
-
- 2012-10-22T16:46:12.000+02:00
-
-
-
-
- 1
- LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
- 5.00
- 1.00
- 5.00
- 22.00
-
-
- 2
- FORNITURE VARIE PER UFFICIO
- 10.00
- 2.00
- 20.00
- 22.00
-
-
- 22.00
- 27.00
- 5.95
- D
-
-
-
- TP01
-
- MP01
- 2015-01-30
- 32.95
-
-
-
- test.png
- png
- descrizione test
- iVBOR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rf7qsla6+DefwLNTH7xakvz5u6mDELyHHBpgWkgEEAnp8wAge0e2bVESi8UcIsLMSZPeCgYCb8e6YQbAUz0cx1HZbBaM8/cfeeSRkvPPP9999dVX+bZt246LIaq3bNGvueYaedmIEbjv3nufNAOBB5UXkAs/Y1E4GPyaoeupO9ev95maA8Dll1/u0UR0ddDTo7sdmEIINDU1YeCgQdNWr127ctiwYZBSyoMHDx5XH+3evVt77bXXaMmSJVizfv0KJsR17777bo+JIo8XR8XQbLnnovhs04FaYirlSeni7qFtL4wLvJt6HwEhbqkZd9/G3++ZgdN/MtD923easfeHyaNa5e794RT9b985xD5+x31OPnUVqq+4525G5gPvp5tAIOoufa9Syi0NxqBp5v/865opf9iMaoSWHxkals16DK6Fw1ODgYAfm9glbZxznsvlKONlWGp56KGHvvi5z31ONTQ0yA0bNuhHuVhkO3bsMDOZDCZPmeI8VF2Nl3772zc1wxizd+9eWJblKqVIKUX5fF4dOnTINkOhyKm6/hQAVFZWEgCEQiGHiDB9+vSXhRB/725gtmfqAwcOIGia19y/cuUzQ4YMwZAhQ9zm5mYkk0fZR3v36rt378Y555zj7t27F7+85541hqb98NChQ/3OzMAx5LazbiI9dBtz6sevuYgZ9NsDyQ8guGeB7i4hOYFQHohBKpU1BT9n1LYl//C98zB9o/EkBkC/HtL6goXxGE+P4lEWejkE5y6Iy4PvAqsX2F6DGZ4cty6eg/U3g2untOZb/LMBWLE2tOWfALHSQAlKA+FBwzde1VD3uzox5qLOuR785OGVGze+aFnW8EQi4TAvPWy3abRM02TxeBxpy1oXC4fnzCocZVZTU8MCgYA+evRo2rZtm5o4cSIBwOOPP85efPFFPmLECDZixAjFOW9juocfeWSMct0niQiJZLJTtqH2WZtisRgGlJcfkb/i2muv1e+77z5n49atH80lk283NjX1ipn88gCAdP38xXPn/tW/vn79euOUU04BAGlZFsaPH0+PPvooM00To0eP5g888ABfvHhx3m/f6tWrB+UcZ7ehafHW1tZj9tdgAE7/6EfNKePG2fX19T0ebXds2Ud3r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aPPF8vaDp9QbNrzV7G0BLIEbza80t3m8+LBmLioERkb59+3bDdd1eu17W19eLuro6k7zA0X86fUTEa2trzdraWpN6mQzmmaefFvX19WZtbe+DOOrr60VNTU2n8t944w1BJy5fSN+CQLxyV62g5+pE8ruunr85r+dvJt394TJ9K7aLDzkD9wRORHz71q1imevqlM/r+Xxed11Xr6ur6zLo9cOGAoOLuro64bquns/ndSLSly1bpv/ud787bhr8cpPJpP6/lpFP4iRO4iRO4iRO4iRO4iT+F+L/AviS5OZi+9hAAAAAAElFTkSuQmCC
-
-
- test2.png
- png
- descrizione test 2
- iVBORw0KGgoAAAANSUhEUgAAALQAAABMCAYAAADEDJ1GAAA0DklEQVR4nO19eZwVxbX/t6p6ufudBRDUiJo8jTFm471EE/KMEVlUYNgX2UHEl8UIhpiIPrMYX0yiZlFxQWQbGBiYUdTRUaMgJvH3jMmLMRo0IBgEnfVufe/t7qrz+6NvD8PMnQWYIb7fj++H+2Fud9+qOl2nTp06dc4p4CRO4iRO4iRO4iRO4iRO4iRO4iT+vwX7ZzegCAQAXvi4AORR/A5H8fxJ/D+IDwtD6/AYON/NMwKHmRbwGPck855Ev0MAMOExqVH4iG6eLYbzAUwBUFr43tXA86U5APwbgPIenj+Jkzgq8B7udcXAnwewFUAOAHX4+GAAfgVgE4CvFSnDf94fBN215SROotcwAKwAUAtgPYCFHe53ZOwMOjOxAmAV/j6z8FzHZwjADwv3bi9831P4f2i7uk7iJI4ZN6A44xGAmnbP+SrBS4V7LgAbnk6sOvzunXZ/5wrPOe2urS78v6hQ5luF7x/rUNdJnESv4DNMe2a2O3zaM+i0dr/tivkJRzJtx+sKHvMXU00A4PnCtfMK37tSdU7iJI6AzygfwWHG6shoxRh0K4Cydt9deExajFFHFeq4t4ty04X/v9qhbU8Vrn+278g9if9f8EccZsyOurCDzlK62w8HJw6+FUALgNvgWUx8/KyL3zUVadczhXsj+o7U4wYnIt/O/r9Vx+dE1J6O/yfgS+cYjpS0Njx7ckdd2P+8BuAW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/n8K+lM5uMggiIC5xwa5w8rpRYuWbIEnt9Z72bcExkPx2pn7TLU7EZ74qgjrQ51Sx5BrDUEcFWuMxFziQwtz2zHlElTqCY26AMM+/m3jihs3a5KFl0ZMirWV9j4JzByR9TV1QmdMTFi9Ogj8jLv3r0bb775JnK5nG4YxkAQhVwpGec8S0StgUAg/e6776LjSbNLly7Vbr/9dmaa5onMm8F27dpl7Nu3z77qqquOeKe1tbUgpSB1vVS5bgkRGQaQA2MJSNn6SjCI2664ou35wkA0FyxYYLMumNFnagB47NFHoYjO4Zw72Wx277Rp0/CjH/0IN910E+vq9x8aPPF8vaDp9QbNrzV7G0BLIEbza80t3m8+LBmLioERkb59+3bDdd1eu17W19eLuro6k7zA0X86fUTEa2trzdraWpN6mQzmmaefFvX19WZtbe+DOOrr60VNTU2n8t944w1BJy5fSN+CQLxyV62g5+pE8ruunr85r+dvJt394TJ9K7aLDzkD9wRORHz71q1imevqlM/r+Xxed11Xr6ur6zLo9cOGAoOLuro64bquns/ndSLSly1bpv/ud787bhr8cpPJpP6/lpFP4iRO4iRO4iRO4iRO4iT+F+L/AviS5OZi+9hAAAAAAElFTkSuQmCC
-
-
-
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml
index 1bb43017a3b2..59524300a05c 100644
--- a/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11004.xml
@@ -1,5 +1,8 @@
-
+
@@ -7,8 +10,8 @@
02780790107
00001
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -88,6 +91,7 @@
LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ
SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+ SI
1
@@ -160,8 +164,8 @@
22.00
- 25.00
- 5.50
+ 34.00
+ 7.48
D
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml
index d14bfb7c3095..8aba9de93e66 100644
--- a/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11005.xml
@@ -1,5 +1,8 @@
-
+
@@ -7,8 +10,8 @@
02780790107
11005
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -82,8 +85,8 @@
TC01
4.00
- 9.00
- 225.00
+ 1.00
+ 25.00
22.00
rif. amm
@@ -156,15 +159,15 @@
2
FORNITURE VARIE PER UFFICIO
- 10.00
- 2.00
- 20.00
- 22.00
+ 10.00
+ 2.00
+ 20.00
+ 22.00
22.00
- 25.00
- 5.50
+ 26.00
+ 5.72
D
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml
index 969383576ed9..169d5f7e2a37 100644
--- a/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11006.xml
@@ -1,5 +1,8 @@
-
+
@@ -7,8 +10,8 @@
02780790107
11005
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml
index 52f3df99f6c6..99e9fcb8507c 100644
--- a/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11007.xml
@@ -1,5 +1,8 @@
-
+
@@ -7,8 +10,8 @@
02780790107
11007
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -86,9 +89,8 @@
15.55
- 26.00
25.00
- 5.50
+ 3.89
D
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml
index 07076657a068..f58a3c51695e 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_001.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
001
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -81,11 +84,20 @@
54.00
0.00
N4
+
+ Vostro RIF
+ Riferimento
+ 3.00
+
+
+ Vostro RIF
+ Riferimento2
+
0.00
N4
- 54.00
+ 57.00
0.00
Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
@@ -104,4 +116,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml
index e264753a1e0a..7f1c3f08644b 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_002.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
002
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -81,7 +84,7 @@
0.00
N4
- 54.00
+ 57.00
0.00
Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
@@ -100,4 +103,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_003.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_003.xml
index 3f1f97c5f1a8..240035ebebbe 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_003.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_003.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
003
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -48,7 +51,7 @@
IT
- 05979361228
+ 03533590174
MRORSS90E25B111T
@@ -66,6 +69,10 @@
EUR
2015-02-16
FT/2015/0008
+
+ SI
+ 6.00
+
Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
@@ -92,4 +99,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml
index 1c2e8121e678..fc0442860da3 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_004.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
004
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -48,7 +51,7 @@
IT
- 05979361228
+ 03533590174
MRORSS90E25B111T
@@ -115,4 +118,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml
index dc9f4267c8d8..dfbee1c3f82c 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_005.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
005
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -106,4 +109,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML b/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML
index e86b6765c2e6..d80f20d98b7a 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_006.XML
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
006
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -105,4 +108,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml
index f6385a9f6685..e4dccdf77f55 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_007.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
007
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -50,7 +53,7 @@
TD01
EUR
- 2015-03-16+02:00
+ 2015-03-16
FT/2015/0009
Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
@@ -84,11 +87,11 @@
2015-06-03+02:00
9.00
Bank Test
- IT28V0100003245232200001200
+ IT24J0617501400000006042218
GEBABEBB
2.00
2015-06-04+02:00
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml
index a054f728f770..719edafa35f9 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_008.xml
@@ -1,5 +1,8 @@
-
-
+
+
@@ -7,8 +10,8 @@
05979361218
008
- SDI11
- 79SRAK
+ FPA12
+ UFPQ1O
@@ -87,4 +90,4 @@
-
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_009.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_009.xml
new file mode 100644
index 000000000000..d63d98fcd40c
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_009.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 009
+ FPA12
+ UFPQ1O
+
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA SRL
+
+ RF19
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ DITTA BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18
+ 129
+
+ RT01
+ 1.00
+ 20.00
+ A
+
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+
+
+ 1
+ DESCRIZIONE DELLA FORNITURA
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+ SI
+
+
+ 22.00
+ 5.00
+ 1.10
+ I
+
+
+
+ TP01
+
+ MP01
+ 2015-01-30
+ 5.10
+
+
+
+
\ No newline at end of file
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index e613cc138dfe..b1be1d7a6468 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -1,113 +1,137 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2014 Davide Corio
-# Copyright (C) 2015 Lorenzo Battistini
-#
-# 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 .
-#
-##############################################################################
import base64
import tempfile
-import openerp.tests.common as test_common
-from openerp import addons
-from openerp.osv.orm import except_orm
+from odoo.tests.common import SingleTransactionCase
+from odoo.modules import get_module_resource
+from odoo.exceptions import UserError
-class TestFatturaPAXMLValidation(test_common.SingleTransactionCase):
+class TestFatturaPAXMLValidation(SingleTransactionCase):
def getFile(self, filename):
- path = addons.get_module_resource('l10n_it_fatturapa_in',
- 'tests', 'data', filename)
+ path = get_module_resource(
+ 'l10n_it_fatturapa_in', 'tests', 'data', filename)
with open(path) as test_data:
with tempfile.TemporaryFile() as out:
base64.encode(test_data, out)
out.seek(0)
return path, out.read()
+ def create_wt(self):
+ return self.env['withholding.tax'].create({
+ 'name': '1040',
+ 'code': '1040',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 20.0})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.a').id,
+ })
+
def setUp(self):
super(TestFatturaPAXMLValidation, self).setUp()
- self.wizard_model = self.registry('wizard.import.fatturapa')
- self.data_model = self.registry('ir.model.data')
- self.attach_model = self.registry('fatturapa.attachment.in')
- self.invoice_model = self.registry('account.invoice')
+ self.wizard_model = self.env['wizard.import.fatturapa']
+ self.data_model = self.env['ir.model.data']
+ self.attach_model = self.env['fatturapa.attachment.in']
+ self.invoice_model = self.env['account.invoice']
+ self.payable_account_id = self.env['account.account'].search([
+ ('user_type_id', '=', self.env.ref(
+ 'account.data_account_type_payable').id)
+ ], limit=1).id
+ self.headphones = self.env.ref(
+ 'product.product_product_7_product_template')
+ self.imac = self.env.ref(
+ 'product.product_product_8_product_template')
+ self.service = self.env.ref('product.service_delivery')
def run_wizard(self, name, file_name):
- cr, uid = self.cr, self.uid
- attach_id = self.attach_model .create(
- cr, uid,
+ attach_id = self.attach_model.create(
{
'name': name,
'datas': self.getFile(file_name)[1],
'datas_fname': file_name
- })
- wizard_id = self.wizard_model.create(cr, uid, {})
-
- return self.wizard_model.importFatturaPA(
- cr, uid, wizard_id, context={'active_ids': [attach_id]})
+ }).id
+ wizard = self.wizard_model.with_context(
+ active_ids=[attach_id]).create({})
+ return wizard.importFatturaPA()
def run_wizard_multi(self, file_name_list):
- cr, uid = self.cr, self.uid
active_ids = []
for file_name in file_name_list:
- active_ids.append(self.attach_model .create(
- cr, uid,
+ active_ids.append(self.attach_model.create(
{
'name': file_name,
'datas': self.getFile(file_name)[1],
'datas_fname': file_name
- }))
- wizard_id = self.wizard_model.create(cr, uid, {})
-
- return self.wizard_model.importFatturaPA(
- cr, uid, wizard_id, context={'active_ids': active_ids})
+ }).id)
+ wizard = self.wizard_model.with_context(
+ active_ids=active_ids).create({})
+ return wizard.importFatturaPA()
def test_00_xml_import(self):
- cr, uid = self.cr, self.uid
+ self.env.user.company_id.cassa_previdenziale_product_id = (
+ self.service.id)
res = self.run_wizard('test0', 'IT05979361218_001.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id.register_code, 'TO1258B')
self.assertEqual(
invoice.partner_id.register_fiscalpos.code, 'RF02')
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0006')
- self.assertEqual(invoice.amount_total, 54.00)
+ self.assertEqual(invoice.reference, 'FT/2015/0006')
+ self.assertEqual(invoice.amount_total, 57.00)
self.assertEqual(invoice.gross_weight, 0.00)
self.assertEqual(invoice.net_weight, 0.00)
+ self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, 'N4')
+ self.assertFalse(invoice.art73)
+ welfare_found = False
+ for line in invoice.invoice_line_ids:
+ if line.product_id.id == self.service.id:
+ self.assertEqual(line.price_unit, 3)
+ welfare_found = True
+ self.assertTrue(welfare_found)
+ self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].name, 'Prodotto di test al giorno')
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].qty, 15)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].uom, 'Giorno(i)')
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].unit_price, 3.6)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].total_price, 54)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].tax_amount, 0)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].tax_kind, 'N4')
+ self.assertTrue(len(invoice.e_invoice_line_ids[0].other_data_ids) == 2)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].other_data_ids[0].text_ref,
+ 'Riferimento')
def test_01_xml_import(self):
- cr, uid = self.cr, self.uid
res = self.run_wizard('test1', 'IT02780790107_11004.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, '123')
- self.assertEqual(invoice.amount_untaxed, 25.00)
- self.assertEqual(invoice.amount_tax, 5.50)
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, '123')
+ self.assertEqual(invoice.amount_untaxed, 34.00)
+ self.assertEqual(invoice.amount_tax, 7.48)
self.assertEqual(
- len(invoice.invoice_line[0].invoice_line_tax_id), 1)
+ len(invoice.invoice_line_ids[0].invoice_line_tax_ids), 1)
self.assertEqual(
- invoice.invoice_line[0].invoice_line_tax_id[0].name, '22% ftPA')
+ invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name,
+ '22% ftPA acq')
self.assertEqual(
- invoice.fatturapa_summary_ids[0].amount_untaxed, 25.00)
+ invoice.fatturapa_summary_ids[0].amount_untaxed, 34.00)
self.assertEqual(
- invoice.fatturapa_summary_ids[0].amount_tax, 5.50)
+ invoice.fatturapa_summary_ids[0].amount_tax, 7.48)
self.assertEqual(
invoice.fatturapa_summary_ids[0].payability, 'D')
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
self.assertEqual(invoice.partner_id.street, "VIALE ROMA 543")
- self.assertEqual(invoice.partner_id.province.code, "SS")
+ self.assertEqual(invoice.partner_id.state_id.code, "SS")
self.assertEqual(
invoice.tax_representative_id.name, "Rappresentante fiscale")
self.assertEqual(invoice.welfare_fund_ids[0].welfare_rate_tax, 0.04)
@@ -121,76 +145,91 @@ def test_01_xml_import(self):
invoice.welfare_fund_ids[0].welfare_amount_tax, 9)
self.assertFalse(invoice.welfare_fund_ids[0].welfare_taxable)
self.assertEqual(invoice.unit_weight, 'KGM')
- self.assertEqual(invoice.incoterm.code, 'DAP')
+ self.assertEqual(invoice.ftpa_incoterms, 'DAP')
+ self.assertEqual(invoice.fiscal_document_type_id.code, 'TD01')
+ self.assertTrue(invoice.art73)
- def test_02_xml_import(self):
- cr, uid = self.cr, self.uid
- res = self.run_wizard('test2', 'IT03638121008_X11111.xml')
- invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, '00001')
- self.assertEqual(invoice.amount_untaxed, 3)
- self.assertEqual(invoice.amount_tax, 0.66)
- self.assertEqual(
- invoice.fatturapa_summary_ids[0].amount_untaxed, 3)
- self.assertEqual(
- invoice.fatturapa_summary_ids[0].amount_tax, 0.66)
- self.assertEqual(invoice.partner_id.name, "Societa' alpha S.r.l.")
+ # def test_02_xml_import(self):
+ # res = self.run_wizard('test2', 'IT03638121008_X11111.xml')
+ # invoice_id = res.get('domain')[0][2][0]
+ # invoice = self.invoice_model.browse(invoice_id)
+ # self.assertEqual(invoice.supplier_invoice_number, '00001')
+ # self.assertEqual(invoice.amount_untaxed, 3)
+ # self.assertEqual(invoice.amount_tax, 0.66)
+ # self.assertEqual(
+ # invoice.fatturapa_summary_ids[0].amount_untaxed, 3)
+ # self.assertEqual(
+ # invoice.fatturapa_summary_ids[0].amount_tax, 0.66)
+ # self.assertEqual(invoice.partner_id.name, "Societa' alpha S.r.l.")
- def test_03_xml_import(self):
- cr, uid = self.cr, self.uid
- res = self.run_wizard('test3', 'IT05979361218_002.xml.p7m')
- invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.partner_id.register_code, 'TO1258B')
- self.assertEqual(
- invoice.partner_id.register_fiscalpos.code, 'RF02')
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0007')
- self.assertEqual(invoice.amount_total, 54.00)
+ # def test_03_xml_import(self):
+ # res = self.run_wizard('test3', 'IT05979361218_002.xml.p7m')
+ # invoice_id = res.get('domain')[0][2][0]
+ # invoice = self.invoice_model.browse(invoice_id)
+ # self.assertEqual(invoice.partner_id.register_code, 'TO1258B')
+ # self.assertEqual(
+ # invoice.partner_id.register_fiscalpos.code, 'RF02')
+ # self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0007')
+ # self.assertEqual(invoice.amount_total, 54.00)
def test_04_xml_import(self):
- cr, uid = self.cr, self.uid
res = self.run_wizard('test4', 'IT02780790107_11005.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, '124')
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, '124')
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
self.assertEqual(
- invoice.invoice_line[0].invoice_line_tax_id[0].name, '22% ftPA')
+ invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name,
+ '22% ftPA acq')
self.assertEqual(
- invoice.invoice_line[1].invoice_line_tax_id[0].name, '22% ftPA')
+ invoice.invoice_line_ids[1].invoice_line_tax_ids[0].name,
+ '22% ftPA acq')
self.assertEqual(
- invoice.invoice_line[0].invoice_line_tax_id[0].amount, 0.22)
+ invoice.invoice_line_ids[0].invoice_line_tax_ids[0].amount, 22)
self.assertEqual(
- invoice.invoice_line[1].invoice_line_tax_id[0].amount, 0.22)
+ invoice.invoice_line_ids[1].invoice_line_tax_ids[0].amount, 22)
self.assertEqual(
- invoice.invoice_line[1].price_unit, 2)
- self.assertEqual(
- invoice.invoice_line[0].cod_article_ids[0].name, 'EAN')
- self.assertEqual(
- invoice.invoice_line[0].cod_article_ids[0].code_val, '12345')
+ invoice.invoice_line_ids[1].price_unit, 2)
+ self.assertTrue(len(invoice.e_invoice_line_ids) == 2)
+ for e_line in invoice.e_invoice_line_ids:
+ self.assertTrue(e_line.line_number in (1, 2))
+ if e_line.line_number == 1:
+ self.assertEqual(
+ e_line.cod_article_ids[0].name, 'EAN')
+ self.assertEqual(
+ e_line.cod_article_ids[0].code_val, '12345')
self.assertEqual(
invoice.inconsistencies,
u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
- 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"')
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n')
def test_05_xml_import(self):
- cr, uid = self.cr, self.uid
+ self.env.user.company_id.dati_bollo_product_id = (
+ self.service.id)
res = self.run_wizard('test5', 'IT05979361218_003.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0008')
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, 'FT/2015/0008')
self.assertEqual(invoice.sender, 'TZ')
self.assertEqual(invoice.intermediary.name, 'ROSSI MARIO')
self.assertEqual(invoice.intermediary.firstname, 'MARIO')
self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
- self.assertEqual(
- invoice.invoice_line[0].discount_rise_price_ids[0].name, 'SC')
- self.assertEqual(
- invoice.invoice_line[0].discount_rise_price_ids[0].percentage, 10)
- self.assertEqual(invoice.amount_untaxed, 9)
+ bollo_found = False
+ for line in invoice.invoice_line_ids:
+ if line.product_id.id == self.service.id:
+ self.assertEqual(line.price_unit, 6)
+ bollo_found = True
+ self.assertTrue(bollo_found)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].discount_rise_price_ids[0].name,
+ 'SC')
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].discount_rise_price_ids[0].
+ percentage, 10
+ )
+ self.assertEqual(invoice.amount_untaxed, 15)
self.assertEqual(invoice.amount_tax, 0)
- self.assertEqual(invoice.amount_total, 9)
+ self.assertEqual(invoice.amount_total, 15)
def test_06_import_except(self):
# File not exist Exception
@@ -198,42 +237,39 @@ def test_06_import_except(self):
Exception, self.run_wizard, 'test6_Exception', '')
# fake Signed file is passed , generate orm_exception
self.assertRaises(
- except_orm, self.run_wizard, 'test6_orm_exception',
+ UserError, self.run_wizard, 'test6_orm_exception',
'IT05979361218_fake.xml.p7m'
)
def test_07_xml_import(self):
- cr, uid = self.cr, self.uid
# 2 lines with quantity != 1 and discounts
res = self.run_wizard('test7', 'IT05979361218_004.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0009')
- self.assertEqual(invoice.amount_untaxed, 1173.60)
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, 'FT/2015/0009')
+ self.assertAlmostEqual(invoice.amount_untaxed, 1173.60)
self.assertEqual(invoice.amount_tax, 258.19)
self.assertEqual(invoice.amount_total, 1431.79)
- self.assertEqual(invoice.invoice_line[0].admin_ref, 'D122353')
+ self.assertEqual(invoice.invoice_line_ids[0].admin_ref, 'D122353')
def test_08_xml_import(self):
- cr, uid = self.cr, self.uid
# using ImportoTotaleDocumento
res = self.run_wizard('test8', 'IT05979361218_005.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0010')
- self.assertEqual(invoice.amount_total, 1288.61)
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, 'FT/2015/0010')
+ self.assertAlmostEqual(invoice.amount_total, 1288.61)
self.assertFalse(invoice.inconsistencies)
def test_09_xml_import(self):
- cr, uid = self.cr, self.uid
# using DatiGeneraliDocumento.ScontoMaggiorazione without
# ImportoTotaleDocumento
# add test file name case sensitive
res = self.run_wizard('test9', 'IT05979361218_006.XML')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0011')
- self.assertEqual(invoice.amount_total, 1288.61)
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, 'FT/2015/0011')
+ self.assertAlmostEqual(invoice.amount_total, 1288.61)
self.assertEqual(
invoice.inconsistencies,
'Computed amount untaxed 1030.42 is different from'
@@ -241,11 +277,10 @@ def test_09_xml_import(self):
def test_10_xml_import(self):
# Fix Date format
- cr, uid = self.cr, self.uid
res = self.run_wizard('test6', 'IT05979361218_007.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0009')
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, 'FT/2015/0009')
self.assertEqual(
invoice.date_invoice, '2015-03-16')
self.assertEqual(
@@ -261,25 +296,23 @@ def test_10_xml_import(self):
def test_11_xml_import(self):
# DatiOrdineAcquisto with RiferimentoNumeroLinea referring to
# not existing invoice line
- cr, uid = self.cr, self.uid
res = self.run_wizard('test11', 'IT02780790107_11006.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
+ invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(
- len(invoice.invoice_line[0].related_documents), 0)
+ len(invoice.invoice_line_ids[0].related_documents), 0)
self.assertEqual(
- invoice.invoice_line[0].sequence, 1)
+ invoice.invoice_line_ids[0].sequence, 1)
self.assertEqual(
invoice.related_documents[0].type, "order")
self.assertEqual(
invoice.related_documents[0].lineRef, 60)
def test_12_xml_import(self):
- cr, uid = self.cr, self.uid
res = self.run_wizard('test12', 'IT05979361218_008.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, 'FT/2015/0012')
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, 'FT/2015/0012')
self.assertEqual(invoice.sender, 'TZ')
self.assertEqual(invoice.intermediary.name, 'ROSSI MARIO')
self.assertEqual(invoice.intermediary.firstname, 'MARIO')
@@ -287,43 +320,102 @@ def test_12_xml_import(self):
def test_13_xml_import(self):
# inconsistencies must not be duplicated
- cr, uid = self.cr, self.uid
res = self.run_wizard_multi([
'IT02780790107_11005.xml',
'IT02780790107_11005.xml',
])
invoice1_id = res.get('domain')[0][2][0]
invoice2_id = res.get('domain')[0][2][1]
- invoice1 = self.invoice_model.browse(cr, uid, invoice1_id)
- invoice2 = self.invoice_model.browse(cr, uid, invoice2_id)
+ invoice1 = self.invoice_model.browse(invoice1_id)
+ invoice2 = self.invoice_model.browse(invoice2_id)
self.assertEqual(
invoice1.inconsistencies,
u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
- 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"')
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n')
self.assertEqual(
invoice2.inconsistencies,
u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
- 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"')
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n')
def test_14_xml_import(self):
# check: no tax code found , write inconsisteance and anyway
# create draft
- cr, uid = self.cr, self.uid
res = self.run_wizard('test14', 'IT02780790107_11007.xml')
invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(cr, uid, invoice_id)
- self.assertEqual(invoice.supplier_invoice_number, '136')
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, '136')
self.assertEqual(invoice.partner_id.name, 'SOCIETA\' ALPHA SRL')
self.assertEqual(invoice.amount_untaxed, 25.00)
self.assertEqual(invoice.amount_tax, 0.0)
- # check: filling check_total invoice field with summary data take from
- # ''DatitRiepilogo'
- self.assertEqual(invoice.check_total, 56.50)
self.assertEqual(
invoice.inconsistencies,
u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
- 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n'
+ 'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n'
u'XML contains tax with percentage "15.55"'
' but it does not exist in your system\n'
'XML contains tax with percentage "15.55"'
' but it does not exist in your system')
+
+ def test_15_xml_import(self):
+ self.wt = self.create_wt()
+ res = self.run_wizard('test15', 'IT05979361218_009.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertAlmostEquals(invoice.withholding_tax_amount, 1)
+ self.assertAlmostEquals(invoice.amount_total, 6.1)
+ self.assertAlmostEquals(invoice.amount_net_pay, 5.1)
+
+ def test_16_xml_import(self):
+ # file B2B downloaded from
+ # http://www.fatturapa.gov.it/export/fatturazione/it/a-3.htm
+ res = self.run_wizard('test16', 'IT01234567890_FPR03.xml')
+ invoice_ids = res.get('domain')[0][2]
+ invoices = self.invoice_model.browse(invoice_ids)
+ self.assertEqual(len(invoices), 2)
+ for invoice in invoices:
+ self.assertEqual(invoice.inconsistencies, '')
+ self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
+ self.assertTrue(invoice.reference in ('456', '123'))
+ if invoice.reference == '123':
+ self.assertTrue(len(invoice.invoice_line_ids) == 2)
+ for line in invoice.invoice_line_ids:
+ self.assertFalse(line.product_id)
+ if invoice.reference == '456':
+ self.assertTrue(len(invoice.invoice_line_ids) == 1)
+ for line in invoice.invoice_line_ids:
+ self.assertFalse(line.product_id)
+
+ partner = invoice.partner_id
+ partner.e_invoice_default_product_id = (
+ self.imac.product_variant_ids[0].id)
+ # I create a supplier code to be matched in XML
+ self.env['product.supplierinfo'].create({
+ 'name': partner.id,
+ 'product_tmpl_id': self.headphones.id,
+ 'product_code': 'ART123',
+ })
+ res = self.run_wizard('test17', 'IT01234567890_FPR03.xml')
+ invoice_ids = res.get('domain')[0][2]
+ invoices = self.invoice_model.browse(invoice_ids)
+ for invoice in invoices:
+ self.assertTrue(invoice.reference in ('456', '123'))
+ if invoice.reference == '123':
+ self.assertEqual(
+ invoice.invoice_line_ids[0].product_id.id,
+ self.headphones.product_variant_ids[0].id
+ )
+ else:
+ for line in invoice.invoice_line_ids:
+ self.assertEqual(
+ line.product_id.id,
+ self.imac.product_variant_ids[0].id
+ )
+
+ # change Livello di dettaglio Fatture elettroniche to Minimo
+ partner.e_invoice_detail_level = '0'
+ res = self.run_wizard('test17', 'IT01234567890_FPR03.xml')
+ invoice_ids = res.get('domain')[0][2]
+ invoices = self.invoice_model.browse(invoice_ids)
+ self.assertTrue(len(invoices) == 2)
+ for invoice in invoices:
+ self.assertTrue(len(invoice.invoice_line_ids) == 0)
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 5074a2a50ac5..9e230db3620a 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -1,147 +1,265 @@
-
-
+
-
- fatturapa.attachment.in.form
- fatturapa.attachment.in
-
-
+
+
+
+ fatturapa.attachment.in.tree
+ fatturapa.attachment.in
+
+
+
+
+
+
+
+
+
+
+
+
+ fatturapa.attachment.in.search
+ fatturapa.attachment.in
+
+
+
+
+
+
+
+
+ Incoming Fattura Elettronica files
+ fatturapa.attachment.in
+ form
+ tree,form
+ {'search_default_to_register': True}
+
+
+
+
+
+ account.invoice.line.fatturapa.in
+ account.invoice.line
+
+
+
+
-
-
- fatturapa.attachment.in.tree
- fatturapa.attachment.in
-
-
-
-
-
+
+
+
+
+ account.invoice.fatturapa_in
+ account.invoice
+
+
+
+
+
+
+
+
+
-
-
- Incoming fatturaPA files
- fatturapa.attachment.in
- form
- tree,form
-
-
-
-
-
- account.invoice.line.fatturapa.in
- account.invoice.line
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
- account.invoice.fatturapa_in
- account.invoice
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -152,139 +270,73 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+ fatturapa.article.code.tree
+ fatturapa.article.code
+
+
+
+
+
+
+
+
+ discount.rise.price.tree
+ discount.rise.price
+
+
+
+
+
+
+
+
+
+ einvoice.line.other.data.tree
+ einvoice.line.other.data
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
new file mode 100644
index 000000000000..964a412864d0
--- /dev/null
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -0,0 +1,25 @@
+
+
+
+
+ view_account_config_settings_ftpa_in
+ account.config.settings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/views/partner_view.xml b/l10n_it_fatturapa_in/views/partner_view.xml
index 171671e26fb4..81e10e2a3218 100644
--- a/l10n_it_fatturapa_in/views/partner_view.xml
+++ b/l10n_it_fatturapa_in/views/partner_view.xml
@@ -6,18 +6,20 @@
res.partner
-
-
-
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/l10n_it_fatturapa_in/wizard/__init__.py b/l10n_it_fatturapa_in/wizard/__init__.py
index a45fc832329f..313c912d6f15 100644
--- a/l10n_it_fatturapa_in/wizard/__init__.py
+++ b/l10n_it_fatturapa_in/wizard/__init__.py
@@ -1,22 +1,4 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2015 AgileBG SAGL
-# Copyright (C) 2015 innoviu Srl
-#
-# 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 . import wizard_import_fatturapa
+from . import link_to_existing_invoice
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
new file mode 100644
index 000000000000..879f7943e3fe
--- /dev/null
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+
+from odoo import models, api, fields
+from odoo.tools.translate import _
+from odoo.exceptions import UserError
+
+
+class WizardLinkToInvoice(models.TransientModel):
+ _name = "wizard.link.to.invoice"
+ _description = "Link to Supplier Invoice"
+ invoice_id = fields.Many2one(
+ 'account.invoice', string="Invoice", required=True)
+
+ @api.multi
+ def link(self):
+ self.ensure_one()
+ active_ids = self.env.context.get('active_ids')
+ if len(active_ids) != 1:
+ raise UserError(_("You can select only 1 XML file to link"))
+ self.invoice_id.fatturapa_attachment_in_id = active_ids[0]
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
new file mode 100644
index 000000000000..18509d0aea3e
--- /dev/null
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ wizard_link_supplier_invoice
+ wizard.link.to.invoice
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index c252b594faf9..2045ba3528b7 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1,99 +1,104 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2015 AgileBG SAGL
-# Copyright (C) 2015 innoviu Srl
-#
-# 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 .
-#
-##############################################################################
+
import base64
-import os
-import shlex
-import subprocess
-from openerp.osv import orm
-from openerp.tools.translate import _
import logging
+from odoo import models, api, fields
+from odoo.tools import float_is_zero
+from odoo.tools.translate import _
+from odoo.exceptions import UserError
-
-from openerp.addons.l10n_it_fatturapa.bindings import fatturapa_v_1_1
-from openerp.addons.base_iban import base_iban
-from lxml import etree
+from odoo.addons.l10n_it_fatturapa.bindings import fatturapa_v_1_2
+from odoo.addons.base_iban.models.res_partner_bank import pretty_iban
_logger = logging.getLogger(__name__)
-class WizardImportFatturapa(orm.TransientModel):
+class WizardImportFatturapa(models.TransientModel):
_name = "wizard.import.fatturapa"
_description = "Import FatturaPA"
- def saveAttachment(self, cr, uid, context=None):
- if not context:
- context = {}
+ e_invoice_detail_level = fields.Selection([
+ ('0', 'Minimo'),
+ # ('1', 'Aliquote'),
+ ('2', 'Massimo'),
+ ], string="Livello di dettaglio Fatture elettroniche",
+ help="Livello minimo: La fattura passiva viene creata senza righe; "
+ "sara' l'utente a doverle creare in base a quanto indicato dal "
+ "fornitore nella fattura elettronica\n"
+ # "Livello Aliquote: viene creata una riga fattura per ogni "
+ # "aliquota presente nella fattura elettronica\n"
+ "Livello Massimo: tutte le righe presenti nella fattura "
+ "elettronica vengono create come righe della fattura passiva",
+ required=True
+ )
- return False
+ @api.model
+ def default_get(self, fields):
+ res = super(WizardImportFatturapa, self).default_get(fields)
+ res['e_invoice_detail_level'] = '2'
+ fatturapa_attachment_ids = self.env.context.get('active_ids', False)
+ fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
+ partners = self.env['res.partner']
+ for fatturapa_attachment_id in fatturapa_attachment_ids:
+ fatturapa_attachment = fatturapa_attachment_obj.browse(
+ fatturapa_attachment_id)
+ if fatturapa_attachment.in_invoice_ids:
+ raise UserError(
+ _("File %s is linked to invoices yet")
+ % fatturapa_attachment.name)
+ partners |= fatturapa_attachment.xml_supplier_id
+ if len(partners) == 1:
+ res['e_invoice_detail_level'] = (
+ partners[0].e_invoice_detail_level)
+ return res
- def CountryByCode(self, cr, uid, CountryCode, context=None):
- country_model = self.pool['res.country']
- return country_model.search(
- cr, uid, [('code', '=', CountryCode)], context=context)
+ def CountryByCode(self, CountryCode):
+ country_model = self.env['res.country']
+ return country_model.search([('code', '=', CountryCode)])
- def ProvinceByCode(self, cr, uid, provinceCode, context=None):
- province_model = self.pool['res.province']
- return province_model.search(
- cr, uid, [('code', '=', provinceCode)], context=context)
+ def ProvinceByCode(self, provinceCode):
+ province_model = self.env['res.country.state']
+ return province_model.search([
+ ('code', '=', provinceCode),
+ ('country_id.code', '=', 'IT')
+ ])
- def check_partner_base_data(
- self, cr, uid, partner_id, DatiAnagrafici, context=None
- ):
- if context is None:
- context = {}
- partner = self.pool['res.partner'].browse(
- cr, uid, partner_id, context=context)
+ def log_inconsistency(self, message):
+ inconsistencies = self.env.context.get('inconsistencies', '')
+ if inconsistencies:
+ inconsistencies += '\n'
+ inconsistencies += message
+ # we can't set
+ # self = self.with_context(inconsistencies=inconsistencies)
+ # because self is a locale variable.
+ # We use __dict__ to modify attributes of self
+ self.__dict__.update(
+ self.with_context(inconsistencies=inconsistencies).__dict__
+ )
+
+ def check_partner_base_data(self, partner_id, DatiAnagrafici):
+ partner = self.env['res.partner'].browse(partner_id)
if (
DatiAnagrafici.Anagrafica.Denominazione and
partner.name != DatiAnagrafici.Anagrafica.Denominazione
):
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
- _(
- "DatiAnagrafici.Anagrafica.Denominazione contains \"%s\"."
- " Your System contains \"%s\""
- )
- % (DatiAnagrafici.Anagrafica.Denominazione, partner.name)
- )
+ self.log_inconsistency(_(
+ "DatiAnagrafici.Anagrafica.Denominazione contains \"%s\"."
+ " Your System contains \"%s\""
+ ) % (DatiAnagrafici.Anagrafica.Denominazione, partner.name))
if (
DatiAnagrafici.Anagrafica.Nome and
partner.firstname != DatiAnagrafici.Anagrafica.Nome
):
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
- _(
- "DatiAnagrafici.Anagrafica.Nome contains \"%s\"."
- " Your System contains \"%s\""
- )
- % (DatiAnagrafici.Anagrafica.Nome, partner.firstname)
- )
+ self.log_inconsistency(_(
+ "DatiAnagrafici.Anagrafica.Nome contains \"%s\"."
+ " Your System contains \"%s\""
+ ) % (DatiAnagrafici.Anagrafica.Nome, partner.firstname))
if (
DatiAnagrafici.Anagrafica.Cognome and
partner.lastname != DatiAnagrafici.Anagrafica.Cognome
):
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
+ self.log_inconsistency(
_(
"DatiAnagrafici.Anagrafica.Cognome contains \"%s\"."
" Your System contains \"%s\""
@@ -101,10 +106,10 @@ def check_partner_base_data(
% (DatiAnagrafici.Anagrafica.Cognome, partner.lastname)
)
- def getPartnerBase(self, cr, uid, DatiAnagrafici, context=None):
+ def getPartnerBase(self, DatiAnagrafici):
if not DatiAnagrafici:
return False
- partner_model = self.pool['res.partner']
+ partner_model = self.env['res.partner']
cf = DatiAnagrafici.CodiceFiscale or False
vat = False
if DatiAnagrafici.IdFiscaleIVA:
@@ -112,63 +117,37 @@ def getPartnerBase(self, cr, uid, DatiAnagrafici, context=None):
DatiAnagrafici.IdFiscaleIVA.IdPaese,
DatiAnagrafici.IdFiscaleIVA.IdCodice
)
- partner_ids = partner_model.search(
- cr, uid,
- ['|',
- ('vat', '=', vat or 0),
- ('fiscalcode', '=', cf or 0),
- ],
- context=context)
+ partners = partner_model.search([
+ '|',
+ ('vat', '=', vat or 0),
+ ('fiscalcode', '=', cf or 0),
+ ])
commercial_partner = False
- if len(partner_ids) > 1:
- for partner in partner_model.browse(
- cr, uid, partner_ids, context=context
- ):
+ if len(partners) > 1:
+ for partner in partners:
if (
commercial_partner and
partner.commercial_partner_id.id != commercial_partner
):
- raise orm.except_orm(
- _('Error !'),
+ raise UserError(
_("Two distinct partners with "
"Vat %s and Fiscalcode %s already present in db" %
(vat, cf))
)
- commercial_partner = partner.commercial_partner_id.id
- if not partner_ids:
- if DatiAnagrafici.Anagrafica.Denominazione:
- partner_ids = partner_model.search(
- cr, uid,
- [('name', '=', DatiAnagrafici.Anagrafica.Denominazione)],
- context=context)
- elif (
- DatiAnagrafici.Anagrafica.Nome and
- DatiAnagrafici.Anagrafica.Cognome
- ):
- partner_ids = partner_model.search(
- cr, uid,
- [
- ('firstname', '=', DatiAnagrafici.Anagrafica.Nome),
- ('lastname', '=', DatiAnagrafici.Anagrafica.Cognome),
- ],
- context=context)
- if partner_ids:
- commercial_partner = partner_ids[0]
- self.check_partner_base_data(
- cr, uid, commercial_partner, DatiAnagrafici, context=context)
- return commercial_partner
+ if partners:
+ commercial_partner_id = partners[0].id
+ self.check_partner_base_data(commercial_partner_id, DatiAnagrafici)
+ return commercial_partner_id
else:
# partner to be created
country_id = False
if DatiAnagrafici.IdFiscaleIVA:
CountryCode = DatiAnagrafici.IdFiscaleIVA.IdPaese
- country_ids = self.CountryByCode(
- cr, uid, CountryCode, context=context)
- if country_ids:
- country_id = country_ids[0]
+ countries = self.CountryByCode(CountryCode)
+ if countries:
+ country_id = countries[0].id
else:
- raise orm.except_orm(
- _('Error !'),
+ raise UserError(
_("Country Code %s not found in system") % CountryCode
)
vals = {
@@ -188,14 +167,12 @@ def getPartnerBase(self, cr, uid, DatiAnagrafici, context=None):
if DatiAnagrafici.Anagrafica.Denominazione:
vals['name'] = DatiAnagrafici.Anagrafica.Denominazione
- return partner_model.create(cr, uid, vals, context=context)
+ return partner_model.create(vals).id
- def getCedPrest(self, cr, uid, cedPrest, context=None):
- partner_model = self.pool['res.partner']
- partner_id = self.getPartnerBase(
- cr, uid, cedPrest.DatiAnagrafici, context=context)
- fiscalPosModel = self.pool['fatturapa.fiscal_position']
- vals = {}
+ def getCedPrest(self, cedPrest):
+ partner_model = self.env['res.partner']
+ partner_id = self.getPartnerBase(cedPrest.DatiAnagrafici)
+ fiscalPosModel = self.env['fatturapa.fiscal_position']
if partner_id:
vals = {
'street': cedPrest.Sede.Indirizzo,
@@ -205,15 +182,24 @@ def getCedPrest(self, cr, uid, cedPrest, context=None):
}
if cedPrest.DatiAnagrafici.ProvinciaAlbo:
ProvinciaAlbo = cedPrest.DatiAnagrafici.ProvinciaAlbo
- prov_ids = self.ProvinceByCode(
- cr, uid, ProvinciaAlbo, context=context)
- if not prov_ids:
- raise orm.except_orm(
- _('Error !'),
- _('ProvinciaAlbo ( %s ) not present in system') %
- ProvinciaAlbo
- )
- vals['register_province'] = prov_ids[0]
+ prov = self.ProvinceByCode(ProvinciaAlbo)
+ if not prov:
+ self.log_inconsistency(
+ _('ProvinciaAlbo ( %s ) not present in system')
+ % ProvinciaAlbo
+ )
+ else:
+ vals['register_province'] = prov[0].id
+ if cedPrest.Sede.Provincia:
+ Provincia = cedPrest.Sede.Provincia
+ prov_sede = self.ProvinceByCode(Provincia)
+ if not prov_sede:
+ self.log_inconsistency(
+ _('Provincia ( %s ) not present in system')
+ % Provincia
+ )
+ else:
+ vals['state_id'] = prov_sede[0].id
vals['register_code'] = (
cedPrest.DatiAnagrafici.NumeroIscrizioneAlbo)
@@ -222,34 +208,31 @@ def getCedPrest(self, cr, uid, cedPrest, context=None):
if cedPrest.DatiAnagrafici.RegimeFiscale:
rfPos = cedPrest.DatiAnagrafici.RegimeFiscale
- FiscalPosIds = fiscalPosModel.search(
- cr, uid,
- [('code', '=', rfPos)],
- context=context
+ FiscalPos = fiscalPosModel.search(
+ [('code', '=', rfPos)]
)
- if not FiscalPosIds:
- raise orm.except_orm(
- _('Error!'),
+ if not FiscalPos:
+ raise UserError(
_('RegimeFiscale %s is not present in your system')
% rfPos
)
else:
- vals['register_fiscalpos'] = FiscalPosIds[0]
+ vals['register_fiscalpos'] = FiscalPos[0].id
if cedPrest.IscrizioneREA:
REA = cedPrest.IscrizioneREA
vals['rea_code'] = REA.NumeroREA
- office_id = False
- office_ids = self.ProvinceByCode(
- cr, uid, REA.Ufficio, context=context)
- if not office_ids:
- raise orm.except_orm(
- _('Error !'),
- _('REA Office Code ( %s ) not present in system') %
- REA.Ufficio
- )
- office_id = office_ids[0]
- vals['rea_office'] = office_id
+ offices = self.ProvinceByCode(REA.Ufficio)
+ if not offices:
+ self.log_inconsistency(
+ _(
+ 'REA Office (Province) Code ( %s ) not present in '
+ 'system'
+ ) % REA.Ufficio
+ )
+ else:
+ office_id = offices[0].id
+ vals['rea_office'] = office_id
vals['rea_capital'] = REA.CapitaleSociale or 0.0
vals['rea_member_type'] = REA.SocioUnico or False
vals['rea_liquidation_state'] = REA.StatoLiquidazione or False
@@ -258,73 +241,61 @@ def getCedPrest(self, cr, uid, cedPrest, context=None):
vals['phone'] = cedPrest.Contatti.Telefono
vals['email'] = cedPrest.Contatti.Email
vals['fax'] = cedPrest.Contatti.Fax
- partner_model.write(cr, uid, partner_id, vals, context=context)
+ partner_model.browse(partner_id).write(vals)
return partner_id
- def getCarrirerPartner(self, cr, uid, Carrier, context=None):
- partner_model = self.pool['res.partner']
- partner_id = self.getPartnerBase(
- cr, uid, Carrier.DatiAnagraficiVettore, context=context)
- vals = {}
+ def getCarrirerPartner(self, Carrier):
+ partner_model = self.env['res.partner']
+ partner_id = self.getPartnerBase(Carrier.DatiAnagraficiVettore)
if partner_id:
vals = {
'license_number':
Carrier.DatiAnagraficiVettore.NumeroLicenzaGuida or '',
}
- partner_model.write(cr, uid, partner_id, vals, context=context)
+ partner_model.browse(partner_id).write(vals)
return partner_id
- def _prepareInvoiceLine(
- self, cr, uid, credit_account_id, line, context=None
- ):
- account_tax_model = self.pool['account.tax']
+ def _prepare_generic_line_data(self, line):
+ retLine = {}
+ account_tax_model = self.env['account.tax']
# check if a default tax exists and generate def_purchase_tax object
- ir_values = self.pool.get('ir.values')
- company_id = self.pool.get('res.company')._company_default_get(
- cr, uid, 'account.invoice.line', context=context
- )
+ ir_values = self.env['ir.values']
+ company_id = self.env['res.company']._company_default_get(
+ 'account.invoice.line').id
supplier_taxes_ids = ir_values.get_default(
- cr, uid, 'product.product', 'supplier_taxes_id',
- company_id=company_id
- )
+ 'product.product', 'supplier_taxes_id', company_id=company_id)
def_purchase_tax = False
if supplier_taxes_ids:
- def_purchase_tax = account_tax_model.browse(
- cr, uid, supplier_taxes_ids, context=context)[0]
+ def_purchase_tax = account_tax_model.browse(supplier_taxes_ids)[0]
if float(line.AliquotaIVA) == 0.0 and line.Natura:
- account_tax_ids = account_tax_model.search(
- cr, uid,
+ account_taxes = account_tax_model.search(
[
- ('type_tax_use', 'in', ('purchase', 'all')),
- ('non_taxable_nature', '=', line.Natura),
+ ('type_tax_use', '=', 'purchase'),
+ ('kind_id.code', '=', line.Natura),
('amount', '=', 0.0),
- ], context=context)
- if not account_tax_ids:
- raise orm.except_orm(
- _('Error!'),
+ ])
+ if not account_taxes:
+ raise UserError(
_('No tax with percentage '
- '%s and nature %s found')
+ '%s and nature %s found. Please configure this tax')
% (line.AliquotaIVA, line.Natura))
- if len(account_tax_ids) > 1:
- raise orm.except_orm(
- _('Error!'),
+ if len(account_taxes) > 1:
+ raise UserError(
_('Too many taxes with percentage '
'%s and nature %s found')
% (line.AliquotaIVA, line.Natura))
else:
- account_tax_ids = account_tax_model.search(
- cr, uid,
+ account_taxes = account_tax_model.search(
[
- ('type_tax_use', 'in', ('purchase', 'all')),
- ('amount', '=', float(line.AliquotaIVA) / 100),
+ ('type_tax_use', '=', 'purchase'),
+ ('amount', '=', float(line.AliquotaIVA)),
('price_include', '=', False),
# partially deductible VAT must be set by user
- ('child_ids', '=', False),
- ], context=context)
- if not account_tax_ids:
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
+ ('children_tax_ids', '=', False),
+ ]
+ )
+ if not account_taxes:
+ self.log_inconsistency(
_(
'XML contains tax with percentage "%s" '
'but it does not exist in your system'
@@ -332,7 +303,7 @@ def _prepareInvoiceLine(
)
# check if there are multiple taxes with
# same percentage
- if len(account_tax_ids) > 1:
+ if len(account_taxes) > 1:
# just logging because this is an usual case: see split payment
_logger.warning(_(
"Line '%s': Too many taxes with percentage equals "
@@ -343,44 +314,93 @@ def _prepareInvoiceLine(
# set taxes list equal to supplier_taxes_id, loaded before
if (
def_purchase_tax and
- def_purchase_tax.amount == (float(line.AliquotaIVA) / 100)
+ def_purchase_tax.amount == (float(line.AliquotaIVA))
):
- account_tax_ids = supplier_taxes_ids
- retLine = {
+ account_taxes = def_purchase_tax
+ if account_taxes:
+ retLine['invoice_line_tax_ids'] = [(6, 0, [account_taxes[0].id])]
+ return retLine
+
+ def get_line_product(self, line, partner):
+ product = None
+ supplier_info = self.env['product.supplierinfo']
+ if len(line.CodiceArticolo) == 1:
+ supplier_code = line.CodiceArticolo[0].CodiceValore
+ supplier_infos = supplier_info.search([
+ ('product_code', '=', supplier_code),
+ ('name', '=', partner.id)
+ ])
+ if supplier_infos:
+ products = supplier_infos.mapped('product_id')
+ if len(products) == 1:
+ product = products[0]
+ else:
+ templates = supplier_infos.mapped('product_tmpl_id')
+ if len(templates) == 1:
+ product = templates.product_variant_ids[0]
+ if not product and partner.e_invoice_default_product_id:
+ product = partner.e_invoice_default_product_id
+ return product
+
+ def adjust_accounting_data(self, product, line_vals):
+ if product.product_tmpl_id.property_account_expense_id:
+ line_vals['account_id'] = (
+ product.product_tmpl_id.property_account_expense_id.id)
+ elif (
+ product.product_tmpl_id.categ_id.property_account_expense_categ_id
+ ):
+ line_vals['account_id'] = (
+ product.product_tmpl_id.categ_id.
+ property_account_expense_categ_id.id
+ )
+ account = self.env['account.account'].browse(line_vals['account_id'])
+ new_tax = None
+ if len(product.product_tmpl_id.supplier_taxes_id) == 1:
+ new_tax = product.product_tmpl_id.supplier_taxes_id[0]
+ elif len(account.tax_ids) == 1:
+ new_tax = account.tax_ids[0]
+ if new_tax:
+ line_tax_id = (
+ line_vals.get('invoice_line_tax_ids') and
+ line_vals['invoice_line_tax_ids'][0][2][0]
+ )
+ line_tax = self.env['account.tax'].browse(line_tax_id)
+ if new_tax.id != line_tax_id:
+ if new_tax._get_tax_amount() != line_tax._get_tax_amount():
+ self.log_inconsistency(_(
+ "XML contains tax %s. Product %s has tax %s. Using "
+ "the XML one"
+ ) % (line_tax.name, product.name, new_tax.name))
+ else:
+ # If product has the same amount of the one in XML,
+ # I use it. Typical case: 22% det 50%
+ line_vals['invoice_line_tax_ids'] = [
+ (6, 0, [new_tax.id])]
+
+ def _prepareInvoiceLine(self, credit_account_id, line, wt_found=False):
+ retLine = self._prepare_generic_line_data(line)
+ retLine.update({
'name': line.Descrizione,
'sequence': int(line.NumeroLinea),
'account_id': credit_account_id,
- }
- if account_tax_ids:
- retLine['invoice_line_tax_id'] = [(6, 0, [account_tax_ids[0]])]
+ })
if line.PrezzoUnitario:
retLine['price_unit'] = float(line.PrezzoUnitario)
if line.Quantita:
retLine['quantity'] = float(line.Quantita)
- if line.TipoCessionePrestazione:
- retLine['service_type'] = line.TipoCessionePrestazione
- if line.TipoCessionePrestazione:
- retLine['service_type'] = line.TipoCessionePrestazione
- if line.UnitaMisura:
- retLine['ftpa_uom'] = line.UnitaMisura
- if line.DataInizioPeriodo:
- retLine['service_start'] = line.DataInizioPeriodo
- if line.DataFinePeriodo:
- retLine['service_end'] = line.DataFinePeriodo
if (
line.PrezzoTotale and line.PrezzoUnitario and line.Quantita and
line.ScontoMaggiorazione
):
- retLine['discount'] = self._computeDiscount(
- cr, uid, line, context=context)
+ retLine['discount'] = self._computeDiscount(line)
if line.RiferimentoAmministrazione:
retLine['admin_ref'] = line.RiferimentoAmministrazione
+ if wt_found and line.Ritenuta:
+ retLine['invoice_line_tax_wt_ids'] = [(6, 0, [wt_found.id])]
return retLine
- def _prepareRelDocsLine(
- self, cr, uid, invoice_id, line, type, context=None
- ):
+ def _prepareRelDocsLine(self, invoice_id, line, type):
res = []
lineref = line.RiferimentoNumeroLinea or False
IdDoc = line.IdDocumento or 'Error'
@@ -393,15 +413,14 @@ def _prepareRelDocsLine(
if lineref:
for numline in lineref:
invoice_lineid = False
- invoice_line_model = self.pool['account.invoice.line']
- invoice_line_ids = invoice_line_model.search(
- cr, uid,
+ invoice_line_model = self.env['account.invoice.line']
+ invoice_lines = invoice_line_model.search(
[
('invoice_id', '=', invoice_id),
('sequence', '=', int(numline)),
- ], context=context)
- if invoice_line_ids:
- invoice_lineid = invoice_line_ids[0]
+ ])
+ if invoice_lines:
+ invoice_lineid = invoice_lines[0].id
val = {
'type': type,
'name': IdDoc,
@@ -430,10 +449,7 @@ def _prepareRelDocsLine(
res.append(val)
return res
- def _prepareWelfareLine(
- self, cr, uid, invoice_id, line, context=None
- ):
- res = []
+ def _prepareWelfareLine(self, invoice_id, line):
TipoCassa = line.TipoCassa or False
AlCassa = line.AlCassa and (float(line.AlCassa)/100) or None
ImportoContributoCassa = (
@@ -445,17 +461,26 @@ def _prepareWelfareLine(
line.AliquotaIVA and (float(line.AliquotaIVA)/100) or None)
Ritenuta = line.Ritenuta or ''
Natura = line.Natura or False
+ kind_id = False
+ if Natura:
+ kind = self.env['account.tax.kind'].search([
+ ('code', '=', Natura)
+ ])
+ if not kind:
+ self.log_inconsistency(
+ _("Tax kind %s not found") % Natura
+ )
+ else:
+ kind_id = kind[0].id
+
RiferimentoAmministrazione = line.RiferimentoAmministrazione or ''
- WelfareTypeModel = self.pool['welfare.fund.type']
+ WelfareTypeModel = self.env['welfare.fund.type']
if not TipoCassa:
- raise orm.except_orm(
- _('Error!'),
+ raise UserError(
_('TipoCassa is not defined ')
)
- WelfareTypeId = WelfareTypeModel.search(
- cr, uid,
- [('name', '=', TipoCassa)],
- context=context
+ WelfareType = WelfareTypeModel.search(
+ [('name', '=', TipoCassa)]
)
res = {
@@ -464,38 +489,32 @@ def _prepareWelfareLine(
'welfare_taxable': ImponibileCassa,
'welfare_Iva_tax': AliquotaIVA,
'subjected_withholding': Ritenuta,
- 'fund_nature': Natura or False,
+ 'kind_id': kind_id,
'pa_line_code': RiferimentoAmministrazione,
'invoice_id': invoice_id,
}
- if not WelfareTypeId:
- raise orm.except_orm(
- _('Error'),
+ if not WelfareType:
+ raise UserError(
_('TipoCassa %s is not present in your system') % TipoCassa)
else:
- res['name'] = WelfareTypeId[0]
+ res['name'] = WelfareType[0].id
return res
- def _prepareDiscRisePriceLine(
- self, cr, uid, id, line, context=None
- ):
- res = []
+ def _prepareDiscRisePriceLine(self, id, line):
Tipo = line.Tipo or False
Percentuale = line.Percentuale and float(line.Percentuale) or 0.0
Importo = line.Importo and float(line.Importo) or 0.0
res = {
'percentage': Percentuale,
'amount': Importo,
- context.get('drtype'): id,
+ self.env.context.get('drtype'): id,
}
res['name'] = Tipo
return res
- def _computeDiscount(
- self, cr, uid, DettaglioLinea, context=None
- ):
+ def _computeDiscount(self, DettaglioLinea):
line_total = float(DettaglioLinea.PrezzoTotale)
line_unit = line_total / float(DettaglioLinea.Quantita)
discount = (
@@ -503,14 +522,13 @@ def _computeDiscount(
) * 100.0
return discount
- def _addGlobalDiscount(
- self, cr, uid, invoice_id, DatiGeneraliDocumento, context=None
- ):
+ def _addGlobalDiscount(self, invoice_id, DatiGeneraliDocumento):
discount = 0.0
- if DatiGeneraliDocumento.ScontoMaggiorazione:
- invoice = self.pool['account.invoice'].browse(
- cr, uid, invoice_id, context=context)
- invoice.button_compute(context=context, set_total=True)
+ if (
+ DatiGeneraliDocumento.ScontoMaggiorazione and
+ self.e_invoice_detail_level == '2'
+ ):
+ invoice = self.env['account.invoice'].browse(invoice_id)
for DiscRise in DatiGeneraliDocumento.ScontoMaggiorazione:
if DiscRise.Percentuale:
amount = (
@@ -525,8 +543,7 @@ def _addGlobalDiscount(
discount -= float(DiscRise.Importo)
elif DiscRise.Tipo == 'MG':
discount += float(DiscRise.Importo)
- journal = self.get_purchase_journal(
- cr, uid, invoice.company_id, context=context)
+ journal = self.get_purchase_journal(invoice.company_id)
credit_account_id = journal.default_credit_account_id.id
line_vals = {
'invoice_id': invoice_id,
@@ -536,29 +553,59 @@ def _addGlobalDiscount(
'price_unit': discount,
'quantity': 1,
}
- self.pool['account.invoice.line'].create(
- cr, uid, line_vals, context=context)
+ if self.env.user.company_id.sconto_maggiorazione_product_id:
+ sconto_maggiorazione_product = (
+ self.env.user.company_id.sconto_maggiorazione_product_id)
+ line_vals['product_id'] = sconto_maggiorazione_product.id
+ line_vals['name'] = sconto_maggiorazione_product.name
+ self.adjust_accounting_data(
+ sconto_maggiorazione_product, line_vals
+ )
+ self.env['account.invoice.line'].create(line_vals)
return True
- def _createPayamentsLine(
- self, cr, uid, payment_id, line, partner_id,
- context=None
- ):
- PaymentModel = self.pool['fatturapa.payment.detail']
- PaymentMethodModel = self.pool['fatturapa.payment_method']
+ def add_dati_bollo(self, invoice, DatiGeneraliDocumento):
+ # 2.1.1.6
+ Stamps = DatiGeneraliDocumento.DatiBollo
+ if Stamps:
+ invoice.virtual_stamp = Stamps.BolloVirtuale
+ invoice.stamp_amount = float(Stamps.ImportoBollo)
+ if self.e_invoice_detail_level == '2':
+ journal = self.get_purchase_journal(invoice.company_id)
+ credit_account_id = journal.default_credit_account_id.id
+ line_vals = {
+ 'invoice_id': invoice.id,
+ 'name': _(
+ "Bollo assolto ai sensi del decreto MEF 17 giugno "
+ "2014 (art. 6)"
+ ),
+ 'account_id': credit_account_id,
+ 'price_unit': invoice.stamp_amount,
+ 'quantity': 1,
+ }
+ if self.env.user.company_id.dati_bollo_product_id:
+ dati_bollo_product = (
+ self.env.user.company_id.dati_bollo_product_id)
+ line_vals['product_id'] = dati_bollo_product.id
+ line_vals['name'] = dati_bollo_product.name
+ self.adjust_accounting_data(
+ dati_bollo_product, line_vals
+ )
+ self.env['account.invoice.line'].create(line_vals)
+
+ def _createPayamentsLine(self, payment_id, line, partner_id):
+ PaymentModel = self.env['fatturapa.payment.detail']
+ PaymentMethodModel = self.env['fatturapa.payment_method']
details = line.DettaglioPagamento or False
if details:
for dline in details:
- BankModel = self.pool['res.bank']
- PartnerBankModel = self.pool['res.partner.bank']
- method_id = PaymentMethodModel.search(
- cr, uid,
- [('code', '=', dline.ModalitaPagamento)],
- context=context
+ BankModel = self.env['res.bank']
+ PartnerBankModel = self.env['res.partner.bank']
+ method = PaymentMethodModel.search(
+ [('code', '=', dline.ModalitaPagamento)]
)
- if not method_id:
- raise orm.except_orm(
- _('Error!'),
+ if not method:
+ raise UserError(
_(
'ModalitaPagamento %s not defined in your system'
% dline.ModalitaPagamento
@@ -566,7 +613,7 @@ def _createPayamentsLine(
)
val = {
'recipient': dline.Beneficiario,
- 'fatturapa_pm_id': method_id[0],
+ 'fatturapa_pm_id': method[0].id,
'payment_term_start':
dline.DataRiferimentoTerminiPagamento or False,
'payment_days':
@@ -611,45 +658,36 @@ def _createPayamentsLine(
bankid = False
payment_bank_id = False
if dline.BIC:
- bankids = BankModel.search(
- cr, uid,
- [('bic', '=', dline.BIC.strip())], context=context
+ banks = BankModel.search(
+ [('bic', '=', dline.BIC.strip())]
)
- if not bankids:
+ if not banks:
if not dline.IstitutoFinanziario:
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
+ self.log_inconsistency(
_("Name of Bank with BIC \"%s\" is not set."
" Can't create bank") % dline.BIC
)
else:
bankid = BankModel.create(
- cr, uid,
{
'name': dline.IstitutoFinanziario,
'bic': dline.BIC,
- },
- context=context
- )
+ }
+ ).id
else:
- bankid = bankids[0]
+ bankid = banks[0].id
if dline.IBAN:
SearchDom = [
- ('state', '=', 'iban'),
(
'acc_number', '=',
- base_iban._pretty_iban(dline.IBAN.strip())
+ pretty_iban(dline.IBAN.strip())
),
('partner_id', '=', partner_id),
]
payment_bank_id = False
- payment_bank_ids = PartnerBankModel.search(
- cr, uid, SearchDom, context=context)
- if not payment_bank_ids and not bankid:
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
+ payment_banks = PartnerBankModel.search(SearchDom)
+ if not payment_banks and not bankid:
+ self.log_inconsistency(
_(
'BIC is required and not exist in Xml\n'
'Curr bank data is: \n'
@@ -661,93 +699,139 @@ def _createPayamentsLine(
dline.IstitutoFinanziario or ''
)
)
-
- elif not payment_bank_ids and bankid:
+ elif not payment_banks and bankid:
payment_bank_id = PartnerBankModel.create(
- cr, uid,
{
- 'state': 'iban',
'acc_number': dline.IBAN.strip(),
'partner_id': partner_id,
- 'bank': bankid,
+ 'bank_id': bankid,
'bank_name': dline.IstitutoFinanziario,
'bank_bic': dline.BIC
- },
- context=context
- )
- if payment_bank_ids:
- payment_bank_id = payment_bank_ids[0]
+ }
+ ).id
+ if payment_banks:
+ payment_bank_id = payment_banks[0].id
if payment_bank_id:
val['payment_bank'] = payment_bank_id
- PaymentModel.create(cr, uid, val, context=context)
+ PaymentModel.create(val)
return True
- def get_purchase_journal(self, cr, uid, company, context=None):
- journal_model = self.pool['account.journal']
- journal_ids = journal_model.search(
- cr, uid,
+ # TODO sul partner?
+ def set_StabileOrganizzazione(self, CedentePrestatore, invoice):
+ if CedentePrestatore.StabileOrganizzazione:
+ invoice.efatt_stabile_organizzazione_indirizzo = (
+ CedentePrestatore.StabileOrganizzazione.Indirizzo)
+ invoice.efatt_stabile_organizzazione_civico = (
+ CedentePrestatore.StabileOrganizzazione.NumeroCivico)
+ invoice.efatt_stabile_organizzazione_cap = (
+ CedentePrestatore.StabileOrganizzazione.CAP)
+ invoice.efatt_stabile_organizzazione_comune = (
+ CedentePrestatore.StabileOrganizzazione.Comune)
+ invoice.efatt_stabile_organizzazione_provincia = (
+ CedentePrestatore.StabileOrganizzazione.Provincia)
+ invoice.efatt_stabile_organizzazione_nazione = (
+ CedentePrestatore.StabileOrganizzazione.Nazione)
+
+ def get_purchase_journal(self, company):
+ journal_model = self.env['account.journal']
+ journals = journal_model.search(
[
('type', '=', 'purchase'),
('company_id', '=', company.id)
],
- limit=1, context=context)
- if not journal_ids:
- raise orm.except_orm(
- _('Error!'),
+ limit=1)
+ if not journals:
+ raise UserError(
_(
'Define a purchase journal '
'for this company: "%s" (id:%d).'
) % (company.name, company.id)
)
- purchase_journal = journal_model.browse(
- cr, uid, journal_ids[0], context=context)
- return purchase_journal
+ return journals[0]
+
+ def create_e_invoice_line(self, line):
+ vals = {
+ 'line_number': int(line.NumeroLinea or 0),
+ 'service_type': line.TipoCessionePrestazione,
+ 'name': line.Descrizione,
+ 'qty': float(line.Quantita or 0),
+ 'uom': line.UnitaMisura,
+ 'period_start_date': line.DataInizioPeriodo,
+ 'period_end_date': line.DataFinePeriodo,
+ 'unit_price': float(line.PrezzoUnitario or 0),
+ 'total_price': float(line.PrezzoTotale or 0),
+ 'tax_amount': float(line.AliquotaIVA or 0),
+ 'wt_amount': line.Ritenuta,
+ 'tax_kind': line.Natura,
+ 'admin_ref': line.RiferimentoAmministrazione,
+ }
+ einvoiceline = self.env['einvoice.line'].create(vals)
+ if line.CodiceArticolo:
+ for caline in line.CodiceArticolo:
+ self.env['fatturapa.article.code'].create(
+ {
+ 'name': caline.CodiceTipo or '',
+ 'code_val': caline.CodiceValore or '',
+ 'e_invoice_line_id': einvoiceline.id
+ }
+ )
+ if line.ScontoMaggiorazione:
+ for DiscRisePriceLine in line.ScontoMaggiorazione:
+ DiscRisePriceVals = self.with_context(
+ drtype='e_invoice_line_id'
+ )._prepareDiscRisePriceLine(
+ einvoiceline.id, DiscRisePriceLine
+ )
+ self.env['discount.rise.price'].create(DiscRisePriceVals)
+ if line.AltriDatiGestionali:
+ for dato in line.AltriDatiGestionali:
+ self.env['einvoice.line.other.data'].create(
+ {
+ 'name': dato.TipoDato,
+ 'text_ref': dato.RiferimentoTesto,
+ 'num_ref': float(dato.RiferimentoNumero or 0),
+ 'date_ref': dato.RiferimentoData,
+ 'e_invoice_line_id': einvoiceline.id
+ }
+ )
+ return einvoiceline
def invoiceCreate(
- self, cr, uid, fatt, fatturapa_attachment, FatturaBody,
- partner_id, context=None
+ self, fatt, fatturapa_attachment, FatturaBody, partner_id
):
- if context is None:
- context = {}
- partner_model = self.pool['res.partner']
- invoice_model = self.pool['account.invoice']
- currency_model = self.pool['res.currency']
- invoice_line_model = self.pool['account.invoice.line']
- ftpa_doctype_poll = self.pool['fatturapa.document_type']
- rel_docs_model = self.pool['fatturapa.related_document_type']
- WelfareFundLineModel = self.pool['welfare.fund.data.line']
- DiscRisePriceModel = self.pool['discount.rise.price']
- SalModel = self.pool['faturapa.activity.progress']
- DdTModel = self.pool['fatturapa.related_ddt']
- PaymentDataModel = self.pool['fatturapa.payment.data']
- PaymentTermsModel = self.pool['fatturapa.payment_term']
- SummaryDatasModel = self.pool['faturapa.summary.data']
+ partner_model = self.env['res.partner']
+ invoice_model = self.env['account.invoice']
+ currency_model = self.env['res.currency']
+ invoice_line_model = self.env['account.invoice.line']
+ ftpa_doctype_model = self.env['fiscal.document.type']
+ rel_docs_model = self.env['fatturapa.related_document_type']
+ WelfareFundLineModel = self.env['welfare.fund.data.line']
+ SalModel = self.env['faturapa.activity.progress']
+ DdTModel = self.env['fatturapa.related_ddt']
+ PaymentDataModel = self.env['fatturapa.payment.data']
+ PaymentTermsModel = self.env['fatturapa.payment_term']
+ SummaryDatasModel = self.env['faturapa.summary.data']
- company = self.pool['res.users'].browse(
- cr, uid, uid, context=context).company_id
- partner = partner_model.browse(cr, uid, partner_id, context=context)
- pay_acc_id = partner.property_account_payable.id
+ company = self.env.user.company_id
+ partner = partner_model.browse(partner_id)
+ pay_acc_id = partner.property_account_payable_id.id
# currency 2.1.1.2
- currency_id = currency_model.search(
- cr, uid,
+ currency = currency_model.search(
[
(
'name', '=',
FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa
)
- ],
- context=context)
- if not currency_id:
- raise orm.except_orm(
- _('Error!'),
+ ])
+ if not currency:
+ raise UserError(
_(
'No currency found with code %s'
% FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa
)
)
- purchase_journal = self.get_purchase_journal(
- cr, uid, company, context=context)
+ purchase_journal = self.get_purchase_journal(company)
credit_account_id = purchase_journal.default_credit_account_id.id
invoice_lines = []
comment = ''
@@ -756,179 +840,197 @@ def invoiceCreate(
invtype = 'in_invoice'
docType = FatturaBody.DatiGenerali.DatiGeneraliDocumento.TipoDocumento
if docType:
- docType_ids = ftpa_doctype_poll.search(
- cr, uid,
+ docType_record = ftpa_doctype_model.search(
[
('code', '=', docType)
- ],
- context=context
+ ]
)
- if docType_ids:
- docType_id = docType_ids[0]
+ if docType_record:
+ docType_id = docType_record[0].id
else:
- raise orm.except_orm(
- _("Error"),
+ raise UserError(
_("tipoDocumento %s not handled")
% docType)
- if docType == 'TD04' or docType == 'TD05':
+ if docType == 'TD04':
invtype = 'in_refund'
# 2.1.1.11
causLst = FatturaBody.DatiGenerali.DatiGeneraliDocumento.Causale
if causLst:
for item in causLst:
comment += item + '\n'
- # 2.2.1
- CodeArts = self.pool['fatturapa.article.code']
- for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
- invoice_line_data = self._prepareInvoiceLine(
- cr, uid, credit_account_id, line, context=context)
- invoice_line_id = invoice_line_model.create(
- cr, uid, invoice_line_data, context=context)
-
- if line.CodiceArticolo:
- for caline in line.CodiceArticolo:
- CodeArts.create(
- cr, uid,
- {
- 'name': caline.CodiceTipo or '',
- 'code_val': caline.CodiceValore or '',
- 'invoice_line_id': invoice_line_id
- },
- context=context
- )
- if line.ScontoMaggiorazione:
- context['drtype'] = 'invoice_line_id'
- for DiscRisePriceLine in line.ScontoMaggiorazione:
- DiscRisePriceVals = self._prepareDiscRisePriceLine(
- cr, uid, invoice_line_id, DiscRisePriceLine,
- context=context
- )
- DiscRisePriceModel.create(
- cr, uid, DiscRisePriceVals, context=context)
- invoice_lines.append(invoice_line_id)
invoice_data = {
- 'doc_type': docType_id,
+ 'fiscal_document_type_id': docType_id,
'date_invoice':
FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data,
- 'supplier_invoice_number':
+ 'reference':
FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
'account_id': pay_acc_id,
'type': invtype,
'partner_id': partner_id,
- 'currency_id': currency_id[0],
+ 'currency_id': currency[0].id,
'journal_id': purchase_journal.id,
- 'invoice_line': [(6, 0, invoice_lines)],
# 'origin': xmlData.datiOrdineAcquisto,
- 'fiscal_position': False,
- 'payment_term': False,
+ 'fiscal_position_id': False,
+ 'payment_term_id': False,
'company_id': company.id,
'fatturapa_attachment_in_id': fatturapa_attachment.id,
'comment': comment
}
+
+ # 2.1.1.10
+ if FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento:
+ invoice_data['efatt_rounding'] = float(
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento
+ )
+ # 2.1.1.12
+ if FatturaBody.DatiGenerali.DatiGeneraliDocumento.Art73:
+ invoice_data['art73'] = True
+
# 2.1.1.5
Withholding = FatturaBody.DatiGenerali.\
DatiGeneraliDocumento.DatiRitenuta
+ wt_found = None
if Withholding:
- invoice_data['withholding_amount'] = Withholding.ImportoRitenuta
+ wts = self.env['withholding.tax'].search([
+ ('causale_pagamento_id.code', '=',
+ Withholding.CausalePagamento)
+ ])
+ if not wts:
+ raise UserError(_(
+ "Supplier invoice contains withholding tax with "
+ "CausalePagamento %s, "
+ "but such a tax is not found in your system. Please "
+ "set it"
+ ) % Withholding.CausalePagamento)
+ wt_found = False
+ for wt in wts:
+ if wt.tax == float(Withholding.AliquotaRitenuta):
+ wt_found = wt
+ break
+ if not wt_found:
+ raise UserError(_(
+ "No withholding tax found with Causale %s and rate %s"
+ ) % (
+ Withholding.CausalePagamento, Withholding.AliquotaRitenuta
+ ))
invoice_data['ftpa_withholding_type'] = Withholding.TipoRitenuta
- invoice_data['ftpa_withholding_rate'] = float(
- Withholding.AliquotaRitenuta)/100
- invoice_data['ftpa_withholding_payment_reason'] = Withholding.\
- CausalePagamento
- # 2.1.1.6
- Stamps = FatturaBody.DatiGenerali.\
- DatiGeneraliDocumento.DatiBollo
- if Stamps:
- invoice_data['virtual_stamp'] = Stamps.BolloVirtuale
- invoice_data['stamp_amount'] = float(Stamps.ImportoBollo)
- invoice_id = invoice_model.create(
- cr, uid, invoice_data, context=context)
+ # 2.2.1
+ e_invoice_line_ids = []
+ for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
+ if self.e_invoice_detail_level == '2':
+ invoice_line_data = self._prepareInvoiceLine(
+ credit_account_id, line, wt_found)
+ product = self.get_line_product(line, partner)
+ if product:
+ invoice_line_data['product_id'] = product.id
+ self.adjust_accounting_data(product, invoice_line_data)
+ invoice_line_id = invoice_line_model.create(
+ invoice_line_data).id
+ invoice_lines.append(invoice_line_id)
+ einvoiceline = self.create_e_invoice_line(line)
+ e_invoice_line_ids.append(einvoiceline.id)
+ invoice_data['invoice_line_ids'] = [(6, 0, invoice_lines)]
+ invoice_data['e_invoice_line_ids'] = [(6, 0, e_invoice_line_ids)]
+ invoice = invoice_model.create(invoice_data)
+ invoice._onchange_invoice_line_wt_ids()
+ invoice.write(invoice._convert_to_write(invoice._cache))
+ invoice_id = invoice.id
+
+ self.add_dati_bollo(
+ invoice, FatturaBody.DatiGenerali.DatiGeneraliDocumento)
- invoice = invoice_model.browse(cr, uid, invoice_id, context=context)
# 2.1.1.7
Walfares = FatturaBody.DatiGenerali.\
DatiGeneraliDocumento.DatiCassaPrevidenziale
- if Walfares:
+ if Walfares and self.e_invoice_detail_level == '2':
for walfareLine in Walfares:
WalferLineVals = self._prepareWelfareLine(
- cr, uid, invoice_id, walfareLine, context=context)
- WelfareFundLineModel.create(
- cr, uid, WalferLineVals, context=context)
- # 2.1.1.8
- DiscountRises = FatturaBody.DatiGenerali.\
- DatiGeneraliDocumento.ScontoMaggiorazione
- if DiscountRises:
- context['drtype'] = 'invoice_id'
- for DiscRisePriceLine in DiscountRises:
- DiscRisePriceVals = self._prepareDiscRisePriceLine(
- cr, uid, invoice_id, DiscRisePriceLine, context=context)
- DiscRisePriceModel.create(
- cr, uid, DiscRisePriceVals, context=context)
+ invoice_id, walfareLine)
+ WelfareFundLineModel.create(WalferLineVals)
+ line_vals = self._prepare_generic_line_data(walfareLine)
+ line_vals.update({
+ 'name': _(
+ "Cassa Previdenziale: %s") % walfareLine.TipoCassa,
+ 'price_unit': float(walfareLine.ImportoContributoCassa),
+ 'invoice_id': invoice.id,
+ 'account_id': credit_account_id,
+ })
+ if walfareLine.Ritenuta:
+ if not wt_found:
+ raise UserError(_(
+ "CassaPrevidenziale %s has Ritenuta but no "
+ "withholding tax was found in the system"
+ % walfareLine.TipoCassa))
+ line_vals['invoice_line_tax_wt_ids'] = [
+ (6, 0, [wt_found.id])]
+ if self.env.user.company_id.cassa_previdenziale_product_id:
+ cassa_previdenziale_product = (
+ self.env.user.company_id.
+ cassa_previdenziale_product_id
+ )
+ line_vals['product_id'] = cassa_previdenziale_product.id
+ line_vals['name'] = cassa_previdenziale_product.name
+ self.adjust_accounting_data(
+ cassa_previdenziale_product, line_vals
+ )
+ self.env['account.invoice.line'].create(line_vals)
# 2.1.2
relOrders = FatturaBody.DatiGenerali.DatiOrdineAcquisto
if relOrders:
for order in relOrders:
doc_datas = self._prepareRelDocsLine(
- cr, uid, invoice_id, order, 'order', context=context)
+ invoice_id, order, 'order')
if doc_datas:
for doc_data in doc_datas:
- rel_docs_model.create(
- cr, uid, doc_data, context=context)
+ rel_docs_model.create(doc_data)
# 2.1.3
relContracts = FatturaBody.DatiGenerali.DatiContratto
if relContracts:
for contract in relContracts:
doc_datas = self._prepareRelDocsLine(
- cr, uid, invoice_id, contract, 'contract', context=context)
+ invoice_id, contract, 'contract')
if doc_datas:
for doc_data in doc_datas:
- rel_docs_model.create(
- cr, uid, doc_data, context=context)
+ rel_docs_model.create(doc_data)
# 2.1.4
relAgreements = FatturaBody.DatiGenerali.DatiConvenzione
if relAgreements:
for agreement in relAgreements:
doc_datas = self._prepareRelDocsLine(
- cr, uid, invoice_id, agreement,
- 'agreement', context=context)
+ invoice_id, agreement, 'agreement')
if doc_datas:
for doc_data in doc_datas:
- rel_docs_model.create(
- cr, uid, doc_data, context=context)
+ rel_docs_model.create(doc_data)
# 2.1.5
relReceptions = FatturaBody.DatiGenerali.DatiRicezione
if relReceptions:
for reception in relReceptions:
doc_datas = self._prepareRelDocsLine(
- cr, uid, invoice_id, reception,
- 'reception', context=context)
+ invoice_id, reception, 'reception')
if doc_datas:
for doc_data in doc_datas:
- rel_docs_model.create(
- cr, uid, doc_data, context=context)
+ rel_docs_model.create(doc_data)
# 2.1.6
RelInvoices = FatturaBody.DatiGenerali.DatiFattureCollegate
if RelInvoices:
for invoice in RelInvoices:
doc_datas = self._prepareRelDocsLine(
- cr, uid, invoice_id, invoice, 'invoice', context=context)
+ invoice_id, invoice, 'invoice')
if doc_datas:
for doc_data in doc_datas:
- rel_docs_model.create(
- cr, uid, doc_data, context=context)
+ rel_docs_model.create(doc_data)
# 2.1.7
SalDatas = FatturaBody.DatiGenerali.DatiSAL
if SalDatas:
for SalDataLine in SalDatas:
SalModel.create(
- cr, uid,
{
'fatturapa_activity_progress': (
SalDataLine.RiferimentoFase or 0),
'invoice_id': invoice_id
- }, context=context
+ }
)
# 2.1.8
DdtDatas = FatturaBody.DatiGenerali.DatiDDT
@@ -936,38 +1038,34 @@ def invoiceCreate(
for DdtDataLine in DdtDatas:
if not DdtDataLine.RiferimentoNumeroLinea:
DdTModel.create(
- cr, uid,
{
'name': DdtDataLine.NumeroDDT or '',
'date': DdtDataLine.DataDDT or False,
'invoice_id': invoice_id
- }, context=context
+ }
)
else:
for numline in DdtDataLine.RiferimentoNumeroLinea:
- invoice_line_ids = invoice_line_model.search(
- cr, uid,
+ invoice_lines = invoice_line_model.search(
[
('invoice_id', '=', invoice_id),
('sequence', '=', int(numline)),
- ], context=context)
+ ])
invoice_lineid = False
- if invoice_line_ids:
- invoice_lineid = invoice_line_ids[0]
+ if invoice_lines:
+ invoice_lineid = invoice_lines[0].id
DdTModel.create(
- cr, uid,
{
'name': DdtDataLine.NumeroDDT or '',
'date': DdtDataLine.DataDDT or False,
'invoice_id': invoice_id,
'invoice_line_id': invoice_lineid
- }, context=context
+ }
)
# 2.1.9
Delivery = FatturaBody.DatiGenerali.DatiTrasporto
if Delivery:
- delivery_id = self.getCarrirerPartner(
- cr, uid, Delivery, context=context)
+ delivery_id = self.getCarrirerPartner(Delivery)
delivery_dict = {
'carrier_id': delivery_id,
'transport_vehicle': Delivery.MezzoTrasporto or '',
@@ -981,6 +1079,7 @@ def invoiceCreate(
'transport_date': Delivery.DataInizioTrasporto or False,
'delivery_datetime': Delivery.DataOraConsegna or False,
'delivery_address': '',
+ 'ftpa_incoterms': Delivery.TipoResa,
}
if Delivery.IndirizzoResa:
@@ -994,16 +1093,7 @@ def invoiceCreate(
Delivery.IndirizzoResa.Nazione or ''
)
)
- if Delivery.TipoResa:
- StockModel = self.pool['stock.incoterms']
- stock_incoterm_id = StockModel.search(
- cr, uid, [('code', '=', Delivery.TipoResa)],
- context=context
- )
- if stock_incoterm_id:
- delivery_dict['incoterm'] = stock_incoterm_id[0]
- invoice_model.write(
- cr, uid, invoice_id, delivery_dict, context=context)
+ invoice.write(delivery_dict)
# 2.2.2
Summary_datas = FatturaBody.DatiBeniServizi.DatiRiepilogo
if Summary_datas:
@@ -1011,7 +1101,7 @@ def invoiceCreate(
summary_line = {
'tax_rate': summary.AliquotaIVA or 0.0,
'non_taxable_nature': summary.Natura or False,
- 'incidental charges': summary.SpeseAccessorie or 0.0,
+ 'incidental_charges': summary.SpeseAccessorie or 0.0,
'rounding': summary.Arrotondamento or 0.0,
'amount_untaxed': summary.ImponibileImporto or 0.0,
'amount_tax': summary.Imposta or 0.0,
@@ -1019,8 +1109,7 @@ def invoiceCreate(
'law_reference': summary.RiferimentoNormativo or '',
'invoice_id': invoice_id,
}
- SummaryDatasModel.create(
- cr, uid, summary_line, context=context)
+ SummaryDatasModel.create(summary_line)
# 2.1.10
ParentInvoice = FatturaBody.DatiGenerali.FatturaPrincipale
@@ -1031,8 +1120,7 @@ def invoiceCreate(
'related_invoice_date':
ParentInvoice.DataFatturaPrincipale or False
}
- invoice_model.write(
- cr, uid, invoice_id, parentinv_vals, context=context)
+ invoice.write(parentinv_vals)
# 2.3
Vehicle = FatturaBody.DatiVeicoli
if Vehicle:
@@ -1040,52 +1128,40 @@ def invoiceCreate(
'vehicle_registration': Vehicle.Data or False,
'total_travel': Vehicle.TotalePercorso or '',
}
- invoice_model.write(
- cr, uid, invoice_id, veicle_vals, context=context)
+ invoice.write(veicle_vals)
# 2.4
PaymentsData = FatturaBody.DatiPagamento
if PaymentsData:
for PaymentLine in PaymentsData:
cond = PaymentLine.CondizioniPagamento or False
if not cond:
- raise orm.except_orm(
- _('Error!'),
+ raise UserError(
_('Payment method Code not found in document')
)
- term_id = False
- term_ids = PaymentTermsModel.search(
- cr, uid, [('code', '=', cond)], context=context)
- if not term_ids:
- raise orm.except_orm(
- _('Error!'),
+ terms = PaymentTermsModel.search([('code', '=', cond)])
+ if not terms:
+ raise UserError(
_('Payment method Code %s is incorrect') % cond
)
else:
- term_id = term_ids[0]
+ term_id = terms[0].id
PayDataId = PaymentDataModel.create(
- cr, uid,
{
'payment_terms': term_id,
'invoice_id': invoice_id
- },
- context=context
- )
- self._createPayamentsLine(
- cr, uid, PayDataId, PaymentLine, partner_id,
- context=context
- )
+ }
+ ).id
+ self._createPayamentsLine(PayDataId, PaymentLine, partner_id)
# 2.5
AttachmentsData = FatturaBody.Allegati
if AttachmentsData:
- AttachModel = self.pool['fatturapa.attachments']
+ AttachModel = self.env['fatturapa.attachments']
for attach in AttachmentsData:
if not attach.NomeAttachment:
- raise orm.except_orm(
- _('Error!'),
- _('Attachment Name is Required')
- )
+ name = _("Attachment without name")
+ else:
+ name = attach.NomeAttachment
content = attach.Attachment
- name = attach.NomeAttachment
_attach_dict = {
'name': name,
'datas': base64.b64encode(str(content)),
@@ -1095,50 +1171,22 @@ def invoiceCreate(
'format': attach.FormatoAttachment or '',
'invoice_id': invoice_id,
}
- AttachModel.create(
- cr, uid, _attach_dict, context=context)
+ AttachModel.create(_attach_dict)
self._addGlobalDiscount(
- cr, uid, invoice_id,
- FatturaBody.DatiGenerali.DatiGeneraliDocumento, context=context)
+ invoice_id, FatturaBody.DatiGenerali.DatiGeneraliDocumento)
# compute the invoice
- invoice_model.button_compute(
- cr, uid, [invoice_id], context=context,
- set_total=True)
+ invoice.compute_taxes()
return invoice_id
- def check_CessionarioCommittente(
- self, cr, uid, company, FatturaElettronicaHeader, context=None
- ):
- if (
- company.partner_id.ipa_code !=
- FatturaElettronicaHeader.DatiTrasmissione.CodiceDestinatario
- ):
- raise orm.except_orm(
- _('Error'),
- _('XML IPA code (%s) different from company IPA code (%s)')
- % (
- FatturaElettronicaHeader.DatiTrasmissione.
- CodiceDestinatario, company.partner_id.ipa_code))
-
- def compute_xml_amount_untaxed(self, cr, uid, DatiRiepilogo, context=None):
+ def compute_xml_amount_untaxed(self, DatiRiepilogo):
amount_untaxed = 0.0
for Riepilogo in DatiRiepilogo:
amount_untaxed += float(Riepilogo.ImponibileImporto)
return amount_untaxed
- def check_invoice_amount(
- self, cr, uid, invoice, FatturaElettronicaBody, context=None
- ):
- if context is None:
- context = {}
-
- invoice.write(
- {
- 'check_total': FatturaElettronicaBody.DatiGenerali.
- DatiGeneraliDocumento.ImportoTotaleDocumento
- }, context=context)
+ def check_invoice_amount(self, invoice, FatturaElettronicaBody):
if (
FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
ScontoMaggiorazione and
@@ -1151,10 +1199,10 @@ def check_invoice_amount(
ImportoTotaleDocumento = float(
FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
ImportoTotaleDocumento)
- if invoice.amount_total != ImportoTotaleDocumento:
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
+ if not float_is_zero(
+ invoice.amount_total-ImportoTotaleDocumento, precision_digits=2
+ ):
+ self.log_inconsistency(
_('Invoice total %s is different from '
'ImportoTotaleDocumento %s')
% (invoice.amount_total, ImportoTotaleDocumento)
@@ -1162,212 +1210,98 @@ def check_invoice_amount(
else:
# else, we can only check DatiRiepilogo if
# DatiGeneraliDocumento.ScontoMaggiorazione is not present,
- # because otherwise DatiRiepilogo and openerp invoice total would
+ # because otherwise DatiRiepilogo and odoo invoice total would
# differ
amount_untaxed = self.compute_xml_amount_untaxed(
- cr, uid,
- FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo,
- context=context)
- if invoice.amount_untaxed != amount_untaxed:
- if context.get('inconsistencies'):
- context['inconsistencies'] += '\n'
- context['inconsistencies'] += (
+ FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo)
+ if not float_is_zero(
+ invoice.amount_untaxed-amount_untaxed, precision_digits=2
+ ):
+ self.log_inconsistency(
_('Computed amount untaxed %s is different from'
' DatiRiepilogo %s')
% (invoice.amount_untaxed, amount_untaxed)
)
- def strip_xml_content(self, xml):
- root = etree.XML(xml)
- for elem in root.iter('*'):
- if elem.text is not None:
- elem.text = elem.text.strip()
- return etree.tostring(root)
-
- def remove_xades_sign(self, xml):
- root = etree.XML(xml)
- for elem in root.iter('*'):
- if elem.tag.find('Signature') > -1:
- elem.getparent().remove(elem)
- break
- return etree.tostring(root)
+ def get_invoice_obj(self, fatturapa_attachment):
+ xml_string = fatturapa_attachment.get_xml_string()
+ return fatturapa_v_1_2.CreateFromDocument(xml_string)
- def check_file_is_pem(self, p7m_file):
- file_is_pem = True
- strcmd = (
- 'openssl asn1parse -inform PEM -in %s'
- ) % (p7m_file)
- cmd = shlex.split(strcmd)
- try:
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- stdoutdata, stderrdata = proc.communicate()
- if proc.wait() != 0:
- file_is_pem = False
- except Exception as e:
- raise orm.except_orm(
- _('Errore'),
- _(
- 'Check PEM file %s'
- ) % e.args
- )
- return file_is_pem
-
- def parse_pem_2_der(self, pem_file, tmp_der_file):
- strcmd = (
- 'openssl asn1parse -in %s -out %s'
- ) % (pem_file, tmp_der_file)
- cmd = shlex.split(strcmd)
- try:
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- stdoutdata, stderrdata = proc.communicate()
- if proc.wait() != 0:
- _logger.warning(stdoutdata)
- raise Exception(stderrdata)
- except Exception as e:
- raise orm.except_orm(
- _('Errore'),
- _(
- 'Parsing PEM to DER file %s'
- ) % e.args
- )
- if not os.path.isfile(tmp_der_file):
- raise orm.except_orm(
- _('Errore'),
- _(
- 'ASN.1 structure is not parsable in DER'
- )
- )
- return tmp_der_file
-
- def decrypt_to_xml(self, signed_file, xml_file):
- strcmd = (
- 'openssl smime -decrypt -verify -inform'
- ' DER -in %s -noverify -out %s'
- ) % (signed_file, xml_file)
- cmd = shlex.split(strcmd)
- try:
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- stdoutdata, stderrdata = proc.communicate()
- if proc.wait() != 0:
- _logger.warning(stdoutdata)
- raise Exception(stderrdata)
- except Exception as e:
- raise orm.except_orm(
- _('Errore'),
- _(
- 'Signed Xml file %s'
- ) % e.args
- )
- if not os.path.isfile(xml_file):
- raise orm.except_orm(
- _('Errore'),
- _(
- 'Signed Xml file not decryptable'
- )
- )
- return xml_file
-
- def importFatturaPA(self, cr, uid, ids, context=None):
- if not context:
- context = {}
- context['inconsistencies'] = ''
- fatturapa_attachment_obj = self.pool['fatturapa.attachment.in']
- fatturapa_attachment_ids = context.get('active_ids', False)
- invoice_model = self.pool['account.invoice']
+ @api.multi
+ def importFatturaPA(self):
+ fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
+ fatturapa_attachment_ids = self.env.context.get('active_ids', False)
+ invoice_model = self.env['account.invoice']
new_invoices = []
for fatturapa_attachment_id in fatturapa_attachment_ids:
- ctx = context.copy()
+ self.__dict__.update(
+ self.with_context(inconsistencies='').__dict__
+ )
fatturapa_attachment = fatturapa_attachment_obj.browse(
- cr, uid, fatturapa_attachment_id, context=ctx)
+ fatturapa_attachment_id)
if fatturapa_attachment.in_invoice_ids:
- raise orm.except_orm(
- _("Error"), _("File is linked to invoices yet"))
- # decrypt p7m file
- if fatturapa_attachment.datas_fname.lower().endswith('.p7m'):
- temp_file_name = (
- '/tmp/%s' % fatturapa_attachment.datas_fname.lower())
- temp_der_file_name = (
- '/tmp/%s_tmp' % fatturapa_attachment.datas_fname.lower())
- with open(temp_file_name, 'w') as p7m_file:
- p7m_file.write(fatturapa_attachment.datas.decode('base64'))
- xml_file_name = os.path.splitext(temp_file_name)[0]
-
- # check if temp_file_name is a PEM file
- file_is_pem = self.check_file_is_pem(temp_file_name)
-
- # if temp_file_name is a PEM file
- # parse it in a DER file
- if file_is_pem:
- temp_file_name = self.parse_pem_2_der(
- temp_file_name, temp_der_file_name)
-
- # decrypt signed DER file in XML readable
- xml_file_name = self.decrypt_to_xml(
- temp_file_name, xml_file_name)
-
- with open(xml_file_name, 'r') as fatt_file:
- file_content = fatt_file.read()
- xml_string = file_content
- elif fatturapa_attachment.datas_fname.lower().endswith('.xml'):
- xml_string = fatturapa_attachment.datas.decode('base64')
- xml_string = self.remove_xades_sign(xml_string)
- xml_string = self.strip_xml_content(xml_string)
- fatt = fatturapa_v_1_1.CreateFromDocument(xml_string)
+ raise UserError(
+ _("File is linked to invoices yet"))
+ fatt = self.get_invoice_obj(fatturapa_attachment)
cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
# 1.2
- partner_id = self.getCedPrest(
- cr, uid, cedentePrestatore, context=ctx)
+ partner_id = self.getCedPrest(cedentePrestatore)
# 1.3
TaxRappresentative = fatt.FatturaElettronicaHeader.\
RappresentanteFiscale
# 1.5
Intermediary = fatt.FatturaElettronicaHeader.\
TerzoIntermediarioOSoggettoEmittente
+
+ generic_inconsistencies = ''
+ if self.env.context.get('inconsistencies'):
+ generic_inconsistencies = (
+ self.env.context['inconsistencies'] + '\n\n')
+
# 2
for fattura in fatt.FatturaElettronicaBody:
+
+ # reset inconsistencies
+ self.__dict__.update(
+ self.with_context(inconsistencies='').__dict__
+ )
+
invoice_id = self.invoiceCreate(
- cr, uid, fatt, fatturapa_attachment, fattura,
- partner_id, context=ctx)
+ fatt, fatturapa_attachment, fattura, partner_id)
+ invoice = invoice_model.browse(invoice_id)
+ self.set_StabileOrganizzazione(cedentePrestatore, invoice)
if TaxRappresentative:
tax_partner_id = self.getPartnerBase(
- cr, uid, TaxRappresentative.DatiAnagrafici,
- context=ctx)
- invoice_model.write(
- cr, uid, invoice_id,
+ TaxRappresentative.DatiAnagrafici)
+ invoice.write(
{
'tax_representative_id': tax_partner_id
- }, context=ctx
+ }
)
if Intermediary:
Intermediary_id = self.getPartnerBase(
- cr, uid, Intermediary.DatiAnagrafici, context=ctx)
- invoice_model.write(
- cr, uid, invoice_id,
+ Intermediary.DatiAnagrafici)
+ invoice.write(
{
'intermediary': Intermediary_id
- }, context=ctx
+ }
)
new_invoices.append(invoice_id)
- invoice = invoice_model.browse(cr, uid, invoice_id, ctx)
- self.check_CessionarioCommittente(
- cr, uid, invoice.company_id, fatt.FatturaElettronicaHeader,
- context=ctx)
- self.check_invoice_amount(
- cr, uid, invoice,
- fattura,
- context=ctx)
+ self.check_invoice_amount(invoice, fattura)
- if ctx.get('inconsistencies'):
- invoice.write(
- {'inconsistencies': ctx['inconsistencies']},
- context=ctx)
+ if self.env.context.get('inconsistencies'):
+ invoice_inconsistencies = (
+ self.env.context['inconsistencies'])
+ else:
+ invoice_inconsistencies = ''
+ invoice.inconsistencies = (
+ generic_inconsistencies + invoice_inconsistencies)
return {
'view_type': 'form',
- 'name': "PA Supplier Invoices",
+ 'name': "Supplier Electronic Invoices",
'view_mode': 'tree,form',
'res_model': 'account.invoice',
'type': 'ir.actions.act_window',
'domain': [('id', 'in', new_invoices)],
- 'context': context
}
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
index ad207b533b44..37b90b8c86da 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
@@ -1,27 +1,24 @@
-
+
- Import FatturaPA
+ Import Fattura Elettronica
wizard.import.fatturapa
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
+
From 5f16fd9e55e85e26f04f6a4a4d4027343566441f Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Mon, 15 Oct 2018 14:31:29 +0000
Subject: [PATCH 003/155] Translated using Weblate (Italian)
Currently translated at 75.6% (118 of 156 strings)
Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 227 ++++++++++++++++++--------------
1 file changed, 128 insertions(+), 99 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 12c0439947bf..03a060d63d21 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,27 +7,31 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2018-09-27 08:07+0000\n"
-"Last-Translator: <>\n"
+"PO-Revision-Date: 2018-10-18 15:58+0000\n"
+"Last-Translator: Sergio Zanchetta \n"
"Language-Team: \n"
-"Language: \n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.2.1\n"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_amount
+#, fuzzy
msgid "Aliquota IVA"
msgstr "Aliquota IVA"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Altri Dati Gestionali"
-msgstr "Altri Dati Gestionali"
+msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_ids
+#, fuzzy
msgid "Altri dati gestionali"
msgstr "Altri dati gestionali"
@@ -39,13 +43,13 @@ msgstr "Allegato"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_name
msgid "Attachment Name"
-msgstr "Nome Allegato"
+msgstr "Nome allegato"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_local_url
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_website_url
msgid "Attachment URL"
-msgstr "URL Allegato"
+msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1161
@@ -68,13 +72,13 @@ msgid ""
"Bank Name: %s\n"
msgstr ""
"BIC è richiesto e non esiste nell'XML\n"
-"I dati della banca corrente sono: \n"
+"I dati attuali della banca sono: \n"
"IBAN: %s\n"
"Nome banca: %s\n"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:578
-#, python-format
+#, fuzzy, python-format
msgid "Bollo assolto ai sensi del decreto MEF 17 giugno 2014 (art. 6)"
msgstr "Bollo assolto ai sensi del decreto MEF 17 giugno 2014 (art. 6)"
@@ -86,9 +90,9 @@ msgstr "Annulla"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:954
-#, python-format
+#, fuzzy, python-format
msgid "Cassa Previdenziale: %s"
-msgstr "Cassa Previdenziale: %s"
+msgstr "Cassa previdenziale: %s"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:962
@@ -97,8 +101,7 @@ msgid ""
"CassaPrevidenziale %s has Ritenuta but no withholding tax was found in the "
"system"
msgstr ""
-"CassaPrevidenziale %s ha la ritenuta me nessuna ritenuta è stata trovata nel "
-"sistema"
+"La cassa previdenziale %s ha la ritenuta ma non sono presenti nel sistema"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_checksum
@@ -122,8 +125,9 @@ msgstr "Valore codice"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Codice Articoli"
-msgstr "Codice Articoli"
+msgstr "Codice articoli"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_res_company
@@ -175,20 +179,22 @@ msgstr "Creazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_end_date
msgid "Data Fine Periodo"
-msgstr "Data Fine Periodo"
+msgstr "Data fine periodo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_start_date
+#, fuzzy
msgid "Data Inizio Periodo"
-msgstr "Data Inizio Periodo"
+msgstr "Data inizio periodo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_db_datas
msgid "Database Data"
-msgstr "Dati Database"
+msgstr "Dati database"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Dati generali"
msgstr "Dati generali"
@@ -199,8 +205,7 @@ msgid ""
"DatiAnagrafici.Anagrafica.Cognome contains \"%s\". Your System contains \"%s"
"\""
msgstr ""
-"DatiAnagrafici.Anagrafica.Cognome contiene \"%s\". Il tuo database contiene "
-"\"%s\""
+"DatiAnagrafici.Anagrafica.Cognome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:85
@@ -209,8 +214,8 @@ msgid ""
"DatiAnagrafici.Anagrafica.Denominazione contains \"%s\". Your System "
"contains \"%s\""
msgstr ""
-"DatiAnagrafici.Anagrafica.Denominazione contiene \"%s\". Il tuo database "
-"contiene \"%s\""
+"DatiAnagrafici.Anagrafica.Denominazione contiene \"%s\", il sistema contiene "
+"\"%s\""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:93
@@ -218,20 +223,20 @@ msgstr ""
msgid ""
"DatiAnagrafici.Anagrafica.Nome contains \"%s\". Your System contains \"%s\""
msgstr ""
-"DatiAnagrafici.Anagrafica.Nome contiene \"%s\". Il tuo database contiene \"%s"
-"\""
+"DatiAnagrafici.Anagrafica.Nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_partner_e_invoice_default_product_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_default_product_id
+#, fuzzy
msgid "Default product electronic invoice"
-msgstr "Default product electronic invoice"
+msgstr "Fattura elettronica del prodotto predefinito"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:746
#, python-format
msgid "Define a purchase journal for this company: \"%s\" (id:%d)."
-msgstr "Definire un sezionale di acquisto per questa azienda: \"%s\" (id:%d)."
+msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (id:%d)."
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -250,14 +255,16 @@ msgstr "Descrizione"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Dettaglio Linea"
-msgstr "Dettaglio Linea"
+msgstr "Dettaglio Riga"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_e_invoice_line_ids
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Dettaglio Linee"
-msgstr "Dettaglio Linee"
+msgstr "Dettaglio righe"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_discount_rise_price_ids
@@ -272,43 +279,44 @@ msgstr "Dettagli sconto e maggiorazione"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_display_name
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_display_name
msgid "Display Name"
-msgstr "Nome Visualizzato"
+msgstr "Nome visualizzato"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_fatturapa_attachment_in_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_line_fatturapa_attachment_in_id
msgid "E-Invoice Import File"
-msgstr "File fattura elettronica"
+msgstr "File importazione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "E-invoice Inconsistencies"
-msgstr "Inconsistenze fattura elettronica"
+msgstr "Incongruenze e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "E-invoice details"
-msgstr "Dettagli fattura elettronica"
+msgstr "Dettagli e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Fattura PA V1.2 Schema"
msgstr "XML Schema V1.2"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
msgid "FatturaPA Article Code"
-msgstr "Codice articolo fattura elettronica"
+msgstr "Codice articolo fatturaPA"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_discount_rise_price
msgid "FatturaPA Discount Rise Price Data"
-msgstr "Dati sconto maggiorazione"
+msgstr "Dati sconto e maggiorazione fatturaPA"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
msgid "FatturaPA import File"
-msgstr "Fattura Elettronica Importazione File"
+msgstr "File importazione fatturaPA"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:47
@@ -319,17 +327,17 @@ msgstr "Il file %s è già collegato a delle fatture"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_datas
msgid "File Content"
-msgstr "Contenuto del File"
+msgstr "Contenuto file"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_datas_fname
msgid "File Name"
-msgstr "Nome File"
+msgstr "Nome file"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_file_size
msgid "File Size"
-msgstr "Dimensione File"
+msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1244
@@ -341,12 +349,12 @@ msgstr "Il file è già collegato a delle fatture"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
#, python-format
msgid "Global invoice discount from DatiGeneraliDocumento"
-msgstr "Sconto globale da DatiGeneraliDocumento"
+msgstr "Sconto globale fattura da DatiGeneraliDocumento"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
msgid "History"
-msgstr "Storico"
+msgstr "Cronologia"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_id
@@ -367,18 +375,20 @@ msgstr "Importa"
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_import_fatturapa
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
+#, fuzzy
msgid "Import Fattura Elettronica"
msgstr "Import Fattura Elettronica"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_import_fatturapa
+#, fuzzy
msgid "Import FatturaPA"
-msgstr "Importa Fattura Elettronica"
+msgstr "Importa fatturaPA"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_inconsistencies
msgid "Import Inconsistencies"
-msgstr "Inconsistenze"
+msgstr "Incongruenze nell'importazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_in_invoice_ids
@@ -389,7 +399,7 @@ msgstr "Fatture passive"
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_fattura_pa_in
#: model:ir.ui.menu,name:l10n_it_fatturapa_in.menu_fattura_pa_in_tree
msgid "Incoming Fattura Elettronica files"
-msgstr "File in ingresso Fattura Elettronica"
+msgstr "File fattura elettronica in ingresso"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_index_content
@@ -406,7 +416,7 @@ msgstr "Fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
msgid "Invoice Line"
-msgstr "Riga Fattura"
+msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1206
@@ -452,7 +462,7 @@ msgstr "Ultima modifica il"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_write_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_write_uid
msgid "Last Updated by"
-msgstr "Ultima modifica di"
+msgstr "Ultimo aggiornamento di"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_write_date
@@ -462,7 +472,7 @@ msgstr "Ultima modifica di"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_write_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_write_date
msgid "Last Updated on"
-msgstr "Ultima modifica il"
+msgstr "Ultimo aggiornamento il"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:308
@@ -471,8 +481,8 @@ msgid ""
"Line '%s': Too many taxes with percentage equals to \"%s\"\n"
"fix it if required"
msgstr ""
-"Riga '%s': Troppe imposte con aliquota uguale a\"%s\"\n"
-"correggere se necessario"
+"Riga '%s': troppe imposte con aliquota pari a\"%s\"\n"
+"Correggere se necessario"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
@@ -492,6 +502,7 @@ msgstr "Collega a fattura fornitore esistente"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_e_invoice_detail_level
+#, fuzzy
msgid "Livello di dettaglio Fatture elettroniche"
msgstr "Livello di dettaglio Fatture elettroniche"
@@ -529,11 +540,12 @@ msgstr "Massimo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_mimetype
msgid "Mime Type"
-msgstr "Tipo Mime"
+msgstr "Tipo MIME"
#. module: l10n_it_fatturapa_in
#: selection:res.partner,e_invoice_detail_level:0
#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+#, fuzzy
msgid "Minimo"
msgstr "Minimo"
@@ -541,18 +553,17 @@ msgstr "Minimo"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:609
#, python-format
msgid "ModalitaPagamento %s not defined in your system"
-msgstr "Modalita Pagamento %s non definito nel sistema"
+msgstr "ModalitaPagamento %s non definito nel sistema"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:667
#, python-format
msgid "Name of Bank with BIC \"%s\" is not set. Can't create bank"
-msgstr ""
-"Il nome della banca con BIC \"%s\" non è impostato. Impossibile creare la "
-"banca"
+msgstr "Nome banca con BIC \"%s\" non impostato, impossibile creare la banca."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_kind
+#, fuzzy
msgid "Natura"
msgstr "Natura"
@@ -560,7 +571,7 @@ msgstr "Natura"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:829
#, python-format
msgid "No currency found with code %s"
-msgstr "Nessuna valuta trovata con codice %s"
+msgstr "Valuta con codice %s non trovata"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:279
@@ -568,19 +579,18 @@ msgstr "Nessuna valuta trovata con codice %s"
msgid ""
"No tax with percentage %s and nature %s found. Please configure this tax"
msgstr ""
-"Nessuna imposta con aliquota %s e natura %s trovata. Configurare questa "
-"imposta"
+"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:913
#, python-format
msgid "No withholding tax found with Causale %s and rate %s"
-msgstr "Nessuna ritenuta trovata con Causale %s e importo %s"
+msgstr "Ritenuta fiscale con causale %s e importo %s non trovata"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_line_number
msgid "Numero Linea"
-msgstr "Numero Linea"
+msgstr "Numero riga"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_res_partner
@@ -591,7 +601,7 @@ msgstr "Partner"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1144
#, python-format
msgid "Payment method Code %s is incorrect"
-msgstr "Codice metodo di oagamento %s non corretto"
+msgstr "Codice metodo di pagamento %s non corretto"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1139
@@ -607,26 +617,29 @@ msgstr "Pagamenti"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Payments Details"
-msgstr "Payments Details"
+msgstr "Dettagli pagamenti"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_ftpa_preview_link
msgid "Preview link"
-msgstr ""
+msgstr "Collegamento di anteprima"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_total_price
+#, fuzzy
msgid "Prezzo Totale"
-msgstr "Prezzo Totale"
+msgstr "Prezzo totale"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_unit_price
+#, fuzzy
msgid "Prezzo unitario"
msgstr "Prezzo unitario"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_dati_bollo_product_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_dati_bollo_product_id
+#, fuzzy
msgid ""
"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
"valorizzato l'elemento DatiBollo"
@@ -637,6 +650,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_cassa_previdenziale_product_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_cassa_previdenziale_product_id
+#, fuzzy
msgid ""
"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
"valorizzato l'elemento DatiCassaPrevidenziale"
@@ -647,6 +661,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_account_config_settings_sconto_maggiorazione_product_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company_sconto_maggiorazione_product_id
+#, fuzzy
msgid ""
"Prodotto da utilizzare nelle fatture passive quando nell'XML viene "
"valorizzato l'elemento ScontoMaggiorazione"
@@ -657,35 +672,39 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_dati_bollo_product_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_dati_bollo_product_id
+#, fuzzy
msgid "Product for Dati Bollo"
-msgstr "Prodotto per Dati Bollo"
+msgstr "Prodotto per dati bollo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_cassa_previdenziale_product_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_cassa_previdenziale_product_id
+#, fuzzy
msgid "Product for Dati Cassa Previdenziale"
-msgstr "Prodotto per Dati Cassa Previdenziale"
+msgstr "Prodotto per dati cassa previdenziale"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_config_settings_sconto_maggiorazione_product_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company_sconto_maggiorazione_product_id
+#, fuzzy
msgid "Product for Sconto Maggiorazione"
-msgstr "Prodotto per Sconto Maggiorazione"
+msgstr "Prodotto per sconto maggiorazione"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:198
#, python-format
msgid "Provincia ( %s ) not present in system"
-msgstr "Provincia ( %s ) non presente nel database"
+msgstr "Provincia ( %s ) non presente nel sistema"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:188
#, python-format
msgid "ProvinciaAlbo ( %s ) not present in system"
-msgstr "ProvinciaAlbo ( %s ) non presente nel database"
+msgstr "ProvinciaAlbo ( %s ) non presente nel sistema"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_qty
+#, fuzzy
msgid "Quantita'"
msgstr "Quantita'"
@@ -693,13 +712,13 @@ msgstr "Quantita'"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:228
#, python-format
msgid "REA Office (Province) Code ( %s ) not present in system"
-msgstr "Codice ufficio REA (Provincia) ( %s ) non presente nel database"
+msgstr "Codice ufficio REA (provincia) ( %s ) non presente nel sistema"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:216
#, python-format
msgid "RegimeFiscale %s is not present in your system"
-msgstr "RegimeFiscale %s non presente nel database"
+msgstr "RegimeFiscale %s non presente nel sistema"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_registered
@@ -709,14 +728,14 @@ msgstr "Registrata"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Related Documents"
-msgstr "Documenti Correlati"
+msgstr "Documenti correlati"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_discount_rise_price_e_invoice_line_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_e_invoice_line_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_article_code_e_invoice_line_id
msgid "Related E-Invoice line"
-msgstr "Riga fattura elettronica correlata"
+msgstr "Riga e-fattura correlata"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
@@ -726,45 +745,50 @@ msgstr "Rimuovi"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_field
msgid "Resource Field"
-msgstr "Campo Risorsa"
+msgstr "Campo risorsa"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_id
msgid "Resource ID"
-msgstr "ID Risorsa"
+msgstr "ID risorsa"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_model
msgid "Resource Model"
-msgstr "Modello della Risorsa"
+msgstr "Modello risorsa"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_name
msgid "Resource Name"
-msgstr "Nome Risorsa"
+msgstr "Nome risorsa"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_date_ref
+#, fuzzy
msgid "Riferimento Data"
-msgstr "Riferimento Data"
+msgstr "Riferimento data"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_num_ref
+#, fuzzy
msgid "Riferimento Numero"
-msgstr "Riferimento Numero"
+msgstr "Riferimento numero"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_text_ref
+#, fuzzy
msgid "Riferimento Testo"
-msgstr "Riferimento Testo"
+msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_admin_ref
+#, fuzzy
msgid "Riferimento mministrazione"
-msgstr "Riferimento mministrazione"
+msgstr "Riferimento amministrazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_wt_amount
+#, fuzzy
msgid "Ritenuta"
msgstr "Ritenuta"
@@ -775,11 +799,13 @@ msgstr "Dati SAL"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Sconto Maggiorazione"
-msgstr "Sconto Maggiorazione"
+msgstr "Sconto maggiorazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_invoices_total
+#, fuzzy
msgid ""
"Se indicato dal fornitore, Importo totale del documento al netto "
"dell'eventuale sconto e comprensivo di imposta a debito del cessionario / "
@@ -791,13 +817,14 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+#, fuzzy
msgid "Stabile Organizzazione"
-msgstr "Stabile Organizzazione"
+msgstr "Stabile organizzazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_store_fname
msgid "Stored Filename"
-msgstr "Nome del File Registrato"
+msgstr "Nome file memorizzato"
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -816,8 +843,8 @@ msgid ""
"Supplier invoice contains withholding tax with CausalePagamento %s, but such "
"a tax is not found in your system. Please set it"
msgstr ""
-"La fattura contiene la ritenuta con Causale Pagamento %s, ma tale ritenuta "
-"non è presente nel sistema. Prego impostarla"
+"La fattura contiene una ritenuta fiscale con causale pagamento %s. Tale "
+"ritenuta non è presente nel sistema, è necessario impostarla."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
@@ -828,28 +855,28 @@ msgstr "Tipo imposta %s non trovato"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_model
msgid "The database object this attachment will be attached to."
-msgstr "L'oggetto del database a cui verrà allegato questo allegato."
+msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in_res_id
msgid "The record id this is attached to."
-msgstr "L'ID del record a cui questo è allegato."
+msgstr "L'ID del record a cui questo è collegato."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_service_type
msgid "Tipo Cessione Prestazione"
-msgstr "Tipo Cessione Prestazione"
+msgstr "Tipo cessione prestazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_name
msgid "Tipo Dato"
-msgstr "Tipo Dato"
+msgstr "Tipo dato"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
#, python-format
msgid "TipoCassa %s is not present in your system"
-msgstr "TipoCassa %s non presente nel database"
+msgstr "TipoCassa %s non presente nel sistema"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
@@ -866,7 +893,7 @@ msgstr "Da registrare"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:284
#, python-format
msgid "Too many taxes with percentage %s and nature %s found"
-msgstr "Troppe imposte con aliquota %s e natura %s trovate"
+msgstr "Trovate troppe imposte con aliquota %s e natura %s"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:135
@@ -874,8 +901,8 @@ msgstr "Troppe imposte con aliquota %s e natura %s trovate"
msgid ""
"Two distinct partners with Vat %s and Fiscalcode %s already present in db"
msgstr ""
-"2 differenti partner con P.IVA %s e codice fiscale %s sono già presenti nel "
-"database"
+"Nel database sono già presenti due diversi partner con P. IVA %s e codice "
+"fiscale %s"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_type
@@ -884,13 +911,14 @@ msgstr "Tipo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_uom
+#, fuzzy
msgid "Unita' di misura"
msgstr "Unita' di misura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_url
msgid "Url"
-msgstr "Url"
+msgstr "URL"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_default_product_id
@@ -900,8 +928,8 @@ msgid ""
"will use this product, when no other possible product is found."
msgstr ""
"Usato nell'importazione XML delle fatture elettroniche. Se valorizzato, le "
-"fatture generate nell'importazione utilizzeranno questo prodotto, quando "
-"nessun'altro possibile prodotto verrà trovato"
+"righe fattura generate useranno questo prodotto se non ce ne sono altri "
+"disponibili."
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -918,8 +946,8 @@ msgstr "Dettagli cassa previdenziale"
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
-"L'XML contiene l'imposta %s. Il prodotto %s ha l'imposta %s. Utilizzo quella "
-"dell'XML"
+"Il file XML contiene l'imposta %s, il prodotto %s l'imposta %s. Verrà usata "
+"quella dell'XML."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:299
@@ -927,7 +955,8 @@ msgstr ""
msgid ""
"XML contains tax with percentage \"%s\" but it does not exist in your system"
msgstr ""
-"L'XML contiene l'imposta con alquota \"%s\" ma questa non esiste nel database"
+"Il file XML contiene l'imposta con aliquota \"%s\" ma questa non esiste nel "
+"sistema."
#. module: l10n_it_fatturapa_in
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_tree
@@ -940,8 +969,8 @@ msgid ""
"You can either upload a file from your computer or copy/paste an internet "
"link to your file."
msgstr ""
-"Puoi inviare un file dal computer o copiare/incollare un indirizzo Internet "
-"che è collegato al tuo file."
+"È possibile caricare un file dal computer oppure fare copia/incolla di un "
+"collegamento Internet nel file."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:19
From acbca80e7e96b93ce7ae0cff8a25242448285f13 Mon Sep 17 00:00:00 2001
From: Lorenzo Battistini
Date: Mon, 22 Oct 2018 15:31:49 +0200
Subject: [PATCH 004/155] IMP l10n_it_fatturapa useless field (#613)
supplier fields only visible for suppliers
Check mandatory customer fields before exporting XML
Prevent to use sequence already used by journals
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot | 5 +++++
l10n_it_fatturapa_in/views/partner_view.xml | 7 +++----
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index e00688104d9a..fe4a807102aa 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -5,7 +5,7 @@
{
'name': 'Italian Localization - Fattura Elettronica reception',
- 'version': '10.0.1.0.0',
+ 'version': '10.0.1.1.0',
'category': 'Localization/Italy',
'summary': 'Electronic invoices reception',
'author': 'Agile Business Group, Innoviu, '
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 4c50cb0b2455..7b6496502e96 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -750,6 +750,11 @@ msgstr ""
msgid "Supplier"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_partner_form_fatturapa_in
+msgid "Supplier data"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:901
#, python-format
diff --git a/l10n_it_fatturapa_in/views/partner_view.xml b/l10n_it_fatturapa_in/views/partner_view.xml
index 81e10e2a3218..1c2d36818b5d 100644
--- a/l10n_it_fatturapa_in/views/partner_view.xml
+++ b/l10n_it_fatturapa_in/views/partner_view.xml
@@ -7,12 +7,11 @@
-
+
+
-
-
-
From 1bf5781f363cf1910a7bda706491ac583fc67c23 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Mon, 5 Nov 2018 11:21:29 +0000
Subject: [PATCH 005/155] Translated using Weblate (Italian)
Currently translated at 73.7% (115 of 156 strings)
Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 03a060d63d21..a20dcd8d4dab 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2018-10-18 15:58+0000\n"
-"Last-Translator: Sergio Zanchetta \n"
+"PO-Revision-Date: 2018-11-15 13:38+0000\n"
+"Last-Translator: Lorenzo Battistini \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.2.1\n"
+"X-Generator: Weblate 3.2.2\n"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_tax_amount
@@ -381,9 +381,8 @@ msgstr "Import Fattura Elettronica"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_import_fatturapa
-#, fuzzy
msgid "Import FatturaPA"
-msgstr "Importa fatturaPA"
+msgstr "Importa e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice_inconsistencies
@@ -481,7 +480,7 @@ msgid ""
"Line '%s': Too many taxes with percentage equals to \"%s\"\n"
"fix it if required"
msgstr ""
-"Riga '%s': troppe imposte con aliquota pari a\"%s\"\n"
+"Riga \"%s\": troppe imposte con aliquota pari a\"%s\".\n"
"Correggere se necessario"
#. module: l10n_it_fatturapa_in
@@ -511,7 +510,7 @@ msgstr "Livello di dettaglio Fatture elettroniche"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_detail_level
#, fuzzy
msgid "Livello di dettaglio Fatture elettroniche passive"
-msgstr "Livello di dettaglio Fatture elettroniche"
+msgstr "Livello di dettaglio Fatture elettroniche passive"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
@@ -534,6 +533,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: selection:res.partner,e_invoice_detail_level:0
#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+#, fuzzy
msgid "Massimo"
msgstr "Massimo"
@@ -589,6 +589,7 @@ msgstr "Ritenuta fiscale con causale %s e importo %s non trovata"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_line_number
+#, fuzzy
msgid "Numero Linea"
msgstr "Numero riga"
@@ -706,7 +707,7 @@ msgstr "ProvinciaAlbo ( %s ) non presente nel sistema"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_qty
#, fuzzy
msgid "Quantita'"
-msgstr "Quantita'"
+msgstr "Quantità"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:228
@@ -864,11 +865,13 @@ msgstr "L'ID del record a cui questo è collegato."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_service_type
+#, fuzzy
msgid "Tipo Cessione Prestazione"
msgstr "Tipo cessione prestazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data_name
+#, fuzzy
msgid "Tipo Dato"
msgstr "Tipo dato"
@@ -893,7 +896,7 @@ msgstr "Da registrare"
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:284
#, python-format
msgid "Too many taxes with percentage %s and nature %s found"
-msgstr "Trovate troppe imposte con aliquota %s e natura %s"
+msgstr "Rilevate troppe imposte con aliquota %s e natura %s"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:135
@@ -901,8 +904,8 @@ msgstr "Trovate troppe imposte con aliquota %s e natura %s"
msgid ""
"Two distinct partners with Vat %s and Fiscalcode %s already present in db"
msgstr ""
-"Nel database sono già presenti due diversi partner con P. IVA %s e codice "
-"fiscale %s"
+"Nel database sono già presenti due diversi partner con partita IVA %s e "
+"codice fiscale %s"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_type
@@ -913,7 +916,7 @@ msgstr "Tipo"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_uom
#, fuzzy
msgid "Unita' di misura"
-msgstr "Unita' di misura"
+msgstr "Unità di misura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_url
@@ -976,7 +979,7 @@ msgstr ""
#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:19
#, python-format
msgid "You can select only 1 XML file to link"
-msgstr "E' possibile selezionare solo un file XML da collegare"
+msgstr "È possibile selezionare solo un file XML da collegare"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_config_settings
From 7ac9c2ed21b020002b9e74a20b02b0469eb54ec2 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Tue, 13 Nov 2018 15:12:09 +0100
Subject: [PATCH 006/155] IMP README exceptions sending email Avoid to delete
sent files Check duplicated files Send several files Reset to ready button
Sending and delivery date Handling ACCETTAZIONE and CONSEGNA IMP 'link to
existing invoice' wizard FIX invoice views within attachment view IMP
attachments views IMP l10n_it_fatturapa_out export: allow multiple export ,
group by partner ALLOW to use newline char in invoice line description check
sequence without date ranges Extract correcttle messages from NS
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot | 5 -----
l10n_it_fatturapa_in/models/account.py | 4 ++++
l10n_it_fatturapa_in/views/account_view.xml | 10 +---------
.../wizard/link_to_existing_invoice.xml | 1 +
5 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index fe4a807102aa..aefa4aea40cc 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -5,7 +5,7 @@
{
'name': 'Italian Localization - Fattura Elettronica reception',
- 'version': '10.0.1.1.0',
+ 'version': '10.0.1.2.0',
'category': 'Localization/Italy',
'summary': 'Electronic invoices reception',
'author': 'Agile Business Group, Innoviu, '
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 7b6496502e96..a4cb094f7ee7 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -268,11 +268,6 @@ msgstr ""
msgid "E-invoice details"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
-msgid "Fattura PA V1.2 Schema"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
msgid "FatturaPA Article Code"
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 33d5ff5c2ccd..d7ebcf17edd4 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -23,6 +23,10 @@ def name_get(self):
invoice = self.browse(tup[0])
if invoice.type in ('in_invoice', 'in_refund'):
name = "%s, %s" % (tup[1], invoice.partner_id.name)
+ if invoice.amount_total_signed:
+ name += ', %s %s' % (
+ invoice.amount_total_signed, invoice.currency_id.symbol
+ )
if invoice.origin:
name += ', %s' % invoice.origin
res.append((invoice.id, name))
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 9e230db3620a..c5798f3e632e 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -24,7 +24,7 @@
+ context="{'form_view_ref': 'account.invoice_supplier_form', 'tree_view_ref': 'account.invoice_supplier_tree'}">
@@ -103,14 +103,6 @@
account.invoice
-
-
-
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
index 18509d0aea3e..6e0ed14f0ccb 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
@@ -11,6 +11,7 @@
From f73e457bdfed5cfda60e96ed5686cfae3a9732e0 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Fri, 16 Nov 2018 10:49:13 +0000
Subject: [PATCH 007/155] Translated using Weblate (Italian)
Currently translated at 73.1% (114 of 156 strings)
Translation: l10n-italy-10.0/l10n-italy-10.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index a20dcd8d4dab..7d1f2285a9d8 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2018-11-15 13:38+0000\n"
-"Last-Translator: Lorenzo Battistini \n"
+"PO-Revision-Date: 2018-11-16 11:34+0000\n"
+"Last-Translator: Sergio Zanchetta \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
@@ -178,6 +178,7 @@ msgstr "Creazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_period_end_date
+#, fuzzy
msgid "Data Fine Periodo"
msgstr "Data fine periodo"
@@ -375,12 +376,12 @@ msgstr "Importa"
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_import_fatturapa
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
#: model:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
-#, fuzzy
msgid "Import Fattura Elettronica"
-msgstr "Import Fattura Elettronica"
+msgstr "Importazione fattura elettronica"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_import_fatturapa
+#, fuzzy
msgid "Import FatturaPA"
msgstr "Importa e-fattura"
@@ -391,6 +392,7 @@ msgstr "Incongruenze nell'importazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in_in_invoice_ids
+#, fuzzy
msgid "In Invoices"
msgstr "Fatture passive"
@@ -503,14 +505,14 @@ msgstr "Collega a fattura fornitore esistente"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa_e_invoice_detail_level
#, fuzzy
msgid "Livello di dettaglio Fatture elettroniche"
-msgstr "Livello di dettaglio Fatture elettroniche"
+msgstr "Livello di dettaglio fatture elettroniche"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_users_e_invoice_detail_level
#, fuzzy
msgid "Livello di dettaglio Fatture elettroniche passive"
-msgstr "Livello di dettaglio Fatture elettroniche passive"
+msgstr "Livello di dettaglio fatture elettroniche passive"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_partner_e_invoice_detail_level
From d5010eafb5c769a87b878db11771bfd851efc7ef Mon Sep 17 00:00:00 2001
From: francesca-bianchini
Date: Tue, 6 Nov 2018 09:37:12 +0100
Subject: [PATCH 008/155] [MIG] l10n_it_fatturapa_in: Migration to 11.0
---
l10n_it_fatturapa_in/README.rst | 10 +++++-----
l10n_it_fatturapa_in/__init__.py | 1 -
l10n_it_fatturapa_in/__manifest__.py | 6 +++---
l10n_it_fatturapa_in/i18n/it.po | 4 ++--
l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot | 2 +-
l10n_it_fatturapa_in/models/__init__.py | 1 -
l10n_it_fatturapa_in/models/account.py | 1 -
l10n_it_fatturapa_in/models/attachment.py | 1 -
l10n_it_fatturapa_in/models/company.py | 3 +--
l10n_it_fatturapa_in/models/partner.py | 1 -
l10n_it_fatturapa_in/static/description/index.html | 6 +++---
l10n_it_fatturapa_in/tests/__init__.py | 1 -
.../tests/test_import_fatturapa_xml.py | 11 +++++------
l10n_it_fatturapa_in/views/company_view.xml | 2 +-
l10n_it_fatturapa_in/wizard/__init__.py | 1 -
.../wizard/link_to_existing_invoice.py | 1 -
.../wizard/wizard_import_fatturapa.py | 1 -
17 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index 91656857baa3..f1945d2ae101 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -14,13 +14,13 @@ Italian Localization - Fattura Elettronica reception
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
- :target: https://github.com/OCA/l10n-italy/tree/10.0/l10n_it_fatturapa_in
+ :target: https://github.com/OCA/l10n-italy/tree/11.0/l10n_it_fatturapa_in
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_in
+ :target: https://translation.odoo-community.org/projects/l10n-italy-11-0/l10n-italy-11-0-l10n_it_fatturapa_in
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/122/10.0
+ :target: https://runbot.odoo-community.org/runbot/122/11.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -79,7 +79,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -112,6 +112,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/l10n-italy `_ project on GitHub.
+This module is part of the `OCA/l10n-italy `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/l10n_it_fatturapa_in/__init__.py b/l10n_it_fatturapa_in/__init__.py
index 574498c3b125..12a86766001a 100644
--- a/l10n_it_fatturapa_in/__init__.py
+++ b/l10n_it_fatturapa_in/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from . import models
from . import tests
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index aefa4aea40cc..9076714ff2fb 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -1,16 +1,16 @@
-# -*- coding: utf-8 -*-
# Copyright 2015 AgileBG SAGL
# Copyright 2015 innoviu Srl
# Copyright 2018 Lorenzo Battistini
{
'name': 'Italian Localization - Fattura Elettronica reception',
- 'version': '10.0.1.2.0',
+ 'version': '11.0.1.0.0',
+ "development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Electronic invoices reception',
'author': 'Agile Business Group, Innoviu, '
'Odoo Community Association (OCA)',
- 'website': 'http://www.agilebg.com',
+ 'website': 'http://github.com/OCA/l10n-italy/',
'license': 'LGPL-3',
"depends": [
'l10n_it_fatturapa',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 7d1f2285a9d8..893fa7186d54 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -985,8 +985,8 @@ msgstr "È possibile selezionare solo un file XML da collegare"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_config_settings
-msgid "account.config.settings"
-msgstr "account.config.settings"
+msgid "res.config.settings"
+msgstr "res.config.settings"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index a4cb094f7ee7..8592e63b85d2 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -872,7 +872,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_config_settings
-msgid "account.config.settings"
+msgid "res.config.settings"
msgstr ""
#. module: l10n_it_fatturapa_in
diff --git a/l10n_it_fatturapa_in/models/__init__.py b/l10n_it_fatturapa_in/models/__init__.py
index aa731e35a87e..d9de15be6c73 100644
--- a/l10n_it_fatturapa_in/models/__init__.py
+++ b/l10n_it_fatturapa_in/models/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from . import attachment
from . import account
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index d7ebcf17edd4..360eeeb6e351 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 9b8613c6f6e2..7fa353b1e54f 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from odoo import fields, models, api
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index d62e695d3595..0fdeb8871fcb 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from odoo import fields, models, api
@@ -24,7 +23,7 @@ class ResCompany(models.Model):
class AccountConfigSettings(models.TransientModel):
- _inherit = 'account.config.settings'
+ _inherit = 'res.config.settings'
dati_bollo_product_id = fields.Many2one(
related='company_id.dati_bollo_product_id',
diff --git a/l10n_it_fatturapa_in/models/partner.py b/l10n_it_fatturapa_in/models/partner.py
index 73bae4c66468..f1e765e4da80 100644
--- a/l10n_it_fatturapa_in/models/partner.py
+++ b/l10n_it_fatturapa_in/models/partner.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from odoo import models, fields
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index 5b693059edef..84b58142da16 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -367,7 +367,7 @@ Italian Localization - Fattura Elettronica reception
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows to import XML files of electronic invoices, version 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
received through the exchange system (SDI)
@@ -424,7 +424,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -451,7 +451,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/l10n-italy project on GitHub.
+
This module is part of the OCA/l10n-italy project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/l10n_it_fatturapa_in/tests/__init__.py b/l10n_it_fatturapa_in/tests/__init__.py
index 2d2485f34333..82c21f57eb22 100644
--- a/l10n_it_fatturapa_in/tests/__init__.py
+++ b/l10n_it_fatturapa_in/tests/__init__.py
@@ -1,3 +1,2 @@
-# -*- coding: utf-8 -*-
from . import test_import_fatturapa_xml
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index b1be1d7a6468..a6c992d36198 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
import base64
import tempfile
@@ -200,7 +199,7 @@ def test_04_xml_import(self):
e_line.cod_article_ids[0].code_val, '12345')
self.assertEqual(
invoice.inconsistencies,
- u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n')
def test_05_xml_import(self):
@@ -330,11 +329,11 @@ def test_13_xml_import(self):
invoice2 = self.invoice_model.browse(invoice2_id)
self.assertEqual(
invoice1.inconsistencies,
- u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n')
self.assertEqual(
invoice2.inconsistencies,
- u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n')
def test_14_xml_import(self):
@@ -349,9 +348,9 @@ def test_14_xml_import(self):
self.assertEqual(invoice.amount_tax, 0.0)
self.assertEqual(
invoice.inconsistencies,
- u'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
+ 'DatiAnagrafici.Anagrafica.Denominazione contains "Societa\' '
'Alpha SRL". Your System contains "SOCIETA\' ALPHA SRL"\n\n'
- u'XML contains tax with percentage "15.55"'
+ 'XML contains tax with percentage "15.55"'
' but it does not exist in your system\n'
'XML contains tax with percentage "15.55"'
' but it does not exist in your system')
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 964a412864d0..90521695f1cf 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -3,7 +3,7 @@
view_account_config_settings_ftpa_in
- account.config.settings
+ res.config.settings
diff --git a/l10n_it_fatturapa_in/wizard/__init__.py b/l10n_it_fatturapa_in/wizard/__init__.py
index 313c912d6f15..5c51653af645 100644
--- a/l10n_it_fatturapa_in/wizard/__init__.py
+++ b/l10n_it_fatturapa_in/wizard/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from . import wizard_import_fatturapa
from . import link_to_existing_invoice
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index 879f7943e3fe..070fd1159f62 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
from odoo import models, api, fields
from odoo.tools.translate import _
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 2045ba3528b7..102d0c2b4c1c 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
import base64
import logging
From 20983fb96f02b545f2b60710b8edf256623f72e6 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Sat, 17 Nov 2018 12:23:54 +0100
Subject: [PATCH 009/155] porting l10n_it_fatturapa_in to 12
---
l10n_it_fatturapa_in/README.rst | 10 ++---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/models/account.py | 2 +
l10n_it_fatturapa_in/models/company.py | 9 +++--
.../static/description/index.html | 6 +--
.../tests/test_import_fatturapa_xml.py | 13 +++---
l10n_it_fatturapa_in/views/account_view.xml | 9 ++++-
l10n_it_fatturapa_in/views/company_view.xml | 40 +++++++++++++------
.../wizard/wizard_import_fatturapa.py | 9 ++---
9 files changed, 63 insertions(+), 37 deletions(-)
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index f1945d2ae101..ee5d6aa72d65 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -14,13 +14,13 @@ Italian Localization - Fattura Elettronica reception
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
- :target: https://github.com/OCA/l10n-italy/tree/11.0/l10n_it_fatturapa_in
+ :target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_fatturapa_in
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/l10n-italy-11-0/l10n-italy-11-0-l10n_it_fatturapa_in
+ :target: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/122/11.0
+ :target: https://runbot.odoo-community.org/runbot/122/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -79,7 +79,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -112,6 +112,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/l10n-italy `_ project on GitHub.
+This module is part of the `OCA/l10n-italy `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 9076714ff2fb..4e2d0ea59064 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -4,7 +4,7 @@
{
'name': 'Italian Localization - Fattura Elettronica reception',
- 'version': '11.0.1.0.0',
+ 'version': '12.0.1.0.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Electronic invoices reception',
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 360eeeb6e351..3d80c7352a89 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -73,6 +73,7 @@ class DiscountRisePrice(models.Model):
class EInvoiceLine(models.Model):
_name = 'einvoice.line'
+ _description = 'E-invoice line'
invoice_id = fields.Many2one(
"account.invoice", "Invoice", readonly=True)
line_number = fields.Integer('Numero Linea', readonly=True)
@@ -109,6 +110,7 @@ class EInvoiceLine(models.Model):
class EInvoiceLineOtherData(models.Model):
_name = 'einvoice.line.other.data'
+ _description = 'E-invoice line other data'
e_invoice_line_id = fields.Many2one(
'einvoice.line', 'Related E-Invoice line', readonly=True
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 0fdeb8871fcb..065ddf77aaa9 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -29,19 +29,22 @@ class AccountConfigSettings(models.TransientModel):
related='company_id.dati_bollo_product_id',
string="Product for Dati Bollo",
help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento DatiBollo'
+ 'viene valorizzato l\'elemento DatiBollo',
+ readonly=False
)
cassa_previdenziale_product_id = fields.Many2one(
related='company_id.cassa_previdenziale_product_id',
string="Product for Dati Cassa Previdenziale",
help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento DatiCassaPrevidenziale'
+ 'viene valorizzato l\'elemento DatiCassaPrevidenziale',
+ readonly=False
)
sconto_maggiorazione_product_id = fields.Many2one(
related='company_id.sconto_maggiorazione_product_id',
string="Product for Sconto Maggiorazione",
help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento ScontoMaggiorazione'
+ 'viene valorizzato l\'elemento ScontoMaggiorazione',
+ readonly=False
)
@api.onchange('company_id')
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index 84b58142da16..364f67320ce0 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -367,7 +367,7 @@ Italian Localization - Fattura Elettronica reception
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows to import XML files of electronic invoices, version 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
received through the exchange system (SDI)
@@ -424,7 +424,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -451,7 +451,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/l10n-italy project on GitHub.
+
This module is part of the OCA/l10n-italy project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index a6c992d36198..b34521b5b14c 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -1,6 +1,7 @@
import base64
import tempfile
+from datetime import date
from odoo.tests.common import SingleTransactionCase
from odoo.modules import get_module_resource
from odoo.exceptions import UserError
@@ -11,7 +12,7 @@ class TestFatturaPAXMLValidation(SingleTransactionCase):
def getFile(self, filename):
path = get_module_resource(
'l10n_it_fatturapa_in', 'tests', 'data', filename)
- with open(path) as test_data:
+ with open(path, 'rb') as test_data:
with tempfile.TemporaryFile() as out:
base64.encode(test_data, out)
out.seek(0)
@@ -43,7 +44,7 @@ def setUp(self):
'product.product_product_7_product_template')
self.imac = self.env.ref(
'product.product_product_8_product_template')
- self.service = self.env.ref('product.service_delivery')
+ self.service = self.env.ref('product.product_product_1')
def run_wizard(self, name, file_name):
attach_id = self.attach_model.create(
@@ -210,7 +211,7 @@ def test_05_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.reference, 'FT/2015/0008')
self.assertEqual(invoice.sender, 'TZ')
- self.assertEqual(invoice.intermediary.name, 'ROSSI MARIO')
+ self.assertEqual(invoice.intermediary.name, 'MARIO ROSSI')
self.assertEqual(invoice.intermediary.firstname, 'MARIO')
self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
bollo_found = False
@@ -281,10 +282,10 @@ def test_10_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.reference, 'FT/2015/0009')
self.assertEqual(
- invoice.date_invoice, '2015-03-16')
+ invoice.date_invoice, date(2015, 3, 16))
self.assertEqual(
invoice.fatturapa_payments[0].payment_methods[0].payment_due_date,
- '2015-06-03'
+ date(2015, 6, 3)
)
self.assertEqual(
invoice.fatturapa_payments[0].payment_methods[0].
@@ -313,7 +314,7 @@ def test_12_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.reference, 'FT/2015/0012')
self.assertEqual(invoice.sender, 'TZ')
- self.assertEqual(invoice.intermediary.name, 'ROSSI MARIO')
+ self.assertEqual(invoice.intermediary.name, 'MARIO ROSSI')
self.assertEqual(invoice.intermediary.firstname, 'MARIO')
self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index c5798f3e632e..d2cd2f9d5414 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -9,7 +9,13 @@
-
+
+
+
+
+
+
@@ -20,7 +26,6 @@
-
res.config.settings
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
Supplier Invoices
+
+
+ Default products used in electronic supplier invoices
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 102d0c2b4c1c..3dc54faa2daf 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -239,7 +239,6 @@ def getCedPrest(self, cedPrest):
if cedPrest.Contatti:
vals['phone'] = cedPrest.Contatti.Telefono
vals['email'] = cedPrest.Contatti.Email
- vals['fax'] = cedPrest.Contatti.Fax
partner_model.browse(partner_id).write(vals)
return partner_id
@@ -258,10 +257,10 @@ def _prepare_generic_line_data(self, line):
retLine = {}
account_tax_model = self.env['account.tax']
# check if a default tax exists and generate def_purchase_tax object
- ir_values = self.env['ir.values']
+ ir_values = self.env['ir.default']
company_id = self.env['res.company']._company_default_get(
'account.invoice.line').id
- supplier_taxes_ids = ir_values.get_default(
+ supplier_taxes_ids = ir_values.get(
'product.product', 'supplier_taxes_id', company_id=company_id)
def_purchase_tax = False
if supplier_taxes_ids:
@@ -861,7 +860,7 @@ def invoiceCreate(
invoice_data = {
'fiscal_document_type_id': docType_id,
'date_invoice':
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data,
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data.date(),
'reference':
FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
@@ -1163,7 +1162,7 @@ def invoiceCreate(
content = attach.Attachment
_attach_dict = {
'name': name,
- 'datas': base64.b64encode(str(content)),
+ 'datas': base64.b64encode(content),
'datas_fname': name,
'description': attach.DescrizioneAttachment or '',
'compression': attach.AlgoritmoCompressione or '',
From e53b6b225db0e7dd46b852e8e274e5e17ff8fd20 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Tue, 27 Nov 2018 18:55:26 +0100
Subject: [PATCH 010/155] [FIX] translation source strings l10n_it_fatturapa_in
[IMP] revamp README and manifest
[FIX] wrong tabs indentation
---
l10n_it_fatturapa_in/README.rst | 85 +++++++--
l10n_it_fatturapa_in/__manifest__.py | 7 +-
l10n_it_fatturapa_in/models/account.py | 52 +++---
l10n_it_fatturapa_in/models/attachment.py | 5 +-
l10n_it_fatturapa_in/models/company.py | 32 ++--
l10n_it_fatturapa_in/models/partner.py | 18 +-
l10n_it_fatturapa_in/readme/CONFIGURE.rst | 33 +++-
l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst | 1 +
l10n_it_fatturapa_in/readme/DESCRIPTION.rst | 16 +-
l10n_it_fatturapa_in/readme/INSTALL.rst | 10 +-
l10n_it_fatturapa_in/readme/USAGE.rst | 19 +-
.../static/description/index.html | 68 ++++++--
.../tests/data/IT01234567890_FPR03.xml | 22 +--
.../tests/data/IT03638121008_X11111.xml | 162 +++++++++---------
.../tests/data/IT05979361218_005.xml | 98 +++++------
.../tests/data/IT05979361218_006.XML | 98 +++++------
.../tests/data/IT05979361218_009.xml | 2 +-
.../tests/test_import_fatturapa_xml.py | 16 +-
l10n_it_fatturapa_in/views/account_view.xml | 26 +--
.../wizard/link_to_existing_invoice.py | 4 +-
.../wizard/link_to_existing_invoice.xml | 4 +-
.../wizard/wizard_import_fatturapa.py | 71 ++++----
.../wizard/wizard_import_fatturapa_view.xml | 8 +-
23 files changed, 498 insertions(+), 359 deletions(-)
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index ee5d6aa72d65..4fb3df4f8dfa 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -1,6 +1,6 @@
-====================================================
-Italian Localization - Fattura Elettronica reception
-====================================================
+======================================================
+Italian Localization - Fattura Elettronica - Reception
+======================================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
@@ -25,14 +25,26 @@ Italian Localization - Fattura Elettronica reception
|badge1| |badge2| |badge3| |badge4| |badge5|
-This module allows to import XML files of electronic invoices, version 1.2
+**Italiano**
+
+Questo modulo consente di importare i file XML delle fatture elettroniche, versione 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
-received through the exchange system (SDI)
+ricevute attraverso il Sistema di Interscambio (SDI)
http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
+**English**
+
+This module allows to import XML files of electronic bills, version 1.2
+
+http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm
+
+received through the Exchange System (ES)
+
+http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm
+
**Table of contents**
.. contents::
@@ -41,37 +53,75 @@ http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
Installation
============
-odoo server must run on linux and be able to run
+**Italiano**
+
+Il server Odoo deve essere avviato da un sistema Linux con installato
+
+``openssl``
+
+**English**
+
+Odoo server must run on linux and be able to run
``openssl``
Configuration
=============
-Also see the README file of l10n_it_fatturapa module.
+**Italiano**
+
+Consultare anche il file README del modulo l10n_it_fatturapa.
-For every supplier, it is possible to set the 'details level of electronic invoices':
+Per ciascun fornitore è possibile impostare il "Livello dettaglio e-fatture":
- - Minimum level: Supplier invoice is created without lines; user will have to create them, according to what specified in electronic invoice
- - Maximum level: every line contained in electronic invoice will create a line in supplier invoice.
+ - Livello minimo: la fattura fornitore viene creata senza righe, che dovranno essere create dall'utente in base a quanto indicato nella fattura elettronica
+ - Livello massimo: le righe della fattura fornitore verranno generate a partire da tutte quelle presenti nella fattura elettronica
-Moreover, it is possible, in supplier form, to set the 'default product for electronic invoices': this product will be used, during generation of supplier invoices, when no other possible product is found. Tax and account of invoice line will be set according to what configured in the product.
+Nella scheda fornitore è inoltre possibile impostare il "Prodotto predefinito per e-fattura": verrà usato, durante la generazione delle fatture fornitore, quando non sono disponibili altri prodotti adeguati. Il conto e l'imposta della riga fattura verranno impostati in base a quelli configurati nel prodotto.
+
+Tutti i codici prodotto usati dai fornitori possono essere impostati nella relativa scheda, in
+
+Magazzino → Prodotti
+
+Se il fornitore specifica un codice noto nell'XML, questo verrà usato dal sistema per recuperare il prodotto corretto da usare nella riga fattura, impostando il conto e l'imposta collegati.
+
+**English**
+
+See also the README file of l10n_it_fatturapa module.
+
+For every supplier, it is possible to set the 'E-bills Detail Level':
+
+ - Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill
+ - Maximum level: every line contained in electronic bill will create a line in bill
+
+Moreover, in supplier form you can set the 'E-bill Default Product': this product will be used, during generation of bills, when no other possible product is found. Tax and account of bill line will be set according to what configured in the product.
Every product code used by suppliers can be set, in product form, in
-Inventory --> Suppliers
+Inventory → Products
-If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in invoice line, setting the related tax and account.
+If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in bill line, setting the related tax and account.
Usage
=====
- * Go to Accounting --> Purchases --> Electronic Invoice
+**Italiano**
+
+ * Andare su Contabilità → Acquisti → Fattura elettronica
+ * Caricare un file XML
+ * Visualizzare il contenuto della fattura facendo clic su "Mostra anteprima"
+ * Eseguire la procedura guidata "Importa e-fattura" per creare una fattura in bozza oppure "Collega a fattura esistente" per collegare il file XML a una fattura già (automaticamente) creata
+
+Nell'elenco file delle fatture elettroniche in ingresso saranno presenti, in modo predefinito, quelli da registrare. Sono i file che devono ancora essere collegati a una o più fatture fornitore.
+
+**English**
+
+ * Go to Accounting → Purchases → Electronic Bill
* Upload XML file
- * View invoice content clicking on 'show preview'
- * Run 'import electronic invoice' wizard to create a draft invoice or run 'link to existing supplier invoice' to link the XML file to an already (automatically) created invoice
+ * View bill content clicking on 'Show preview'
+ * Run 'Import e-bill' wizard to create a draft bill or run 'Link to existing bill' to link the XML file to an already (automatically) created bill
-In the incoming electronic invoice files list, by default you will see files to be registered, that is files not yet linked to one or more supplier invoices
+In the incoming electronic bill files list you will see, by default, files to be registered. These are files not yet linked to one or more bills.
Bug Tracker
===========
@@ -98,6 +148,7 @@ Contributors
* Lorenzo Battistini
* Roberto Onnis
* Alessio Gerace
+* Sergio Zanchetta
Maintainers
~~~~~~~~~~~
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 4e2d0ea59064..aec15889b281 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -1,16 +1,19 @@
# Copyright 2015 AgileBG SAGL
# Copyright 2015 innoviu Srl
# Copyright 2018 Lorenzo Battistini
+# Copyright 2018 Sergio Zanchetta (Associazione PNLUG - Gruppo Odoo)
+# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
- 'name': 'Italian Localization - Fattura Elettronica reception',
+ 'name': 'Italian Localization - Fattura Elettronica - Reception',
'version': '12.0.1.0.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Electronic invoices reception',
'author': 'Agile Business Group, Innoviu, '
'Odoo Community Association (OCA)',
- 'website': 'http://github.com/OCA/l10n-italy/',
+ 'website': 'https://github.com/OCA/l10n-italy/tree/12.0/'
+ 'l10n_it_fatturapa_in',
'license': 'LGPL-3',
"depends": [
'l10n_it_fatturapa',
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 3d80c7352a89..78220e4df9d4 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -7,11 +7,11 @@ class AccountInvoice(models.Model):
_inherit = "account.invoice"
fatturapa_attachment_in_id = fields.Many2one(
- 'fatturapa.attachment.in', 'E-Invoice Import File',
+ 'fatturapa.attachment.in', 'E-bill Import File',
ondelete='restrict', copy=False)
inconsistencies = fields.Text('Import Inconsistencies', copy=False)
e_invoice_line_ids = fields.One2many(
- "einvoice.line", "invoice_id", string="Dettaglio Linee",
+ "einvoice.line", "invoice_id", string="Lines detail",
readonly=True, copy=False)
@api.multi
@@ -48,7 +48,7 @@ class fatturapa_article_code(models.Model):
name = fields.Char('Cod Type')
code_val = fields.Char('Code Value')
e_invoice_line_id = fields.Many2one(
- 'einvoice.line', 'Related E-Invoice line', readonly=True
+ 'einvoice.line', 'Related E-bill line', readonly=True
)
@@ -60,14 +60,14 @@ class AccountInvoiceLine(models.Model):
_inherit = "account.invoice.line"
fatturapa_attachment_in_id = fields.Many2one(
- 'fatturapa.attachment.in', 'E-Invoice Import File',
+ 'fatturapa.attachment.in', 'E-bill Import File',
readonly=True, related='invoice_id.fatturapa_attachment_in_id')
class DiscountRisePrice(models.Model):
_inherit = "discount.rise.price"
e_invoice_line_id = fields.Many2one(
- 'einvoice.line', 'Related E-Invoice line', readonly=True
+ 'einvoice.line', 'Related E-bill line', readonly=True
)
@@ -75,37 +75,37 @@ class EInvoiceLine(models.Model):
_name = 'einvoice.line'
_description = 'E-invoice line'
invoice_id = fields.Many2one(
- "account.invoice", "Invoice", readonly=True)
- line_number = fields.Integer('Numero Linea', readonly=True)
- service_type = fields.Char('Tipo Cessione Prestazione', readonly=True)
+ "account.invoice", "Bill", readonly=True)
+ line_number = fields.Integer('Line Number', readonly=True)
+ service_type = fields.Char('Sale Provision Type', readonly=True)
cod_article_ids = fields.One2many(
'fatturapa.article.code', 'e_invoice_line_id',
'Cod. Articles', readonly=True
)
- name = fields.Char("Descrizione", readonly=True)
+ name = fields.Char("Description", readonly=True)
qty = fields.Float(
- "Quantita'", readonly=True,
+ "Quantity", readonly=True,
digits=dp.get_precision('Product Unit of Measure')
)
- uom = fields.Char("Unita' di misura", readonly=True)
- period_start_date = fields.Date("Data Inizio Periodo", readonly=True)
- period_end_date = fields.Date("Data Fine Periodo", readonly=True)
+ uom = fields.Char("Unit of measure", readonly=True)
+ period_start_date = fields.Date("Period Start Date", readonly=True)
+ period_end_date = fields.Date("Period End Date", readonly=True)
unit_price = fields.Float(
- "Prezzo unitario", readonly=True,
+ "Unit Price", readonly=True,
digits=dp.get_precision('Product Price')
)
discount_rise_price_ids = fields.One2many(
'discount.rise.price', 'e_invoice_line_id',
- 'Discount and Rise Price Details', readonly=True
+ 'Discount and Supplement Price Details', readonly=True
)
- total_price = fields.Float("Prezzo Totale", readonly=True)
- tax_amount = fields.Float("Aliquota IVA", readonly=True)
- wt_amount = fields.Char("Ritenuta", readonly=True)
- tax_kind = fields.Char("Natura", readonly=True)
- admin_ref = fields.Char("Riferimento mministrazione", readonly=True)
+ total_price = fields.Float("Total Price", readonly=True)
+ tax_amount = fields.Float("VAT Rate", readonly=True)
+ wt_amount = fields.Char("Tax Withholding", readonly=True)
+ tax_kind = fields.Char("Nature", readonly=True)
+ admin_ref = fields.Char("Administration Reference", readonly=True)
other_data_ids = fields.One2many(
"einvoice.line.other.data", "e_invoice_line_id",
- string="Altri dati gestionali", readonly=True)
+ string="Other Administrative Data", readonly=True)
class EInvoiceLineOtherData(models.Model):
@@ -113,9 +113,9 @@ class EInvoiceLineOtherData(models.Model):
_description = 'E-invoice line other data'
e_invoice_line_id = fields.Many2one(
- 'einvoice.line', 'Related E-Invoice line', readonly=True
+ 'einvoice.line', 'Related E-bill line', readonly=True
)
- name = fields.Char("Tipo Dato", readonly=True)
- text_ref = fields.Char("Riferimento Testo", readonly=True)
- num_ref = fields.Float("Riferimento Numero", readonly=True)
- date_ref = fields.Char("Riferimento Data", readonly=True)
+ name = fields.Char("Data Type", readonly=True)
+ text_ref = fields.Char("Text Reference", readonly=True)
+ num_ref = fields.Float("Number Reference", readonly=True)
+ date_ref = fields.Char("Date Reference", readonly=True)
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 7fa353b1e54f..7ec80e16e351 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -21,9 +21,8 @@ class FatturaPAAttachmentIn(models.Model):
"Invoices number", compute="_compute_xml_data", store=True)
invoices_total = fields.Float(
"Invoices total", compute="_compute_xml_data", store=True,
- help="Se indicato dal fornitore, Importo totale del documento al "
- "netto dell'eventuale sconto e comprensivo di imposta a debito "
- "del cessionario / committente"
+ help="If specified by supplier, total amount of the document net of "
+ "any discount and including tax charged to the buyer/ordered"
)
registered = fields.Boolean(
"Registered", compute="_compute_registered", store=True)
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 065ddf77aaa9..94daab625195 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -6,19 +6,17 @@ class ResCompany(models.Model):
_inherit = 'res.company'
dati_bollo_product_id = fields.Many2one(
- 'product.product', 'Product for Dati Bollo',
- help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento DatiBollo'
+ 'product.product', 'Stamp Data Product',
+ help="Product used to model DatiBollo XML element on bills."
)
cassa_previdenziale_product_id = fields.Many2one(
- 'product.product', 'Product for Dati Cassa Previdenziale',
- help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento DatiCassaPrevidenziale'
+ 'product.product', 'Welfare Fund Data Product',
+ help="Product used to model DatiCassaPrevidenziale XML element "
+ "on bills."
)
sconto_maggiorazione_product_id = fields.Many2one(
- 'product.product', 'Product for Sconto Maggiorazione',
- help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento ScontoMaggiorazione'
+ 'product.product', 'Discount Supplement Product',
+ help="Product used to model ScontoMaggiorazione XML element on bills."
)
@@ -27,23 +25,21 @@ class AccountConfigSettings(models.TransientModel):
dati_bollo_product_id = fields.Many2one(
related='company_id.dati_bollo_product_id',
- string="Product for Dati Bollo",
- help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento DatiBollo',
+ string="Stamp Data Product",
+ help='Product used to model DatiBollo XML element on bills',
readonly=False
)
cassa_previdenziale_product_id = fields.Many2one(
related='company_id.cassa_previdenziale_product_id',
- string="Product for Dati Cassa Previdenziale",
- help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento DatiCassaPrevidenziale',
+ string="Welfare Fund Data Product",
+ help='Product used to model DatiCassaPrevidenziale XML element '
+ 'on bills',
readonly=False
)
sconto_maggiorazione_product_id = fields.Many2one(
related='company_id.sconto_maggiorazione_product_id',
- string="Product for Sconto Maggiorazione",
- help='Prodotto da utilizzare nelle fatture passive quando nell\'XML '
- 'viene valorizzato l\'elemento ScontoMaggiorazione',
+ string="Discount Supplement Product",
+ help='Product used to model ScontoMaggiorazione XML element on bills',
readonly=False
)
diff --git a/l10n_it_fatturapa_in/models/partner.py b/l10n_it_fatturapa_in/models/partner.py
index f1e765e4da80..460d278b9e3a 100644
--- a/l10n_it_fatturapa_in/models/partner.py
+++ b/l10n_it_fatturapa_in/models/partner.py
@@ -7,22 +7,22 @@ class Partner(models.Model):
e_invoice_default_product_id = fields.Many2one(
comodel_name='product.product',
- string='Default product electronic invoice',
+ string='E-bill Default Product',
help="Used by electronic invoice XML import. "
"If filled, generated invoice lines will use this product, when "
"no other possible product is found."
)
e_invoice_detail_level = fields.Selection([
- ('0', 'Minimo'),
+ ('0', 'Minimum'),
# ('1', 'Aliquote'),
- ('2', 'Massimo'),
- ], string="Livello di dettaglio Fatture elettroniche passive",
- help="Livello minimo: La fattura passiva viene creata senza righe; "
- "sara' l'utente a doverle creare in base a quanto indicato dal "
- "fornitore nella fattura elettronica\n"
+ ('2', 'Maximum'),
+ ], string="E-bills Detail Level",
+ help="Minumum level: Bill is created with no lines; "
+ "User will have to create them, according to what specified in "
+ "the electronic bill.\n"
# "Livello Aliquote: viene creata una riga fattura per ogni "
# "aliquota presente nella fattura elettronica\n"
- "Livello Massimo: tutte le righe presenti nella fattura "
- "elettronica vengono create come righe della fattura passiva",
+ "Maximum level: every line contained in the electronic bill "
+ "will create a line in the bill.",
default='2', required=True
)
diff --git a/l10n_it_fatturapa_in/readme/CONFIGURE.rst b/l10n_it_fatturapa_in/readme/CONFIGURE.rst
index 6024e6c477ae..d2984b935836 100644
--- a/l10n_it_fatturapa_in/readme/CONFIGURE.rst
+++ b/l10n_it_fatturapa_in/readme/CONFIGURE.rst
@@ -1,14 +1,33 @@
-Also see the README file of l10n_it_fatturapa module.
+**Italiano**
-For every supplier, it is possible to set the 'details level of electronic invoices':
+Consultare anche il file README del modulo l10n_it_fatturapa.
- - Minimum level: Supplier invoice is created without lines; user will have to create them, according to what specified in electronic invoice
- - Maximum level: every line contained in electronic invoice will create a line in supplier invoice.
+Per ciascun fornitore è possibile impostare il "Livello dettaglio e-fatture":
-Moreover, it is possible, in supplier form, to set the 'default product for electronic invoices': this product will be used, during generation of supplier invoices, when no other possible product is found. Tax and account of invoice line will be set according to what configured in the product.
+ - Livello minimo: la fattura fornitore viene creata senza righe, che dovranno essere create dall'utente in base a quanto indicato nella fattura elettronica
+ - Livello massimo: le righe della fattura fornitore verranno generate a partire da tutte quelle presenti nella fattura elettronica
+
+Nella scheda fornitore è inoltre possibile impostare il "Prodotto predefinito per e-fattura": verrà usato, durante la generazione delle fatture fornitore, quando non sono disponibili altri prodotti adeguati. Il conto e l'imposta della riga fattura verranno impostati in base a quelli configurati nel prodotto.
+
+Tutti i codici prodotto usati dai fornitori possono essere impostati nella relativa scheda, in
+
+Magazzino → Prodotti
+
+Se il fornitore specifica un codice noto nell'XML, questo verrà usato dal sistema per recuperare il prodotto corretto da usare nella riga fattura, impostando il conto e l'imposta collegati.
+
+**English**
+
+See also the README file of l10n_it_fatturapa module.
+
+For every supplier, it is possible to set the 'E-bills Detail Level':
+
+ - Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill
+ - Maximum level: every line contained in electronic bill will create a line in bill
+
+Moreover, in supplier form you can set the 'E-bill Default Product': this product will be used, during generation of bills, when no other possible product is found. Tax and account of bill line will be set according to what configured in the product.
Every product code used by suppliers can be set, in product form, in
-Inventory --> Suppliers
+Inventory → Products
-If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in invoice line, setting the related tax and account.
+If supplier specifies a known code in XML, the system will use it to retrieve the correct product to be used in bill line, setting the related tax and account.
diff --git a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
index b3af0988acfe..9b00be3d2b34 100644
--- a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
+++ b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
@@ -1,3 +1,4 @@
* Lorenzo Battistini
* Roberto Onnis
* Alessio Gerace
+* Sergio Zanchetta
diff --git a/l10n_it_fatturapa_in/readme/DESCRIPTION.rst b/l10n_it_fatturapa_in/readme/DESCRIPTION.rst
index f88850e18642..b92d1008aec3 100644
--- a/l10n_it_fatturapa_in/readme/DESCRIPTION.rst
+++ b/l10n_it_fatturapa_in/readme/DESCRIPTION.rst
@@ -1,7 +1,19 @@
-This module allows to import XML files of electronic invoices, version 1.2
+**Italiano**
+
+Questo modulo consente di importare i file XML delle fatture elettroniche, versione 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
-received through the exchange system (SDI)
+ricevute attraverso il Sistema di Interscambio (SDI)
http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
+
+**English**
+
+This module allows to import XML files of electronic bills, version 1.2
+
+http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm
+
+received through the Exchange System (ES)
+
+http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm
diff --git a/l10n_it_fatturapa_in/readme/INSTALL.rst b/l10n_it_fatturapa_in/readme/INSTALL.rst
index 7da985ac1c84..43f548a1974c 100644
--- a/l10n_it_fatturapa_in/readme/INSTALL.rst
+++ b/l10n_it_fatturapa_in/readme/INSTALL.rst
@@ -1,3 +1,11 @@
-odoo server must run on linux and be able to run
+**Italiano**
+
+Il server Odoo deve essere avviato da un sistema Linux con installato
+
+``openssl``
+
+**English**
+
+Odoo server must run on linux and be able to run
``openssl``
diff --git a/l10n_it_fatturapa_in/readme/USAGE.rst b/l10n_it_fatturapa_in/readme/USAGE.rst
index 3340773af555..1320e0fb71c2 100644
--- a/l10n_it_fatturapa_in/readme/USAGE.rst
+++ b/l10n_it_fatturapa_in/readme/USAGE.rst
@@ -1,6 +1,17 @@
- * Go to Accounting --> Purchases --> Electronic Invoice
+**Italiano**
+
+ * Andare su Contabilità → Acquisti → Fattura elettronica
+ * Caricare un file XML
+ * Visualizzare il contenuto della fattura facendo clic su "Mostra anteprima"
+ * Eseguire la procedura guidata "Importa e-fattura" per creare una fattura in bozza oppure "Collega a fattura esistente" per collegare il file XML a una fattura già (automaticamente) creata
+
+Nell'elenco file delle fatture elettroniche in ingresso saranno presenti, in modo predefinito, quelli da registrare. Sono i file che devono ancora essere collegati a una o più fatture fornitore.
+
+**English**
+
+ * Go to Accounting → Purchases → Electronic Bill
* Upload XML file
- * View invoice content clicking on 'show preview'
- * Run 'import electronic invoice' wizard to create a draft invoice or run 'link to existing supplier invoice' to link the XML file to an already (automatically) created invoice
+ * View bill content clicking on 'Show preview'
+ * Run 'Import e-bill' wizard to create a draft bill or run 'Link to existing bill' to link the XML file to an already (automatically) created bill
-In the incoming electronic invoice files list, by default you will see files to be registered, that is files not yet linked to one or more supplier invoices
+In the incoming electronic bill files list you will see, by default, files to be registered. These are files not yet linked to one or more bills.
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index 364f67320ce0..5877d84cf911 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -4,7 +4,7 @@
-Italian Localization - Fattura Elettronica reception
+Italian Localization - Fattura Elettronica - Reception
-
-
Italian Localization - Fattura Elettronica - Reception
+
+
Italian Localization - Fattura Elettronica - Ricezione
account.invoice.line.fatturapa.in
account.invoice.line
-
+
From e3c5f459f222b407ddde2f374c592174364ea649 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Thu, 7 Mar 2019 11:39:34 +0100
Subject: [PATCH 035/155] [12.0][l10n_it_fatturapa_in] Relax check on tax
natura to permit to import the e-invoice anyway and later change it where
necessary (#1062)
---
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 4e6dfc59acc8..d126ebffd5b0 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -278,17 +278,12 @@ def _prepare_generic_line_data(self, line):
('type_tax_use', '=', 'purchase'),
('kind_id.code', '=', line.Natura),
('amount', '=', 0.0),
- ])
+ ], order='sequence', limit=1)
if not account_taxes:
self.log_inconsistency(
_('No tax with percentage '
'%s and nature %s found. Please configure this tax.')
% (line.AliquotaIVA, line.Natura))
- if len(account_taxes) > 1:
- self.log_inconsistency(
- _('Too many taxes with percentage '
- '%s and nature %s found.')
- % (line.AliquotaIVA, line.Natura))
else:
account_taxes = account_tax_model.search(
[
@@ -297,8 +292,7 @@ def _prepare_generic_line_data(self, line):
('price_include', '=', False),
# partially deductible VAT must be set by user
('children_tax_ids', '=', False),
- ]
- )
+ ], order='sequence')
if not account_taxes:
self.log_inconsistency(
_(
From 101ca835d7f1ce193013a3a82f1086ef1e98b3a7 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Thu, 7 Mar 2019 15:59:12 +0000
Subject: [PATCH 036/155] Translated using Weblate (Italian)
Currently translated at 100.0% (181 of 181 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 53 +++++++++----------
.../i18n/l10n_it_fatturapa_in.pot | 46 +++++++---------
2 files changed, 45 insertions(+), 54 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index a8a78a898ea4..668267040526 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2019-02-12 17:18+0000\n"
+"PO-Revision-Date: 2019-03-07 16:53+0000\n"
"Last-Translator: Sergio Zanchetta \n"
"Language-Team: \n"
"Language: it\n"
@@ -84,7 +84,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:668
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:662
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -104,7 +104,7 @@ msgid "Bill"
msgstr "Fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1140
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1135
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -162,7 +162,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -229,7 +229,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:723
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:717
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -272,7 +272,7 @@ msgid "Display Name"
msgstr "Nome visualizzato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:829
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:823
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -353,7 +353,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1173
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -384,7 +384,7 @@ msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:556
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -526,7 +526,7 @@ msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:313
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:307
#, python-format
msgid ""
"Line '%s': Too many taxes with percentage equals to '%s'.\n"
@@ -626,10 +626,10 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:644
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:638
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
-msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
+msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__tax_kind
@@ -637,7 +637,7 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:806
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:800
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
@@ -651,7 +651,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:890
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:884
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale documento %s e aliquota %s non trovata."
@@ -693,19 +693,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:586
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:580
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1093
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1083
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -872,7 +872,7 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:477
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
@@ -891,7 +891,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:878
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:872
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -925,12 +925,6 @@ msgstr "Anteprima"
msgid "To Register"
msgstr "Da registrare"
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:289
-#, python-format
-msgid "Too many taxes with percentage %s and nature %s found."
-msgstr "Rilevate troppe imposte con aliquota %s e natura %s."
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__total_price
msgid "Total Price"
@@ -1018,7 +1012,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:504
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1029,13 +1023,13 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:486
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:375
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:369
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
@@ -1043,7 +1037,7 @@ msgstr ""
"quella dell'XML."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:304
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:298
#, python-format
msgid ""
"XML contains tax with percentage '%s' but it does not exist in your system"
@@ -1076,6 +1070,9 @@ msgstr "È possibile selezionare solo un file XML da collegare."
msgid "on"
msgstr "il"
+#~ msgid "Too many taxes with percentage %s and nature %s found."
+#~ msgstr "Rilevate troppe imposte con aliquota %s e natura %s."
+
#~ msgid "Product used to model DatiBollo XML element on bills"
#~ msgstr ""
#~ "Prodotto usato come modello per l'elemento XML DatiBollo delle fatture."
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index c5828df66b21..60487fdc81fd 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -72,7 +72,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:668
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:662
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -88,7 +88,7 @@ msgid "Bill"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1141
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1135
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -146,7 +146,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1156
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -213,7 +213,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:723
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:717
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -256,7 +256,7 @@ msgid "Display Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:829
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:823
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -337,7 +337,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1179
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1173
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -368,7 +368,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:556
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -505,7 +505,7 @@ msgid "Last Updated on"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:313
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:307
#, python-format
msgid "Line '%s': Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -595,7 +595,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:644
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:638
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -606,7 +606,7 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:806
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:800
#, python-format
msgid "No currency found with code %s."
msgstr ""
@@ -618,7 +618,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:890
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:884
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -660,19 +660,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:586
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:580
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1089
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1083
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -835,7 +835,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:477
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -851,7 +851,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:878
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:872
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -881,12 +881,6 @@ msgstr ""
msgid "To Register"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:289
-#, python-format
-msgid "Too many taxes with percentage %s and nature %s found."
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__total_price
msgid "Total Price"
@@ -965,7 +959,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:504
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -976,19 +970,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:486
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:375
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:369
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:304
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:298
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
From 2a47450b01eaae9e545a6245997eeddfd4c04494 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Wed, 20 Mar 2019 17:45:04 +0100
Subject: [PATCH 037/155] [12.0][FIX][l10n_it_fatturapa_in] Set the supplier
flag only where necessary when importing purchase invoice (#1122)
---
l10n_it_fatturapa_in/static/description/icon.png | Bin 0 -> 9455 bytes
.../wizard/wizard_import_fatturapa.py | 8 ++++----
2 files changed, 4 insertions(+), 4 deletions(-)
create mode 100644 l10n_it_fatturapa_in/static/description/icon.png
diff --git a/l10n_it_fatturapa_in/static/description/icon.png b/l10n_it_fatturapa_in/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d
GIT binary patch
literal 9455
zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~!
zVpnB`o+K7|Al`Q_U;eD$B
z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qli|NeV(
z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb
zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4
z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{
zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx}
z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov
zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22
zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq
zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t<
z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k
z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp
z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{}
zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N
Xviia!U7SGha1wx#SCgwmn*{w2TRX*I
literal 0
HcmV?d00001
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index d126ebffd5b0..c18483dcc3a8 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -104,7 +104,7 @@ def check_partner_base_data(self, partner_id, DatiAnagrafici):
% (DatiAnagrafici.Anagrafica.Cognome, partner.lastname)
)
- def getPartnerBase(self, DatiAnagrafici):
+ def getPartnerBase(self, DatiAnagrafici, supplier=True):
if not DatiAnagrafici:
return False
partner_model = self.env['res.partner']
@@ -159,7 +159,7 @@ def getPartnerBase(self, DatiAnagrafici):
'vat': vat,
'fiscalcode': cf,
'customer': False,
- 'supplier': True,
+ 'supplier': supplier,
'is_company': (
DatiAnagrafici.Anagrafica.Denominazione and True or False),
'eori_code': DatiAnagrafici.Anagrafica.CodEORI or '',
@@ -1201,7 +1201,7 @@ def importFatturaPA(self):
self.set_StabileOrganizzazione(cedentePrestatore, invoice)
if TaxRappresentative:
tax_partner_id = self.getPartnerBase(
- TaxRappresentative.DatiAnagrafici)
+ TaxRappresentative.DatiAnagrafici, supplier=False)
invoice.write(
{
'tax_representative_id': tax_partner_id
@@ -1209,7 +1209,7 @@ def importFatturaPA(self):
)
if Intermediary:
Intermediary_id = self.getPartnerBase(
- Intermediary.DatiAnagrafici)
+ Intermediary.DatiAnagrafici, supplier=False)
invoice.write(
{
'intermediary': Intermediary_id
From 4b92a3bf52c8ade22b8515f9edeae3453d76d900 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Sat, 9 Feb 2019 10:02:36 +0100
Subject: [PATCH 038/155] [12.0][IMP][l10n_it_fatturapa_in] Format Italian VAT
ID to always have 11 chars
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../i18n/l10n_it_fatturapa_in.pot | 54 ++++----
.../tests/data/IT05979361218_011.xml | 131 ++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 6 +
.../wizard/wizard_import_fatturapa.py | 16 ++-
5 files changed, 177 insertions(+), 32 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_011.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index bf7c2e811fbc..c63963e5275a 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'Italian Localization - Fattura elettronica - Ricezione',
- 'version': '12.0.1.1.5',
+ 'version': '12.0.1.1.6',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 60487fdc81fd..baebc4db4e30 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -72,7 +72,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:662
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:670
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -88,7 +88,7 @@ msgid "Bill"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1135
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -146,7 +146,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1158
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -162,7 +162,7 @@ msgid "Contact"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:156
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:164
#, python-format
msgid "Country Code %s not found in system."
msgstr ""
@@ -213,7 +213,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:717
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:725
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -256,7 +256,7 @@ msgid "Display Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:823
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:831
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -337,7 +337,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1173
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1181
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -368,7 +368,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:558
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -505,7 +505,7 @@ msgid "Last Updated on"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:307
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
#, python-format
msgid "Line '%s': Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -595,7 +595,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:638
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:646
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -606,19 +606,19 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:800
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:808
#, python-format
msgid "No currency found with code %s."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:284
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:292
#, python-format
msgid "No tax with percentage %s and nature %s found. Please configure this tax."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:884
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:892
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -660,19 +660,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:580
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:588
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1083
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -718,7 +718,7 @@ msgid "Progress data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:204
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:212
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr ""
@@ -729,13 +729,13 @@ msgid "Quantity"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:234
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:242
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:193
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:201
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr ""
@@ -824,7 +824,7 @@ msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:222
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:230
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr ""
@@ -835,7 +835,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:479
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -851,7 +851,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:872
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -887,7 +887,7 @@ msgid "Total Price"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:138
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
#, python-format
msgid "Two distinct partners with VAT number %s or Fiscal Code %s already present in db."
msgstr ""
@@ -959,7 +959,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:506
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -970,19 +970,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:488
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:369
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:377
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:298
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:306
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_011.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_011.xml
new file mode 100644
index 000000000000..6742466da6e1
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_011.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 001
+ FPA12
+ UFPQ1O
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ Albo di test
+ TO
+ TO1258B
+ 2010-01-16
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+ IT
+ 3339130126
+
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2015-02-16
+ FT/2015/0006
+
+ TC22
+ 0.00
+ 3.00
+ 3.00
+ 0.00
+ N4
+
+ Rif ordine MAPA: --- Nr. Identificativo Ordine 1234567
+
+
+ 0.00
+ 0.00
+
+
+
+
+ 1
+ Prodotto di test al giorno
+ 15.00
+ Giorno(i)
+ 3.60
+ 54.00
+ 0.00
+ N4
+
+ Vostro RIF
+ Riferimento
+ 3.00
+
+
+ Vostro RIF
+ Riferimento2
+
+
+
+ 0.00
+ N4
+ 57.00
+ 0.00
+ Operazioni senza addebito imposta regime contribuenti minimi art.27 c.1-2 DL.98/11
+
+
+
+ TP01
+
+ MP05
+ 2015-03-18
+ 27.00
+
+
+ MP05
+ 2015-04-17
+ 27.00
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index b973c23046b3..f8a3b14cba56 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -145,6 +145,12 @@ def test_01_xml_import(self):
self.assertEqual(invoice.fiscal_document_type_id.code, 'TD01')
self.assertTrue(invoice.art73)
+ def test_02_xml_import(self):
+ res = self.run_wizard('test02', 'IT05979361218_011.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.intermediary.vat, 'IT03339130126')
+
# def test_02_xml_import(self):
# res = self.run_wizard('test2', 'IT03638121008_X11111.xml')
# invoice_id = res.get('domain')[0][2][0]
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index c18483dcc3a8..863f9b4602ff 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -111,10 +111,18 @@ def getPartnerBase(self, DatiAnagrafici, supplier=True):
cf = DatiAnagrafici.CodiceFiscale or False
vat = False
if DatiAnagrafici.IdFiscaleIVA:
- vat = "%s%s" % (
- DatiAnagrafici.IdFiscaleIVA.IdPaese,
- DatiAnagrafici.IdFiscaleIVA.IdCodice
- )
+ # Format Italian VAT ID to always have 11 char
+ # to avoid validation error when creating the given partner
+ if DatiAnagrafici.IdFiscaleIVA.IdPaese.upper() == 'IT':
+ vat = "%s%s" % (
+ DatiAnagrafici.IdFiscaleIVA.IdPaese,
+ DatiAnagrafici.IdFiscaleIVA.IdCodice.rjust(11, '0')
+ )
+ else:
+ vat = "%s%s" % (
+ DatiAnagrafici.IdFiscaleIVA.IdPaese,
+ DatiAnagrafici.IdFiscaleIVA.IdCodice
+ )
partners = partner_model
if vat:
partners = partner_model.search([
From fe2990f06cc5b89ad320530dd06f022704f2c560 Mon Sep 17 00:00:00 2001
From: sherpya
Date: Mon, 28 Jan 2019 19:13:11 +0100
Subject: [PATCH 039/155] l10n_it_fattura: migration to pyxb 1.2.6
added xsd patch and README.md to generate new bindings
includes workaround for pyxb bug in mindate check
pyxb is unable to check order of dates if only one has timezone
checking if the date > 1970-01-01
we remove tzinfo from parsed date only types as a workaround
---
l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
index 752e850b6b10..7aaa1df7d8ec 100644
--- a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
@@ -51,7 +51,7 @@
TD01
EUR
- 2014-12-18
+ 2014-12-18+01:00
123
LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
From bf8729ca596cc6ed88af80448b2a3b53b32c4a5d Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Fri, 22 Mar 2019 16:17:02 +0100
Subject: [PATCH 040/155] [12.0][IMP][l10n_it_fatturapa_in] Add to a supplier
invoice the validation of the amount when coming from a e-invoice source
---
l10n_it_fatturapa_in/i18n/it.po | 114 +++++++++++++-----
.../i18n/l10n_it_fatturapa_in.pot | 55 ++++++++-
l10n_it_fatturapa_in/models/account.py | 85 ++++++++++++-
l10n_it_fatturapa_in/models/attachment.py | 9 ++
.../tests/test_import_fatturapa_xml.py | 7 ++
l10n_it_fatturapa_in/views/account_view.xml | 20 +++
.../wizard/link_to_existing_invoice.py | 1 +
.../wizard/wizard_import_fatturapa.py | 10 +-
8 files changed, 258 insertions(+), 43 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 668267040526..1aa3aaa96516 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -51,6 +51,11 @@ msgstr "Attivo"
msgid "Administration Reference"
msgstr "Riferimento amministrazione"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Amount Summary"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__cod_article_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -73,7 +78,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:71
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:80
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
@@ -84,7 +89,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:662
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:670
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -104,7 +109,7 @@ msgid "Bill"
msgstr "Fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1135
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1137
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -162,7 +167,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1152
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -178,7 +183,7 @@ msgid "Contact"
msgstr "Contatto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:156
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:164
#, python-format
msgid "Country Code %s not found in system."
msgstr "Codice nazione %s non trovato nel sistema."
@@ -229,7 +234,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:717
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:725
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -272,11 +277,34 @@ msgid "Display Name"
msgstr "Nome visualizzato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:823
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:831
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_validation_error
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_validation_error
+msgid "E Invoice Validation Error"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
+msgid "E-Invoice Tax Amount"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_total
+#, fuzzy
+#| msgid "Invoices total"
+msgid "E-Invoice Total Amount"
+msgstr "Totale fatture"
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_untaxed
+msgid "E-Invoice Untaxed Amount"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
msgid "E-bill Article Code"
@@ -353,7 +381,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1173
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1175
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -378,13 +406,20 @@ msgstr "Follower (canali)"
msgid "Followers (Partners)"
msgstr "Follower (partner)"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_force_validation
+#, fuzzy
+#| msgid "E-invoice line"
+msgid "Force E-Invoice Validation"
+msgstr "Riga e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:550
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:558
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -526,7 +561,7 @@ msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:307
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
#, python-format
msgid ""
"Line '%s': Too many taxes with percentage equals to '%s'.\n"
@@ -626,7 +661,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:638
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:646
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
@@ -637,13 +672,13 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:800
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:808
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:284
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:292
#, python-format
msgid ""
"No tax with percentage %s and nature %s found. Please configure this tax."
@@ -651,7 +686,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:884
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:892
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale documento %s e aliquota %s non trovata."
@@ -686,6 +721,13 @@ msgstr "Numero di messaggi con errore di consegna"
msgid "Number of unread messages"
msgstr "Numero di messaggi non letti"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid ""
+"One or more invoice doesn't match the amount (tax or untaxed or total) of "
+"the original e-invoice. Please check"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -693,19 +735,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:580
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:588
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1083
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -755,7 +797,7 @@ msgid "Progress data"
msgstr "Dati stato avanzamento lavori"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:204
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:212
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr "Provincia ( %s ) non presente nel sistema"
@@ -766,13 +808,13 @@ msgid "Quantity"
msgstr "Quantità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:234
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:242
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr "Codice provincia dell'ufficio REA ( %s ) non presente nel sistema"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:193
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:201
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr "Provincia Albo ( %s ) non presente nel sistema"
@@ -861,7 +903,7 @@ msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr "Il campo cognome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:222
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:230
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr "Regime fiscale %s non presente nel sistema."
@@ -872,7 +914,7 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:471
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:479
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
@@ -891,7 +933,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:872
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -905,6 +947,19 @@ msgstr ""
msgid "The database object this attachment will be attached to."
msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:37
+#, python-format
+msgid "The invoice '%s' doesn't match the related e-invoice"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid ""
+"The invoice doesn't match one of the amount untaxed, tax amount or total "
+"amount of the original e-invoice. Please check"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
msgid "The record id this is attached to."
@@ -931,7 +986,7 @@ msgid "Total Price"
msgstr "Prezzo totale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:138
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
#, python-format
msgid ""
"Two distinct partners with VAT number %s or Fiscal Code %s already present "
@@ -1012,7 +1067,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:498
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:506
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1023,13 +1078,13 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:480
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:488
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:369
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:377
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
@@ -1037,7 +1092,7 @@ msgstr ""
"quella dell'XML."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:298
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:306
#, python-format
msgid ""
"XML contains tax with percentage '%s' but it does not exist in your system"
@@ -1195,9 +1250,6 @@ msgstr "il"
#~ msgid "Invoices"
#~ msgstr "Fatture"
-#~ msgid "Invoices total"
-#~ msgstr "Totale fatture"
-
#~ msgid "Link to Supplier Invoice"
#~ msgstr "Collega a fattura fornitore"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index baebc4db4e30..fcfb67c3b24a 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -39,6 +39,11 @@ msgstr ""
msgid "Administration Reference"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Amount Summary"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__cod_article_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -61,7 +66,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:71
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:80
#, python-format
msgid "Attachment without name"
msgstr ""
@@ -88,7 +93,7 @@ msgid "Bill"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1137
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -146,7 +151,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1158
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1152
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -261,6 +266,27 @@ msgstr ""
msgid "Document type %s not handled."
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_validation_error
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_validation_error
+msgid "E Invoice Validation Error"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
+msgid "E-Invoice Tax Amount"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_total
+msgid "E-Invoice Total Amount"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_untaxed
+msgid "E-Invoice Untaxed Amount"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_article_code
msgid "E-bill Article Code"
@@ -337,7 +363,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1181
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1175
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -362,6 +388,11 @@ msgstr ""
msgid "Followers (Partners)"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_force_validation
+msgid "Force E-Invoice Validation"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "General Data"
@@ -653,6 +684,11 @@ msgstr ""
msgid "Number of unread messages"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "One or more invoice doesn't match the amount (tax or untaxed or total) of the original e-invoice. Please check"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -861,6 +897,17 @@ msgstr ""
msgid "The database object this attachment will be attached to."
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:37
+#, python-format
+msgid "The invoice '%s' doesn't match the related e-invoice"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "The invoice doesn't match one of the amount untaxed, tax amount or total amount of the original e-invoice. Please check"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
msgid "The record id this is attached to."
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 796f1b5e296a..84a5d9f4bb89 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -1,5 +1,7 @@
-from odoo import fields, models, api
+from odoo import fields, models, api, _
+from odoo.exceptions import ValidationError
+from odoo.tools import float_compare
import odoo.addons.decimal_precision as dp
@@ -14,6 +16,57 @@ class AccountInvoice(models.Model):
"einvoice.line", "invoice_id", string="Lines Detail",
readonly=True, copy=False)
+ e_invoice_amount_untaxed = fields.Monetary(
+ string='E-Invoice Untaxed Amount', readonly=True)
+ e_invoice_amount_tax = fields.Monetary(string='E-Invoice Tax Amount',
+ readonly=True)
+ e_invoice_amount_total = fields.Monetary(string='E-Invoice Total Amount',
+ readonly=True)
+ e_invoice_validation_error = fields.Boolean(
+ compute='_compute_e_invoice_validation_error')
+
+ e_invoice_force_validation = fields.Boolean(
+ string='Force E-Invoice Validation')
+
+ @api.multi
+ def invoice_validate(self):
+ for invoice in self:
+ if (invoice.e_invoice_validation_error and
+ not invoice.e_invoice_force_validation):
+ raise ValidationError(
+ _("The invoice '%s' doesn't match the related e-invoice") %
+ invoice.display_name)
+ return super(AccountInvoice, self).invoice_validate()
+
+ @api.depends('amount_untaxed', 'amount_tax', 'amount_total', 'state')
+ def _compute_e_invoice_validation_error(self):
+ for invoice in self:
+ if (invoice.type in ['in_invoice', 'in_refund'] and
+ invoice.state in ['draft', 'open', 'paid'] and
+ invoice.fatturapa_attachment_in_id):
+ if (invoice.e_invoice_amount_untaxed and
+ float_compare(invoice.amount_untaxed,
+ invoice.e_invoice_amount_untaxed,
+ precision_rounding=invoice.currency_id
+ .rounding) != 0):
+ invoice.e_invoice_validation_error = True
+ elif (invoice.e_invoice_amount_tax and
+ float_compare(invoice.amount_tax,
+ invoice.e_invoice_amount_tax,
+ precision_rounding=invoice.currency_id
+ .rounding) != 0):
+ invoice.e_invoice_validation_error = True
+ elif (invoice.e_invoice_amount_total and
+ float_compare(invoice.amount_total,
+ invoice.e_invoice_amount_total,
+ precision_rounding=invoice.currency_id
+ .rounding) != 0):
+ invoice.e_invoice_validation_error = True
+ else:
+ invoice.e_invoice_validation_error = False
+ else:
+ invoice.e_invoice_validation_error = False
+
@api.multi
def name_get(self):
result = super(AccountInvoice, self).name_get()
@@ -39,6 +92,36 @@ def remove_attachment_link(self):
self.fatturapa_attachment_in_id = False
return {'type': 'ir.actions.client', 'tag': 'reload'}
+ @api.model
+ def compute_xml_amount_untaxed(self, DatiRiepilogo):
+ amount_untaxed = 0.0
+ for Riepilogo in DatiRiepilogo:
+ amount_untaxed += float(Riepilogo.ImponibileImporto)
+ return amount_untaxed
+
+ @api.model
+ def compute_xml_amount_tax(self, DatiRiepilogo):
+ amount_tax = 0.0
+ for Riepilogo in DatiRiepilogo:
+ amount_tax += float(Riepilogo.Imposta)
+ return amount_tax
+
+ def set_einvoice_amount(self, fattura):
+ self.ensure_one()
+ amount_untaxed = self.compute_xml_amount_untaxed(
+ fattura.DatiBeniServizi.DatiRiepilogo)
+ amount_tax = self.compute_xml_amount_tax(
+ fattura.DatiBeniServizi.DatiRiepilogo)
+ amount_total = float(
+ fattura.DatiGenerali.DatiGeneraliDocumento.
+ ImportoTotaleDocumento or 0.0)
+
+ self.update({
+ 'e_invoice_amount_untaxed': amount_untaxed,
+ 'e_invoice_amount_tax': amount_tax,
+ 'e_invoice_amount_total': amount_total,
+ })
+
class fatturapa_article_code(models.Model):
# _position = ['2.2.1.3']
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 5daceac43ac7..dc5eca0d0650 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -28,6 +28,15 @@ class FatturaPAAttachmentIn(models.Model):
registered = fields.Boolean(
"Registered", compute="_compute_registered", store=True)
+ e_invoice_validation_error = fields.Boolean(
+ compute='_compute_e_invoice_validation_error')
+
+ @api.depends('in_invoice_ids.e_invoice_validation_error')
+ def _compute_e_invoice_validation_error(self):
+ for rec in self:
+ rec.e_invoice_validation_error = \
+ any(rec.mapped('in_invoice_ids.e_invoice_validation_error'))
+
@api.onchange('datas_fname')
def onchagne_datas_fname(self):
self.name = self.datas_fname
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index f8a3b14cba56..2866c94d4d2f 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -236,6 +236,13 @@ def test_07_xml_import(self):
self.assertAlmostEqual(invoice.amount_untaxed, 1173.60)
self.assertEqual(invoice.amount_tax, 258.19)
self.assertEqual(invoice.amount_total, 1431.79)
+ self.assertAlmostEqual(
+ invoice.e_invoice_amount_untaxed, invoice.amount_untaxed,
+ places=invoice.currency_id.decimal_places)
+ self.assertAlmostEqual(
+ invoice.e_invoice_amount_tax, invoice.amount_tax,
+ places=invoice.currency_id.decimal_places)
+ self.assertEqual(invoice.e_invoice_validation_error, False)
self.assertEqual(invoice.invoice_line_ids[0].admin_ref, 'D122353')
def test_08_xml_import(self):
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 8ba58f01bc2a..c392ceb8383c 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -6,6 +6,10 @@
fatturapa.attachment.in
+
+ One or more invoice doesn't match the amount (tax or untaxed or total) of the original e-invoice. Please check
+
+
@@ -109,6 +113,12 @@
account.invoice
+
+
+ The invoice doesn't match one of the amount untaxed, tax amount or total amount of the original e-invoice. Please check
+
+
+
@@ -126,9 +136,19 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index a1a7b6c1158d..277121a6615f 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -29,6 +29,7 @@ def link(self):
fatturapa_attachment_id)
fatt = self.get_invoice_obj(fatturapa_attachment)
for FatturaBody in fatt.FatturaElettronicaBody:
+ self.invoice_id.set_einvoice_amount(FatturaBody)
# 2.5
AttachmentsData = FatturaBody.Allegati
if AttachmentsData and self.invoice_id:
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 863f9b4602ff..d29b616ee49c 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1117,12 +1117,6 @@ def invoiceCreate(
invoice.compute_taxes()
return invoice_id
- def compute_xml_amount_untaxed(self, DatiRiepilogo):
- amount_untaxed = 0.0
- for Riepilogo in DatiRiepilogo:
- amount_untaxed += float(Riepilogo.ImponibileImporto)
- return amount_untaxed
-
def check_invoice_amount(self, invoice, FatturaElettronicaBody):
if (
FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
@@ -1149,7 +1143,7 @@ def check_invoice_amount(self, invoice, FatturaElettronicaBody):
# DatiGeneraliDocumento.ScontoMaggiorazione is not present,
# because otherwise DatiRiepilogo and odoo invoice total would
# differ
- amount_untaxed = self.compute_xml_amount_untaxed(
+ amount_untaxed = invoice.compute_xml_amount_untaxed(
FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo)
if not float_is_zero(
invoice.amount_untaxed-amount_untaxed, precision_digits=2
@@ -1226,6 +1220,8 @@ def importFatturaPA(self):
new_invoices.append(invoice_id)
self.check_invoice_amount(invoice, fattura)
+ invoice.set_einvoice_amount(fattura)
+
if self.env.context.get('inconsistencies'):
invoice_inconsistencies = (
self.env.context['inconsistencies'])
From 956d85685e5e5d90517496a06c1b502aa27d03a1 Mon Sep 17 00:00:00 2001
From: Gianluigi Tiesi
Date: Fri, 3 May 2019 16:53:06 +0200
Subject: [PATCH 041/155] l10n_it_fatturapa: xml doctor for fatturapa
it fixes:
- removes xs:dateTime if bogus and not mandatory
i.e. 0001-01-01T00:00:00.000+02:00 where python raises
OverflowError
- removes timezone from xs:date to make pyxb able to compare with
1-1-1970, it also removes the need of patching pyxb
- removes space only strings if not mandatory, else replace with
a dash
breaking change:
modules needs to import binding.fatturapa instead of
bindings.fatturapa_v_1_2, this would be asl useful for
new specs
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../tests/data/IT01234567890_FPR03.xml | 2 +-
.../data/IT02780790107_11004_xml_doctor.xml | 208 ++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 31 +++
.../wizard/link_to_existing_invoice.py | 4 +-
.../wizard/wizard_import_fatturapa.py | 8 +-
6 files changed, 249 insertions(+), 6 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT02780790107_11004_xml_doctor.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index c63963e5275a..4cf816e883be 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'Italian Localization - Fattura elettronica - Ricezione',
- 'version': '12.0.1.1.6',
+ 'version': '12.0.1.1.7',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
index 7aaa1df7d8ec..752e850b6b10 100644
--- a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR03.xml
@@ -51,7 +51,7 @@
TD01
EUR
- 2014-12-18+01:00
+ 2014-12-18
123
LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
diff --git a/l10n_it_fatturapa_in/tests/data/IT02780790107_11004_xml_doctor.xml b/l10n_it_fatturapa_in/tests/data/IT02780790107_11004_xml_doctor.xml
new file mode 100644
index 000000000000..6c782eb247fe
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT02780790107_11004_xml_doctor.xml
@@ -0,0 +1,208 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ 00001
+ FPA12
+ UFPQ1O
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+
+ IT
+ 03339130126
+
+ 03339130126
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+ IT
+ 03339130126
+
+ 03339130126
+
+ Rappresentante fiscale
+ 1234567890123
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18+01:00
+ 123
+
+ TC01
+ 4.00
+ 9.00
+ 22.00
+ rif. amm
+
+
+ SI
+
+
+ 1
+ 66685
+ 1
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 2012-09-01
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+ 1
+ 123
+ 5
+ 123abc
+ 456def
+
+
+
+
+ IT
+ 05714511002
+
+
+ Trasporto spa
+
+
+ KGM
+ DAP
+
+ strada dei test
+
+ 12042
+ Bra
+ CN
+ IT
+
+ 0001-01-01T00:00:00.000+02:00
+
+
+
+
+ 1
+
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 34.00
+ 7.48
+ D
+
+
+
+ TP01
+
+ MP05
+ 2015-04-30
+ 20.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 2.00
+ 2015-05-01
+
+
+ MP05
+ 2015-05-30
+ 9.00
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 1.00
+ 2015-05-31
+
+
+
+ TP02
+
+ MP05
+ 2015-06-30
+ 1.50
+ Bank Test
+ IT28V0100003245232200001200
+ GEBABEBB
+ 0.15
+ 2015-07-01+02:00
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 2866c94d4d2f..365ec9d59db5 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -480,3 +480,34 @@ def test_21_xml_import(self):
self.assertEqual(invoice.inconsistencies, '')
self.assertEqual(invoice.invoice_line_ids[2].price_unit, 0.0)
self.assertEqual(invoice.invoice_line_ids[2].discount, 0.0)
+
+ def test_22_xml_import(self):
+ res = self.run_wizard('test22', 'IT02780790107_11004_xml_doctor.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+
+ self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
+
+ self.assertIn('removed timezone information', invoice.inconsistencies)
+
+ # DatiGeneraliDocumento/Causale
+ self.assertEqual(invoice.comment, '')
+
+ # DatiGeneraliDocumento/Data
+ self.assertEqual(invoice.date_invoice, '2014-12-18')
+
+ # DatiTrasporto/IndirizzoResa/NumeroCivico
+ self.assertEqual(invoice.delivery_address,
+ 'strada dei test, \n12042 - Bra\nCN IT')
+
+ # DatiTrasporto/DataOraConsegna
+ self.assertFalse(invoice.delivery_datetime)
+
+ # DatiBeniServizi/DettaglioLinee/Descrizione
+ self.assertEqual(invoice.invoice_line_ids[0].name, '-')
+
+ # DatiPagamento/DettaglioPagamento/DataDecorrenzaPenale
+ payment_data = self.env['fatturapa.payment.data'].search(
+ [('invoice_id', '=', invoice.id)])
+ self.assertEqual(payment_data[0].payment_methods[0].penalty_date,
+ '2015-05-01')
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index 277121a6615f..5fea3ed51057 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -2,7 +2,7 @@
from odoo import models, api, fields
from odoo.tools.translate import _
from odoo.exceptions import UserError
-from odoo.addons.l10n_it_fatturapa.bindings import fatturapa_v_1_2
+from odoo.addons.l10n_it_fatturapa.bindings import fatturapa
class WizardLinkToInvoice(models.TransientModel):
@@ -13,7 +13,7 @@ class WizardLinkToInvoice(models.TransientModel):
def get_invoice_obj(self, fatturapa_attachment):
xml_string = fatturapa_attachment.get_xml_string()
- return fatturapa_v_1_2.CreateFromDocument(xml_string)
+ return fatturapa.CreateFromDocument(xml_string)
@api.multi
def link(self):
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index d29b616ee49c..7e99b4ce94a7 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -5,7 +5,7 @@
from odoo.tools.translate import _
from odoo.exceptions import UserError
-from odoo.addons.l10n_it_fatturapa.bindings import fatturapa_v_1_2
+from odoo.addons.l10n_it_fatturapa.bindings import fatturapa
from odoo.addons.base_iban.models.res_partner_bank import pretty_iban
_logger = logging.getLogger(__name__)
@@ -1156,7 +1156,7 @@ def check_invoice_amount(self, invoice, FatturaElettronicaBody):
def get_invoice_obj(self, fatturapa_attachment):
xml_string = fatturapa_attachment.get_xml_string()
- return fatturapa_v_1_2.CreateFromDocument(xml_string)
+ return fatturapa.CreateFromDocument(xml_string)
@api.multi
def importFatturaPA(self):
@@ -1189,6 +1189,10 @@ def importFatturaPA(self):
generic_inconsistencies = (
self.env.context['inconsistencies'] + '\n\n')
+ xmlproblems = getattr(fatt, '_xmldoctor', None)
+ if xmlproblems: # None or []
+ generic_inconsistencies += '\n'.join(xmlproblems) + '\n\n'
+
# 2
for fattura in fatt.FatturaElettronicaBody:
From 45efb004e01693dbe36884a18dcc6975929f5b66 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Thu, 23 May 2019 09:15:43 +0200
Subject: [PATCH 042/155] FIX
File "/home/travis/build/eLBati/l10n-italy/l10n_it_fatturapa/bindings/fatturapa.py", line 8, in
from binding import * # noqa: F403
ImportError: No module named 'binding'
2019-05-23 07:25:57,622 6790 ERROR openerp_test odoo.addons.l10n_it_fatturapa_in.tests.test_import_fatturapa_xml: ` File "/home/travis/build/eLBati/l10n-italy/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py", line 497, in test_22_xml_import
2019-05-23 07:25:57,622 6790 ERROR openerp_test odoo.addons.l10n_it_fatturapa_in.tests.test_import_fatturapa_xml: ` self.assertEqual(invoice.date_invoice, '2014-12-18')
2019-05-23 07:25:57,622 6790 ERROR openerp_test odoo.addons.l10n_it_fatturapa_in.tests.test_import_fatturapa_xml: ` AssertionError: datetime.date(2014, 12, 18) != '2014-12-18'
---
l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 365ec9d59db5..bae9ae3d3c19 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -494,7 +494,7 @@ def test_22_xml_import(self):
self.assertEqual(invoice.comment, '')
# DatiGeneraliDocumento/Data
- self.assertEqual(invoice.date_invoice, '2014-12-18')
+ self.assertEqual(invoice.date_invoice, date(2014, 12, 18))
# DatiTrasporto/IndirizzoResa/NumeroCivico
self.assertEqual(invoice.delivery_address,
@@ -510,4 +510,4 @@ def test_22_xml_import(self):
payment_data = self.env['fatturapa.payment.data'].search(
[('invoice_id', '=', invoice.id)])
self.assertEqual(payment_data[0].payment_methods[0].penalty_date,
- '2015-05-01')
+ date(2015, 5, 1))
From bdbbbbfc1a09b71204ad3b7dbf5df37a49f33e8d Mon Sep 17 00:00:00 2001
From: eLBati
Date: Wed, 13 Feb 2019 09:46:05 +0100
Subject: [PATCH 043/155] Restore DatiCassaPrevidenziale handling: when
present, add it as invoice line. Reverting part of
https://github.com/OCA/l10n-italy/pull/703
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 81 +++++++++++--------
.../i18n/l10n_it_fatturapa_in.pot | 48 ++++++++---
l10n_it_fatturapa_in/models/company.py | 16 ++++
.../tests/test_import_fatturapa_xml.py | 28 +++----
l10n_it_fatturapa_in/views/company_view.xml | 4 +
.../wizard/wizard_import_fatturapa.py | 30 ++++++-
7 files changed, 147 insertions(+), 62 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 4cf816e883be..f369afc84b29 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'Italian Localization - Fattura elettronica - Ricezione',
- 'version': '12.0.1.1.7',
+ 'version': '12.0.1.2.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 1aa3aaa96516..dda457f19800 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -109,7 +109,7 @@ msgid "Bill"
msgstr "Fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1137
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1163
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -167,7 +167,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1152
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -381,7 +381,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1175
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1201
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -560,16 +560,6 @@ msgstr "Ultimo aggiornamento di"
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
-#, python-format
-msgid ""
-"Line '%s': Too many taxes with percentage equals to '%s'.\n"
-"Fix it if required"
-msgstr ""
-"Riga \"%s\": troppe imposte con aliquota pari a\"%s\".\n"
-"Correggere se necessario"
-
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Line Detail"
@@ -741,13 +731,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -777,6 +767,14 @@ msgstr "Data inizio periodo"
msgid "Preview link"
msgstr "Collegamento di anteprima"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__cassa_previdenziale_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__cassa_previdenziale_product_id
+msgid "Product used to model DatiCassaPrevidenziale XML element on bills."
+msgstr ""
+"Prodotto usato come modello per l'elemento XML DatiCassaPrevidenziale delle "
+"fatture."
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__sconto_maggiorazione_product_id
msgid "Product used to model ScontoMaggiorazione XML element on bills"
@@ -980,6 +978,19 @@ msgstr "Anteprima"
msgid "To Register"
msgstr "Da registrare"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
+#, fuzzy, python-format
+#| msgid ""
+#| "Line '%s': Too many taxes with percentage equals to '%s'.\n"
+#| "Fix it if required"
+msgid ""
+"Too many taxes with percentage equals to '%s'.\n"
+"Fix it if required"
+msgstr ""
+"Riga \"%s\": troppe imposte con aliquota pari a\"%s\".\n"
+"Correggere se necessario"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__total_price
msgid "Total Price"
@@ -1072,17 +1083,39 @@ msgstr "Cassa previdenziale"
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__cassa_previdenziale_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__cassa_previdenziale_product_id
+msgid "Welfare Fund Data Product"
+msgstr "Prodotto per dati cassa previdenziale"
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:940
+#, python-format
+msgid ""
+"Welfare Fund data %s has withholding tax but no withholding tax was found in "
+"the system."
+msgstr ""
+"I dati cassa previdenziale %s hanno la ritenuta d'acconto ma non sono "
+"presenti nel sistema."
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:488
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:932
+#, python-format
+msgid "Welfare Fund: %s"
+msgstr "Cassa previdenziale: %s"
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:377
#, python-format
@@ -1141,30 +1174,12 @@ msgstr "il"
#~ "Prodotto usato come modello per l'elemento XML DatiCassaPrevidenziale "
#~ "delle fatture."
-#~ msgid "Product used to model DatiCassaPrevidenziale XML element on bills."
-#~ msgstr ""
-#~ "Prodotto usato come modello per l'elemento XML DatiCassaPrevidenziale "
-#~ "delle fatture."
-
#~ msgid "Stamp Data Product"
#~ msgstr "Prodotto per dati bollo"
#~ msgid "Stamp duty payed under the MEF Decree June 17, 2014 (art. 6)"
#~ msgstr "Bollo assolto ai sensi del decreto MEF 17 giugno 2014 (art. 6)"
-#~ msgid "Welfare Fund Data Product"
-#~ msgstr "Prodotto per dati cassa previdenziale"
-
-#~ msgid ""
-#~ "Welfare Fund data %s has withholding tax but no withholding tax was found "
-#~ "in the system."
-#~ msgstr ""
-#~ "I dati cassa previdenziale %s hanno la ritenuta d'acconto ma non sono "
-#~ "presenti nel sistema."
-
-#~ msgid "Welfare Fund: %s"
-#~ msgstr "Cassa previdenziale: %s"
-
#~ msgid "Aliquota IVA"
#~ msgstr "Aliquota IVA"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index fcfb67c3b24a..740d9a367ab0 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -93,7 +93,7 @@ msgid "Bill"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1137
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1163
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -151,7 +151,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1152
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -363,7 +363,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1175
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1201
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -535,13 +535,6 @@ msgstr ""
msgid "Last Updated on"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
-#, python-format
-msgid "Line '%s': Too many taxes with percentage equals to '%s'.\n"
-"Fix it if required"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Line Detail"
@@ -702,13 +695,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -738,6 +731,12 @@ msgstr ""
msgid "Preview link"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__cassa_previdenziale_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__cassa_previdenziale_product_id
+msgid "Product used to model DatiCassaPrevidenziale XML element on bills."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__sconto_maggiorazione_product_id
msgid "Product used to model ScontoMaggiorazione XML element on bills"
@@ -928,6 +927,13 @@ msgstr ""
msgid "To Register"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
+#, python-format
+msgid "Too many taxes with percentage equals to '%s'.\n"
+"Fix it if required"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__total_price
msgid "Total Price"
@@ -1011,17 +1017,35 @@ msgstr ""
msgid "Welfare Fund %s not present in your system."
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__cassa_previdenziale_product_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__cassa_previdenziale_product_id
+msgid "Welfare Fund Data Product"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Welfare Fund Details"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:940
+#, python-format
+msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:488
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:932
+#, python-format
+msgid "Welfare Fund: %s"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:377
#, python-format
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 9e43a156c43f..5b1dac6da8e7 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -4,6 +4,11 @@
class ResCompany(models.Model):
_inherit = 'res.company'
+ cassa_previdenziale_product_id = fields.Many2one(
+ 'product.product', 'Welfare Fund Data Product',
+ help="Product used to model DatiCassaPrevidenziale XML element "
+ "on bills."
+ )
sconto_maggiorazione_product_id = fields.Many2one(
'product.product', 'Discount Supplement Product',
help="Product used to model ScontoMaggiorazione XML element on bills."
@@ -12,6 +17,12 @@ class ResCompany(models.Model):
class AccountConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
+ cassa_previdenziale_product_id = fields.Many2one(
+ related='company_id.cassa_previdenziale_product_id',
+ string="Welfare Fund Data Product",
+ help="Product used to model DatiCassaPrevidenziale XML element "
+ "on bills.", readonly=False
+ )
sconto_maggiorazione_product_id = fields.Many2one(
related='company_id.sconto_maggiorazione_product_id',
string="Discount Supplement Product",
@@ -24,10 +35,15 @@ def onchange_company_id(self):
res = super(AccountConfigSettings, self).onchange_company_id()
if self.company_id:
company = self.company_id
+ self.cassa_previdenziale_product_id = (
+ company.cassa_previdenziale_product_id and
+ company.cassa_previdenziale_product_id.id or False
+ )
self.sconto_maggiorazione_product_id = (
company.sconto_maggiorazione_product_id and
company.sconto_maggiorazione_product_id.id or False
)
else:
+ self.cassa_previdenziale_product_id = False
self.sconto_maggiorazione_product_id = False
return res
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index bae9ae3d3c19..1bd9c0486cbf 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -73,6 +73,8 @@ def run_wizard_multi(self, file_name_list):
return wizard.importFatturaPA()
def test_00_xml_import(self):
+ self.env.user.company_id.cassa_previdenziale_product_id = (
+ self.service.id)
res = self.run_wizard('test0', 'IT05979361218_001.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
@@ -80,11 +82,17 @@ def test_00_xml_import(self):
self.assertEqual(
invoice.partner_id.register_fiscalpos.code, 'RF02')
self.assertEqual(invoice.reference, 'FT/2015/0006')
- self.assertEqual(invoice.amount_total, 54.00)
+ self.assertEqual(invoice.amount_total, 57.00)
self.assertEqual(invoice.gross_weight, 0.00)
self.assertEqual(invoice.net_weight, 0.00)
self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, 'N4')
self.assertFalse(invoice.art73)
+ welfare_found = False
+ for line in invoice.invoice_line_ids:
+ if line.product_id.id == self.service.id:
+ self.assertEqual(line.price_unit, 3)
+ welfare_found = True
+ self.assertTrue(welfare_found)
self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
self.assertEqual(
invoice.e_invoice_line_ids[0].name, 'Prodotto di test al giorno')
@@ -110,15 +118,13 @@ def test_01_xml_import(self):
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.reference, '123')
- self.assertEqual(invoice.amount_untaxed, 25.00)
- self.assertEqual(invoice.amount_tax, 5.5)
+ self.assertEqual(invoice.amount_untaxed, 34.00)
+ self.assertEqual(invoice.amount_tax, 7.48)
self.assertEqual(
len(invoice.invoice_line_ids[0].invoice_line_tax_ids), 1)
self.assertEqual(
invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name,
'22% e-bill')
- # supplier sets DatiCassaPrevidenziale, includes its amount in invoice
- # total, but does not add it as invoice line
self.assertEqual(
invoice.fatturapa_summary_ids[0].amount_untaxed, 34.00)
self.assertEqual(
@@ -193,9 +199,7 @@ def test_04_xml_import(self):
self.assertEqual(
invoice.inconsistencies,
u"Company Name field contains 'Societa\' "
- u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n"
- u"Computed amount untaxed 25.0 is different from summary data "
- u"26.0")
+ u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n")
def test_05_xml_import(self):
res = self.run_wizard('test5', 'IT05979361218_003.xml')
@@ -324,15 +328,11 @@ def test_13_xml_import(self):
self.assertEqual(
invoice1.inconsistencies,
u"Company Name field contains 'Societa\' "
- u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n"
- u"Computed amount untaxed 25.0 is different from summary data "
- u"26.0")
+ u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n")
self.assertEqual(
invoice2.inconsistencies,
u"Company Name field contains 'Societa\' "
- u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n"
- u"Computed amount untaxed 25.0 is different from summary data "
- u"26.0")
+ u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n")
def test_14_xml_import(self):
# check: no tax code found , write inconsisteance and anyway
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 323bd245a175..6ba336c43839 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -19,6 +19,10 @@
Default products used in electronic supplier invoices
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 7e99b4ce94a7..28f34fb109ad 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -313,9 +313,9 @@ def _prepare_generic_line_data(self, line):
if len(account_taxes) > 1:
# just logging because this is an usual case: see split payment
_logger.warning(_(
- "Line '%s': Too many taxes with percentage equals "
+ "Too many taxes with percentage equals "
"to '%s'.\nFix it if required"
- ) % (line.Descrizione, line.AliquotaIVA))
+ ) % line.AliquotaIVA)
# if there are multiple taxes with same percentage
# and there is a default tax with this percentage,
# set taxes list equal to supplier_taxes_id, loaded before
@@ -927,6 +927,32 @@ def invoiceCreate(
WalferLineVals = self._prepareWelfareLine(
invoice_id, walfareLine)
WelfareFundLineModel.create(WalferLineVals)
+ line_vals = self._prepare_generic_line_data(walfareLine)
+ line_vals.update({
+ 'name': _(
+ "Welfare Fund: %s") % walfareLine.TipoCassa,
+ 'price_unit': float(walfareLine.ImportoContributoCassa),
+ 'invoice_id': invoice.id,
+ 'account_id': credit_account_id,
+ })
+ if walfareLine.Ritenuta:
+ if not wt_found:
+ raise UserError(_(
+ "Welfare Fund data %s has withholding tax but no "
+ "withholding tax was found in the system."
+ % walfareLine.TipoCassa))
+ line_vals['invoice_line_tax_wt_ids'] = [
+ (6, 0, [wt_found.id])]
+ if self.env.user.company_id.cassa_previdenziale_product_id:
+ cassa_previdenziale_product = (
+ self.env.user.company_id.cassa_previdenziale_product_id
+ )
+ line_vals['product_id'] = cassa_previdenziale_product.id
+ line_vals['name'] = cassa_previdenziale_product.name
+ self.adjust_accounting_data(
+ cassa_previdenziale_product, line_vals
+ )
+ self.env['account.invoice.line'].create(line_vals)
# 2.1.2
relOrders = FatturaBody.DatiGenerali.DatiOrdineAcquisto
From 620daddb261a877bd68aa1005a86f2cc29521da5 Mon Sep 17 00:00:00 2001
From: SimoRubi
Date: Tue, 4 Jun 2019 13:05:16 +0200
Subject: [PATCH 044/155] [FIX] l10n_it_fatturapa: Remove newlines from base64
file before decoding
---
.../data/IT01234567890_FPR04.base64.xml.p7m | 196 ++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 9 +
2 files changed, 205 insertions(+)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.base64.xml.p7m
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.base64.xml.p7m b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.base64.xml.p7m
new file mode 100644
index 000000000000..00d53a6adfa3
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.base64.xml.p7m
@@ -0,0 +1,196 @@
+MIIkBgYJKoZIhvcNAQcCoIIj9zCCI/MCAQExDTALBglghkgBZQMEAgEwghm3Bgk
+qhkiG9w0BBwGgghmoBIIZpDw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9Il
+VURi04Ij8+CjxwOkZhdHR1cmFFbGV0dHJvbmljYSB2ZXJzaW9uZT0iRlBSMTIiI
+HhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiB4
+bWxuczpwPSJodHRwOi8vaXZhc2Vydml6aS5hZ2VuemlhZW50cmF0ZS5nb3YuaXQ
+vZG9jcy94c2QvZmF0dHVyZS92MS4yIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudz
+Mub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZW1hTG9jYXRpb
+249Imh0dHA6Ly9pdmFzZXJ2aXppLmFnZW56aWFlbnRyYXRlLmdvdi5pdC9kb2Nz
+L3hzZC9mYXR0dXJlL3YxLjIgaHR0cDovL3d3dy5mYXR0dXJhcGEuZ292Lml0L2V
+4cG9ydC9mYXR0dXJhemlvbmUvc2RpL2ZhdHR1cmFwYS92MS4yL1NjaGVtYV9kZW
+xfZmlsZV94bWxfRmF0dHVyYVBBX3ZlcnNpb25lXzEuMi54c2QiPgogIDxGYXR0d
+XJhRWxldHRyb25pY2FIZWFkZXI+CiAgICA8RGF0aVRyYXNtaXNzaW9uZT4KICAg
+ICAgPElkVHJhc21pdHRlbnRlPgogICAgICAgIDxJZFBhZXNlPklUPC9JZFBhZXN
+lPgogICAgICAgIDxJZENvZGljZT4wNTk3OTM2MTIxODwvSWRDb2RpY2U+CiAgIC
+AgIDwvSWR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MTAwNjElMCMGA1UEAwwcSW5mb0NlcnQgRmlybWEgUXVhbG
+lmaWNhdGEgMgIEAJlpODANBglghkgBZQMEAgEFAKCCAT4wGAYJKoZIhvcNAQkDM
+QsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTgxMjIxMTU1ODEzWjAvBgkq
+hkiG9w0BCQQxIgQgNOm1eVRN+DqSfoOxwlk6r+TguNLak0hU+Lf4SaAMwxUwgdI
+GCyqGSIb3DQEJEAIvMYHCMIG/MIG8MIG5BCCSL/SmwV+hCfetFWZgJp3KfvusfJ
+zeD4S3B4nKkumawjCBlDCBi6SBiDCBhTELMAkGA1UEBhMCSVQxFTATBgNVBAoMD
+ElORk9DRVJUIFNQQTEiMCAGA1UECwwZQ2VydGlmaWNhdG9yZSBBY2NyZWRpdGF0
+bzEUMBIGA1UEBRMLMDc5NDUyMTEwMDYxJTAjBgNVBAMMHEluZm9DZXJ0IEZpcm1
+hIFF1YWxpZmljYXRhIDICBACZaTgwDQYJKoZIhvcNAQELBQAEggEABrraEzS4n6
+SW2S9C5e0lEnqJehEEz4riodSsf79ZpNLsjZ88NMkQHR/Gy+q306NFA0KopfSKg
+RmnbMXNKj1hSmLKaI7O6R+vfAwTs15/3VBaK86zCvzr1ig2zOSk2wlo2o64EiId
+qDtOi9C7kTKIp4mC74QSLQvQf4dxA6mxzrw3jM9Su3nodwNq637rRcqverBPMK0
+ViEWIZyjzp/eClugD+ngGSmcEEImOE2aAXwPZTH8lhgPECTE10q2hc4567ZBdRj
+EevLisiqLSY6NuE137XOeradGUB44iV/YCFO77HakttpcnZ8SkEausjuWIH3/y/
+BUi2EVDR4jtbdDTkA==
\ No newline at end of file
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 1bd9c0486cbf..7a2fb9b76965 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -511,3 +511,12 @@ def test_22_xml_import(self):
[('invoice_id', '=', invoice.id)])
self.assertEqual(payment_data[0].payment_methods[0].penalty_date,
date(2015, 5, 1))
+
+ def test_23_xml_import(self):
+ # Testing CAdES signature, base64 encoded with newlines
+ res = self.run_wizard(
+ 'test23', 'IT01234567890_FPR04.base64.xml.p7m',
+ 'IT01234567890_FPR04.xml.p7m')
+ invoice_ids = res.get('domain')[0][2]
+ invoices = self.invoice_model.browse(invoice_ids)
+ self.assertEqual(len(invoices), 2)
From 3fd56a304016f2187f77f183ad53b72b3a9cb25a Mon Sep 17 00:00:00 2001
From: SimoRubi
Date: Tue, 4 Jun 2019 14:36:50 +0200
Subject: [PATCH 045/155] [REF] l10n_it_fatturapa_in: Fix lint warnings
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/models/account.py | 2 +-
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index f369afc84b29..d5d34e068813 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'Italian Localization - Fattura elettronica - Ricezione',
- 'version': '12.0.1.2.0',
+ 'version': '12.0.1.2.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 84a5d9f4bb89..a4d852df1668 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -123,7 +123,7 @@ def set_einvoice_amount(self, fattura):
})
-class fatturapa_article_code(models.Model):
+class FatturapaArticleCode(models.Model):
# _position = ['2.2.1.3']
_name = "fatturapa.article.code"
_description = 'E-bill Article Code'
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 28f34fb109ad..bd3579f87897 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -408,7 +408,7 @@ def _prepareInvoiceLine(self, credit_account_id, line, wt_found=False):
return retLine
- def _prepareRelDocsLine(self, invoice_id, line, type):
+ def _prepareRelDocsLine(self, invoice_id, line, doc_type):
res = []
lineref = line.RiferimentoNumeroLinea or False
IdDoc = line.IdDocumento or 'Error'
@@ -430,7 +430,7 @@ def _prepareRelDocsLine(self, invoice_id, line, type):
if invoice_lines:
invoice_lineid = invoice_lines[0].id
val = {
- 'type': type,
+ 'type': doc_type,
'name': IdDoc,
'lineRef': numline,
'invoice_line_id': invoice_lineid,
@@ -444,7 +444,7 @@ def _prepareRelDocsLine(self, invoice_id, line, type):
res.append(val)
else:
val = {
- 'type': type,
+ 'type': doc_type,
'name': IdDoc,
'invoice_line_id': invoice_lineid,
'invoice_id': invoice_id,
@@ -509,14 +509,14 @@ def _prepareWelfareLine(self, invoice_id, line):
return res
- def _prepareDiscRisePriceLine(self, id, line):
+ def _prepareDiscRisePriceLine(self, line_id, line):
Tipo = line.Tipo or False
Percentuale = line.Percentuale and float(line.Percentuale) or 0.0
Importo = line.Importo and float(line.Importo) or 0.0
res = {
'percentage': Percentuale,
'amount': Importo,
- self.env.context.get('drtype'): id,
+ self.env.context.get('drtype'): line_id,
}
res['name'] = Tipo
From 79c88343593c7951c4671a346a1fb22554424862 Mon Sep 17 00:00:00 2001
From: Lorenzo Battistini
Date: Wed, 26 Jun 2019 06:49:28 +0000
Subject: [PATCH 046/155] Translated using Weblate (Italian)
Currently translated at 95.3% (184 of 193 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index dda457f19800..896f7f046f1f 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2019-03-07 16:53+0000\n"
-"Last-Translator: Sergio Zanchetta \n"
+"PO-Revision-Date: 2019-06-26 09:42+0000\n"
+"Last-Translator: Lorenzo Battistini \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.4\n"
+"X-Generator: Weblate 3.6.1\n"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
@@ -980,15 +980,12 @@ msgstr "Da registrare"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
-#, fuzzy, python-format
-#| msgid ""
-#| "Line '%s': Too many taxes with percentage equals to '%s'.\n"
-#| "Fix it if required"
+#, python-format
msgid ""
"Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
msgstr ""
-"Riga \"%s\": troppe imposte con aliquota pari a\"%s\".\n"
+"Troppe imposte con aliquota uguale a\"%s\".\n"
"Correggere se necessario"
#. module: l10n_it_fatturapa_in
From f68f026cc3b1cb73e8b7e91f8a96567d273fa4e4 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Tue, 26 Mar 2019 17:35:40 +0100
Subject: [PATCH 047/155] FIX l10n_it_fatturapa_in: log inconsistency when
multiple exemption taxes are found, so that user is informed IMP module name
---
l10n_it_fatturapa_in/README.rst | 6 +--
l10n_it_fatturapa_in/__manifest__.py | 4 +-
.../i18n/l10n_it_fatturapa_in.pot | 50 +++++++++++--------
.../static/description/index.html | 6 +--
.../wizard/wizard_import_fatturapa.py | 9 +++-
5 files changed, 44 insertions(+), 31 deletions(-)
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index 84e315f1c5b0..f5b30b55b77b 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -1,6 +1,6 @@
-======================================================
-Italian Localization - Fattura elettronica - Ricezione
-======================================================
+=====================================
+ITA - Fattura elettronica - Ricezione
+=====================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index d5d34e068813..06697a5a5636 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -5,8 +5,8 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
- 'name': 'Italian Localization - Fattura elettronica - Ricezione',
- 'version': '12.0.1.2.1',
+ 'name': 'ITA - Fattura elettronica - Ricezione',
+ 'version': '12.0.1.3.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 740d9a367ab0..e2472dc93ffe 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -77,7 +77,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:670
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:677
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -93,7 +93,7 @@ msgid "Bill"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1163
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1170
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -151,7 +151,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1185
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -218,7 +218,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:725
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:732
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -261,7 +261,7 @@ msgid "Display Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:831
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:838
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -363,7 +363,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1201
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1208
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -399,7 +399,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:558
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:565
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -619,7 +619,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:646
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:653
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -630,7 +630,7 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:808
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:815
#, python-format
msgid "No currency found with code %s."
msgstr ""
@@ -642,7 +642,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:892
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:899
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -689,19 +689,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:588
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:595
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1124
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -870,7 +870,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:479
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:486
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -886,7 +886,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:887
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -928,7 +928,13 @@ msgid "To Register"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:315
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:297
+#, python-format
+msgid "Too many taxes with percentage %s and nature %s found. Tax %s with lower priority has been set on invoice lines."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:322
#, python-format
msgid "Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -1012,7 +1018,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:506
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:513
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -1029,31 +1035,31 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:940
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:947
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:488
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:495
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:932
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:939
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:377
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:384
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:306
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:313
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index f060d4f193a4..b08f291b8e4e 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -4,7 +4,7 @@
-Italian Localization - Fattura elettronica - Ricezione
+ITA - Fattura elettronica - Ricezione
-
-
Italian Localization - Fattura elettronica - Ricezione
+
+
ITA - Fattura elettronica - Ricezione
Date: Mon, 29 Apr 2019 16:51:17 +0200
Subject: [PATCH 053/155] [IMP] l10n_it_fatturapa_in: Write einvoice's data in
supplier bill during link Write only data in "e-invoce details" tab Allow
multiple invoices to be linked Refactoring import methods, to be used for
link too Improve error management
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../i18n/l10n_it_fatturapa_in.pot | 129 ++++-
l10n_it_fatturapa_in/models/account.py | 125 +++-
l10n_it_fatturapa_in/models/attachment.py | 21 +-
.../tests/test_import_fatturapa_xml.py | 72 ++-
l10n_it_fatturapa_in/views/account_view.xml | 4 +-
.../wizard/link_to_existing_invoice.py | 144 ++++-
.../wizard/link_to_existing_invoice.xml | 37 +-
.../wizard/wizard_import_fatturapa.py | 541 ++++++++++--------
9 files changed, 723 insertions(+), 352 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index a1e6655db05f..d3bc22cb3589 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.3.2',
+ 'version': '12.0.1.4.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index f7809d13d8bf..11c8b05a2046 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -52,6 +52,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__ir_attachment_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__attachment_id
msgid "Attachment"
msgstr ""
@@ -66,7 +67,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:80
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:95
#, python-format
msgid "Attachment without name"
msgstr ""
@@ -88,12 +89,24 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__invoice_id
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__invoice_id
msgid "Bill"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1194
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_nbr
+msgid "Bill number in XML"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:92
+#, python-format
+msgid "Bill number {bill_nbr} of {bill_date}.\n"
+"Total no tax: {bill_no_tax}\n"
+"Total tax: {bill_tax}"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1241
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -151,7 +164,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1256
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -179,6 +192,7 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__create_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__create_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__create_uid
msgid "Created by"
msgstr ""
@@ -189,6 +203,7 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__create_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__create_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__create_date
msgid "Created on"
msgstr ""
@@ -263,11 +278,12 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__display_name
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__display_name
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__display_name
msgid "Display Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:862
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:855
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -278,6 +294,12 @@ msgstr ""
msgid "E Invoice Validation Error"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_validation_message
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_validation_message
+msgid "E Invoice Validation Message"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
msgid "E-Invoice Tax Amount"
@@ -320,6 +342,11 @@ msgstr ""
msgid "E-bill Inconsistencies"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_descr
+msgid "E-bill description"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
msgid "E-bill import file"
@@ -337,6 +364,11 @@ msgstr ""
msgid "E-invoice Discount Supplement Data"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_date_invoice
+msgid "E-invoice date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
msgid "E-invoice line"
@@ -347,6 +379,11 @@ msgstr ""
msgid "E-invoice line other data"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_reference
+msgid "E-invoice vendor reference"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
msgid "Electronic Bill Import"
@@ -369,7 +406,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1232
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1279
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -422,6 +459,7 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__id
msgid "ID"
msgstr ""
@@ -488,6 +526,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__invoice_id
msgid "Invoice"
msgstr ""
@@ -496,6 +535,12 @@ msgstr ""
msgid "Invoice Line"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:120
+#, python-format
+msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_is_follower
msgid "Is Follower"
@@ -518,6 +563,7 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in____last_update
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa____last_update
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice____last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line____last_update
msgid "Last Modified on"
msgstr ""
@@ -528,6 +574,7 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__write_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__write_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__write_uid
msgid "Last Updated by"
msgstr ""
@@ -538,9 +585,15 @@ msgstr ""
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__write_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__write_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__write_date
msgid "Last Updated on"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__line_ids
+msgid "Line"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Line Detail"
@@ -562,6 +615,11 @@ msgstr ""
msgid "Link"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice_line
+msgid "Link e-bill to bill"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice
msgid "Link to Bill"
@@ -570,7 +628,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_link_supplier_invoice
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
-msgid "Link to existing supplier bill"
+msgid "Link to existing supplier bills"
msgstr ""
#. module: l10n_it_fatturapa_in
@@ -636,7 +694,7 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:839
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:833
#, python-format
msgid "No currency found with code %s."
msgstr ""
@@ -648,7 +706,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:923
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -683,11 +741,6 @@ msgstr ""
msgid "Number of unread messages"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
-msgid "One or more invoice doesn't match the amount (tax or untaxed or total) of the original e-invoice. Please check"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -701,13 +754,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1153
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1061
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1148
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1056
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -881,6 +934,12 @@ msgstr ""
msgid "Tax kind %s not found"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:84
+#, python-format
+msgid "Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount ({e_bill_amount_tax})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__key
msgid "Technical field used to resolve multiple attachments in a multi-website environment."
@@ -892,7 +951,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:911
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -903,16 +962,11 @@ msgid "The database object this attachment will be attached to."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:37
+#: code:addons/l10n_it_fatturapa_in/models/account.py:49
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
-msgid "The invoice doesn't match one of the amount untaxed, tax amount or total amount of the original e-invoice. Please check"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
msgid "The record id this is attached to."
@@ -951,6 +1005,12 @@ msgstr ""
msgid "Total Price"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:98
+#, python-format
+msgid "Total amount ({bill_amount_total}) does not match with e-bill total amount ({e_bill_amount_total})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
#, python-format
@@ -982,6 +1042,12 @@ msgstr ""
msgid "Unread Messages Counter"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:70
+#, python-format
+msgid "Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed amount ({e_bill_amount_untaxed})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__url
msgid "Url"
@@ -998,6 +1064,12 @@ msgstr ""
msgid "VAT Rate"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:109
+#, python-format
+msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__website_id
msgid "Website"
@@ -1041,7 +1113,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:971
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1130
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1053,11 +1125,16 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:963
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__wizard_id
+msgid "Wizard"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:409
#, python-format
@@ -1081,7 +1158,7 @@ msgid "You can either upload a file from your computer or copy/paste an internet
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:23
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:116
#, python-format
msgid "You can select only one XML file to link."
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index a4d852df1668..4beeddf07167 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -22,9 +22,21 @@ class AccountInvoice(models.Model):
readonly=True)
e_invoice_amount_total = fields.Monetary(string='E-Invoice Total Amount',
readonly=True)
+
+ e_invoice_reference = fields.Char(
+ string="E-invoice vendor reference",
+ readonly=True)
+
+ e_invoice_date_invoice = fields.Date(
+ string="E-invoice date",
+ readonly=True)
+
e_invoice_validation_error = fields.Boolean(
compute='_compute_e_invoice_validation_error')
+ e_invoice_validation_message = fields.Text(
+ compute='_compute_e_invoice_validation_error')
+
e_invoice_force_validation = fields.Boolean(
string='Force E-Invoice Validation')
@@ -38,34 +50,86 @@ def invoice_validate(self):
invoice.display_name)
return super(AccountInvoice, self).invoice_validate()
- @api.depends('amount_untaxed', 'amount_tax', 'amount_total', 'state')
+ @api.depends('type', 'state', 'fatturapa_attachment_in_id',
+ 'amount_untaxed', 'amount_tax', 'amount_total',
+ 'reference', 'date_invoice')
def _compute_e_invoice_validation_error(self):
- for invoice in self:
- if (invoice.type in ['in_invoice', 'in_refund'] and
- invoice.state in ['draft', 'open', 'paid'] and
- invoice.fatturapa_attachment_in_id):
- if (invoice.e_invoice_amount_untaxed and
- float_compare(invoice.amount_untaxed,
- invoice.e_invoice_amount_untaxed,
- precision_rounding=invoice.currency_id
- .rounding) != 0):
- invoice.e_invoice_validation_error = True
- elif (invoice.e_invoice_amount_tax and
- float_compare(invoice.amount_tax,
- invoice.e_invoice_amount_tax,
- precision_rounding=invoice.currency_id
- .rounding) != 0):
- invoice.e_invoice_validation_error = True
- elif (invoice.e_invoice_amount_total and
- float_compare(invoice.amount_total,
- invoice.e_invoice_amount_total,
- precision_rounding=invoice.currency_id
- .rounding) != 0):
- invoice.e_invoice_validation_error = True
- else:
- invoice.e_invoice_validation_error = False
- else:
- invoice.e_invoice_validation_error = False
+ bills_to_check = self.filtered(
+ lambda inv:
+ inv.type in ['in_invoice', 'in_refund'] and
+ inv.state in ['draft', 'open', 'paid'] and
+ inv.fatturapa_attachment_in_id)
+ for bill in bills_to_check:
+ error_messages = list()
+ if (bill.e_invoice_amount_untaxed and
+ float_compare(bill.amount_untaxed,
+ bill.e_invoice_amount_untaxed,
+ precision_rounding=bill.currency_id
+ .rounding) != 0):
+ error_messages.append(
+ _("Untaxed amount ({bill_amount_untaxed}) "
+ "does not match with "
+ "e-bill untaxed amount ({e_bill_amount_untaxed})")
+ .format(
+ bill_amount_untaxed=bill.amount_untaxed or 0,
+ e_bill_amount_untaxed=bill.e_invoice_amount_untaxed
+ ))
+
+ if (bill.e_invoice_amount_tax and
+ float_compare(bill.amount_tax,
+ bill.e_invoice_amount_tax,
+ precision_rounding=bill.currency_id
+ .rounding) != 0):
+ error_messages.append(
+ _("Taxed amount ({bill_amount_tax}) "
+ "does not match with "
+ "e-bill taxed amount ({e_bill_amount_tax})")
+ .format(
+ bill_amount_tax=bill.amount_tax or 0,
+ e_bill_amount_tax=bill.e_invoice_amount_tax
+ ))
+
+ if (bill.e_invoice_amount_total and
+ float_compare(bill.amount_total,
+ bill.e_invoice_amount_total,
+ precision_rounding=bill.currency_id
+ .rounding) != 0):
+ error_messages.append(
+ _("Total amount ({bill_amount_total}) "
+ "does not match with "
+ "e-bill total amount ({e_bill_amount_total})")
+ .format(
+ bill_amount_total=bill.amount_total or 0,
+ e_bill_amount_total=bill.e_invoice_amount_total
+ ))
+
+ if (bill.e_invoice_reference and
+ bill.reference != bill.e_invoice_reference):
+ error_messages.append(
+ _("Vendor reference ({bill_vendor_ref}) "
+ "does not match with "
+ "e-bill vendor reference ({e_bill_vendor_ref})")
+ .format(
+ bill_vendor_ref=bill.reference or "",
+ e_bill_vendor_ref=bill.e_invoice_reference
+ ))
+
+ if (bill.e_invoice_date_invoice and
+ bill.e_invoice_date_invoice != bill.date_invoice):
+ error_messages.append(
+ _("Invoice date ({bill_date_invoice}) "
+ "does not match with "
+ "e-bill invoice date ({e_bill_date_invoice})")
+ .format(
+ bill_date_invoice=bill.date_invoice or "",
+ e_bill_date_invoice=bill.e_invoice_date_invoice
+ ))
+
+ if not error_messages:
+ continue
+ bill.e_invoice_validation_error = True
+ bill.e_invoice_validation_message = \
+ ",\n".join(error_messages) + "."
@api.multi
def name_get(self):
@@ -106,7 +170,7 @@ def compute_xml_amount_tax(self, DatiRiepilogo):
amount_tax += float(Riepilogo.Imposta)
return amount_tax
- def set_einvoice_amount(self, fattura):
+ def set_einvoice_data(self, fattura):
self.ensure_one()
amount_untaxed = self.compute_xml_amount_untaxed(
fattura.DatiBeniServizi.DatiRiepilogo)
@@ -115,11 +179,16 @@ def set_einvoice_amount(self, fattura):
amount_total = float(
fattura.DatiGenerali.DatiGeneraliDocumento.
ImportoTotaleDocumento or 0.0)
+ reference = fattura.DatiGenerali.DatiGeneraliDocumento.Numero
+ date_invoice = fields.Date.from_string(
+ fattura.DatiGenerali.DatiGeneraliDocumento.Data)
self.update({
'e_invoice_amount_untaxed': amount_untaxed,
'e_invoice_amount_tax': amount_tax,
'e_invoice_amount_total': amount_total,
+ 'e_invoice_reference': reference,
+ 'e_invoice_date_invoice': date_invoice,
})
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index dc5eca0d0650..6e6b69163513 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -31,11 +31,26 @@ class FatturaPAAttachmentIn(models.Model):
e_invoice_validation_error = fields.Boolean(
compute='_compute_e_invoice_validation_error')
+ e_invoice_validation_message = fields.Text(
+ compute='_compute_e_invoice_validation_error')
+
@api.depends('in_invoice_ids.e_invoice_validation_error')
def _compute_e_invoice_validation_error(self):
- for rec in self:
- rec.e_invoice_validation_error = \
- any(rec.mapped('in_invoice_ids.e_invoice_validation_error'))
+ for att in self:
+ bills_with_error = att.in_invoice_ids.filtered(
+ lambda b: b.e_invoice_validation_error
+ )
+ if not bills_with_error:
+ continue
+ att.e_invoice_validation_error = True
+ errors_message_template = u"{bill}:\n{errors}"
+ error_messages = list()
+ for bill in bills_with_error:
+ error_messages.append(
+ errors_message_template.format(
+ bill=bill.display_name,
+ errors=bill.e_invoice_validation_message))
+ att.e_invoice_validation_message = "\n\n".join(error_messages)
@api.onchange('datas_fname')
def onchagne_datas_fname(self):
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 78ca8c6573ea..6340bdae2dab 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -33,6 +33,7 @@ def create_wt(self):
def setUp(self):
super(TestFatturaPAXMLValidation, self).setUp()
self.wizard_model = self.env['wizard.import.fatturapa']
+ self.wizard_link_model = self.env['wizard.link.to.invoice']
self.data_model = self.env['ir.model.data']
self.attach_model = self.env['fatturapa.attachment.in']
self.invoice_model = self.env['account.invoice']
@@ -46,7 +47,8 @@ def setUp(self):
'product.product_product_8_product_template')
self.service = self.env.ref('product.product_product_1')
- def run_wizard(self, name, file_name, datas_fname=None):
+ def run_wizard(self, name, file_name, datas_fname=None,
+ mode='import', wiz_values=None):
if datas_fname is None:
datas_fname = file_name
attach_id = self.attach_model.create(
@@ -55,9 +57,14 @@ def run_wizard(self, name, file_name, datas_fname=None):
'datas': self.getFile(file_name)[1],
'datas_fname': datas_fname
}).id
- wizard = self.wizard_model.with_context(
- active_ids=[attach_id]).create({})
- return wizard.importFatturaPA()
+ if mode == 'import':
+ wizard = self.wizard_model.with_context(
+ active_ids=[attach_id]).create(wiz_values or {})
+ return wizard.importFatturaPA()
+ if mode == 'link':
+ wizard = self.wizard_link_model.with_context(
+ active_ids=[attach_id]).create(wiz_values or {})
+ return wizard.link()
def run_wizard_multi(self, file_name_list):
active_ids = []
@@ -138,12 +145,12 @@ def test_01_xml_import(self):
self.assertEqual(
invoice.tax_representative_id.name, "Rappresentante fiscale")
self.assertEqual(invoice.welfare_fund_ids[0].welfare_rate_tax, 0.04)
- self.assertEqual(
- invoice.related_documents[0].type, "order")
- self.assertEqual(
- invoice.related_documents[0].cig, '456def')
- self.assertEqual(
- invoice.related_documents[0].cup, '123abc')
+ order_related_doc = invoice.related_documents.filtered(
+ lambda rd: rd.type == 'order'
+ )
+ self.assertTrue(order_related_doc)
+ self.assertEqual(order_related_doc.cig, '456def')
+ self.assertEqual(order_related_doc.cup, '123abc')
self.assertEqual(
invoice.welfare_fund_ids[0].welfare_amount_tax, 9)
self.assertFalse(invoice.welfare_fund_ids[0].welfare_taxable)
@@ -521,3 +528,48 @@ def test_23_xml_import(self):
invoice_ids = res.get('domain')[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
+
+ def test_01_xml_link(self):
+ """einvoice lines are created but Vendor Reference is kept"""
+ supplier = self.env['res.partner'].search(
+ [('vat', '=', 'IT02780790107')], limit=1)
+ invoice_values = {
+ 'partner_id': supplier.id,
+ 'type': 'in_invoice',
+ 'reference': 'original_ref',
+ }
+ orig_invoice = self.invoice_model.create(invoice_values)
+ wiz_values = {
+ 'line_ids': [(0, 0, {
+ 'invoice_id': orig_invoice.id
+ })],
+ }
+ self.run_wizard('test_link_01', 'IT01234567890_FPR04.xml',
+ mode='link', wiz_values=wiz_values)
+ self.assertTrue(orig_invoice.e_invoice_line_ids)
+ self.assertFalse(orig_invoice.invoice_line_ids)
+ self.assertTrue(orig_invoice.e_invoice_validation_error)
+ self.assertEqual(
+ invoice_values['reference'],
+ orig_invoice.reference,
+ )
+
+ def test_02_xml_link(self):
+ """einvoice lines are created but Vendor Reference is kept"""
+ supplier = self.env['res.partner'].search(
+ [('vat', '=', 'IT02780790107')], limit=1)
+ invoice_values = {
+ 'partner_id': supplier.id,
+ 'type': 'in_invoice',
+ }
+ orig_invoice = self.invoice_model.create(invoice_values)
+ wiz_values = {
+ 'line_ids': [(0, 0, {
+ 'invoice_id': orig_invoice.id
+ })],
+ }
+ self.run_wizard('test_link_02', 'IT02780790107_11004.xml',
+ mode='link', wiz_values=wiz_values)
+ self.assertTrue(orig_invoice.e_invoice_line_ids)
+ self.assertFalse(orig_invoice.invoice_line_ids)
+ self.assertTrue(orig_invoice.e_invoice_validation_error)
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index c392ceb8383c..69b3bb85ecca 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -7,7 +7,7 @@
- One or more invoice doesn't match the amount (tax or untaxed or total) of the original e-invoice. Please check
+
@@ -115,7 +115,7 @@
- The invoice doesn't match one of the amount untaxed, tax amount or total amount of the original e-invoice. Please check
+
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index 5fea3ed51057..afe25d1f3cba 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -5,33 +5,133 @@
from odoo.addons.l10n_it_fatturapa.bindings import fatturapa
+def get_invoice_obj(fatturapa_attachment):
+ xml_string = fatturapa_attachment.get_xml_string()
+ return fatturapa.CreateFromDocument(xml_string)
+
+
+class WizardLinkToInvoiceLine(models.TransientModel):
+ _name = 'wizard.link.to.invoice.line'
+ _description = "Link e-bill to bill"
+
+ wizard_id = fields.Many2one(
+ comodel_name='wizard.link.to.invoice',
+ )
+ e_invoice_nbr = fields.Integer(
+ string="Bill number in XML",
+ readonly=True,
+ )
+ e_invoice_descr = fields.Text(
+ string="E-bill description",
+ readonly=True,
+ )
+ invoice_id = fields.Many2one(
+ comodel_name='account.invoice',
+ )
+
+ @api.multi
+ def link(self):
+ self.ensure_one()
+ if not self.invoice_id:
+ return True
+ fatturapa_attachment = self.wizard_id.attachment_id
+ import_wiz = self.env['wizard.import.fatturapa'] \
+ .with_context(
+ active_ids=fatturapa_attachment.ids,
+ linked_invoice=self.invoice_id,) \
+ .new({
+ 'e_invoice_detail_level': '2',
+ })
+ fatt = get_invoice_obj(fatturapa_attachment)
+ FatturaBody = fatt.FatturaElettronicaBody[self.e_invoice_nbr]
+ cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
+
+ self.invoice_id.fatturapa_attachment_in_id = fatturapa_attachment
+
+ self.invoice_id.set_einvoice_data(FatturaBody)
+
+ import_wiz.set_e_invoice_lines(FatturaBody, self.invoice_id)
+
+ import_wiz.set_summary_data(FatturaBody, self.invoice_id.id)
+
+ import_wiz.set_delivery_data(FatturaBody, self.invoice_id)
+
+ import_wiz.set_payments_data(
+ FatturaBody, self.invoice_id.id, self.invoice_id.partner_id.id)
+
+ import_wiz.set_activity_progress(FatturaBody, self.invoice_id.id)
+
+ import_wiz.set_StabileOrganizzazione(
+ cedentePrestatore, self.invoice_id)
+
+ import_wiz.set_efatt_rounding(FatturaBody, self.invoice_id)
+
+ import_wiz.set_art73(FatturaBody, self.invoice_id)
+
+ import_wiz.set_attachments_data(FatturaBody, self.invoice_id.id)
+
+ return True
+
+
class WizardLinkToInvoice(models.TransientModel):
_name = "wizard.link.to.invoice"
_description = "Link to Bill"
- invoice_id = fields.Many2one(
- 'account.invoice', string="Bill", required=True)
- def get_invoice_obj(self, fatturapa_attachment):
- xml_string = fatturapa_attachment.get_xml_string()
- return fatturapa.CreateFromDocument(xml_string)
+ attachment_id = fields.Many2one(
+ comodel_name='fatturapa.attachment.in',
+ )
+ line_ids = fields.One2many(
+ comodel_name='wizard.link.to.invoice.line',
+ inverse_name='wizard_id',)
+
+ @api.model
+ def _get_default_lines_vals(self, attachment):
+ fatt = get_invoice_obj(attachment)
+ invoice_model = self.env['account.invoice']
+ line_vals = list()
+ descr_template = _("Bill number {bill_nbr} of {bill_date}.\n"
+ "Total no tax: {bill_no_tax}\n"
+ "Total tax: {bill_tax}")
+ for nbr, FatturaBody in enumerate(fatt.FatturaElettronicaBody):
+ dati_generali_documento = \
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento
+ dati_riepilogo = FatturaBody.DatiBeniServizi.DatiRiepilogo
+ line_vals.append({
+ 'e_invoice_nbr': nbr,
+ 'e_invoice_descr': descr_template.format(
+ bill_nbr=dati_generali_documento.Numero,
+ bill_date=dati_generali_documento.Data,
+ bill_no_tax=invoice_model.compute_xml_amount_untaxed(
+ dati_riepilogo),
+ bill_tax=invoice_model.compute_xml_amount_tax(
+ dati_riepilogo)
+ ),
+ })
+ return line_vals
+
+ @api.model
+ def _get_default_attachment(self):
+ fatturapa_attachment_id = self.env.context.get('active_ids', [])
+ if len(fatturapa_attachment_id) != 1:
+ raise UserError(_("You can select only one XML file to link."))
+ fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
+ attachment = fatturapa_attachment_obj.browse(fatturapa_attachment_id)
+ return attachment
+
+ @api.model
+ def default_get(self, fields_list):
+ res = super(WizardLinkToInvoice, self).default_get(fields_list)
+ attachment = self._get_default_attachment()
+ lines_vals = self._get_default_lines_vals(attachment)
+ res.update({
+ 'attachment_id': attachment.id,
+ 'line_ids': [(0, 0, line_vals)
+ for line_vals in lines_vals],
+ })
+ return res
@api.multi
def link(self):
self.ensure_one()
- active_ids = self.env.context.get('active_ids')
- if len(active_ids) != 1:
- raise UserError(_("You can select only one XML file to link."))
- self.invoice_id.fatturapa_attachment_in_id = active_ids[0]
- # extract pdf if attached
- fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
- for fatturapa_attachment_id in active_ids:
- fatturapa_attachment = fatturapa_attachment_obj.browse(
- fatturapa_attachment_id)
- fatt = self.get_invoice_obj(fatturapa_attachment)
- for FatturaBody in fatt.FatturaElettronicaBody:
- self.invoice_id.set_einvoice_amount(FatturaBody)
- # 2.5
- AttachmentsData = FatturaBody.Allegati
- if AttachmentsData and self.invoice_id:
- fatturapa_attachment_obj.extract_attachments(
- AttachmentsData, self.invoice_id.id)
+ for line in self.line_ids:
+ line.link()
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
index ca9239c80293..5654074d74d4 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
@@ -5,25 +5,36 @@
wizard_link_supplier_invoice
wizard.link.to.invoice
-
-
+
+
-
+
+
+
+
+
+
+
-
-
+
+
-
Date: Thu, 18 Jul 2019 12:28:35 +0200
Subject: [PATCH 054/155] [12.0][IMP][l10n_it_fatturapa_in] Add the possibility
to optionally exclude partner from being updated from e-bill data
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../i18n/l10n_it_fatturapa_in.pot | 58 +++++++++----------
.../tests/test_import_fatturapa_xml.py | 17 ++++++
.../wizard/wizard_import_fatturapa.py | 10 +++-
4 files changed, 56 insertions(+), 31 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index d3bc22cb3589..26d6d4000a19 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.4.0',
+ 'version': '12.0.1.5.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 11c8b05a2046..e9df0cd8888c 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -78,7 +78,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:701
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:709
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -106,7 +106,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1241
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1249
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -164,7 +164,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1256
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1264
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -213,7 +213,7 @@ msgid "Creation"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:270
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:274
#, python-format
msgid "Current invoice is from {} with REA Code {}. Yet it seems that partners {} have the same REA Code. This code should be unique; please fix it."
msgstr ""
@@ -239,7 +239,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:756
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:764
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -283,7 +283,7 @@ msgid "Display Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:855
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -406,7 +406,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1279
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1287
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -442,7 +442,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:589
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:597
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -683,7 +683,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:677
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:685
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -694,19 +694,19 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:833
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:841
#, python-format
msgid "No currency found with code %s."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:317
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:325
#, python-format
msgid "No tax with percentage %s and nature %s found. Please configure this tax."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1102
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -748,19 +748,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:619
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:627
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1061
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1069
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1056
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1064
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -812,7 +812,7 @@ msgid "Progress data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:213
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:217
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr ""
@@ -823,13 +823,13 @@ msgid "Quantity"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:245
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:249
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:202
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr ""
@@ -918,7 +918,7 @@ msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:231
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:235
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr ""
@@ -929,7 +929,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:510
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:518
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -951,7 +951,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1090
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -988,13 +988,13 @@ msgid "To Register"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:322
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:330
#, python-format
msgid "Too many taxes with percentage %s and nature %s found. Tax %s with lower priority has been set on invoice lines."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:347
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:355
#, python-format
msgid "Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -1096,7 +1096,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:537
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -1113,19 +1113,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1130
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1138
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:519
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:527
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1130
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
@@ -1136,13 +1136,13 @@ msgid "Wizard"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:409
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:417
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:338
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:346
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 6340bdae2dab..6ad809280b05 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -529,6 +529,23 @@ def test_23_xml_import(self):
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
+ def test_30_xml_import(self):
+ self.env.user.company_id.cassa_previdenziale_product_id = (
+ self.service.id)
+ res = self.run_wizard('test30', 'IT05979361218_001.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ partner_id = invoice.partner_id
+ partner_id.write({
+ 'street': 'Viale Repubblica, 34',
+ 'electronic_invoice_no_contact_update': True,
+ })
+ res = self.run_wizard('test30', 'IT05979361218_002.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.partner_id.id, partner_id.id)
+ self.assertEqual(invoice.partner_id.street, 'Viale Repubblica, 34')
+
def test_01_xml_link(self):
"""einvoice lines are created but Vendor Reference is kept"""
supplier = self.env['res.partner'].search(
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 56c8e5d187f0..795e5d1fc1c7 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -185,8 +185,12 @@ def getPartnerBase(self, DatiAnagrafici, supplier=True):
def getCedPrest(self, cedPrest):
partner_model = self.env['res.partner']
partner_id = self.getPartnerBase(cedPrest.DatiAnagrafici)
- fiscalPosModel = self.env['fatturapa.fiscal_position']
+ no_contact_update = False
if partner_id:
+ no_contact_update = partner_model.browse(partner_id).\
+ electronic_invoice_no_contact_update
+ fiscalPosModel = self.env['fatturapa.fiscal_position']
+ if partner_id and not no_contact_update:
partner_company_id = partner_model.browse(partner_id).company_id.id
vals = {
'street': cedPrest.Sede.Indirizzo,
@@ -285,7 +289,11 @@ def getCedPrest(self, cedPrest):
def getCarrirerPartner(self, Carrier):
partner_model = self.env['res.partner']
partner_id = self.getPartnerBase(Carrier.DatiAnagraficiVettore)
+ no_contact_update = False
if partner_id:
+ no_contact_update = partner_model.browse(partner_id).\
+ electronic_invoice_no_contact_update
+ if partner_id and not no_contact_update:
vals = {
'license_number':
Carrier.DatiAnagraficiVettore.NumeroLicenzaGuida or '',
From 849726c0e8df198c83c1ea2f873cac248a6f257b Mon Sep 17 00:00:00 2001
From: eLBati
Date: Wed, 24 Jul 2019 19:16:18 +0200
Subject: [PATCH 055/155] FIX l10n_it_fatturapa_in use fiscal position from
partner FIX l10n_it_fatturapa_in: delete einvoice.line when invoice is
deleted REF l10n_it_fatturapa_in tests with FatturapaCommon
REF l10n_it_fatturapa_in extracting _compute_e_invoice_validation_error parts for override
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../i18n/l10n_it_fatturapa_in.pot | 28 ++---
l10n_it_fatturapa_in/models/account.py | 102 +++++++++++-------
l10n_it_fatturapa_in/tests/__init__.py | 1 +
.../tests/fatturapa_common.py | 86 +++++++++++++++
.../tests/test_import_fatturapa_xml.py | 74 +------------
.../wizard/wizard_import_fatturapa.py | 3 +-
7 files changed, 168 insertions(+), 128 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/fatturapa_common.py
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 26d6d4000a19..bea7b60ad13e 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.5.0',
+ 'version': '12.0.1.6.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index e9df0cd8888c..a0d32d32dc53 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -106,7 +106,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1249
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1250
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -164,7 +164,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1264
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1265
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -406,7 +406,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1287
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1288
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -536,7 +536,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:120
+#: code:addons/l10n_it_fatturapa_in/models/account.py:142
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -706,7 +706,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1102
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1103
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -754,13 +754,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1069
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1070
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1064
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1065
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -935,7 +935,7 @@ msgid "Tax kind %s not found"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:84
+#: code:addons/l10n_it_fatturapa_in/models/account.py:78
#, python-format
msgid "Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount ({e_bill_amount_tax})"
msgstr ""
@@ -951,7 +951,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1090
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1006,7 +1006,7 @@ msgid "Total Price"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:98
+#: code:addons/l10n_it_fatturapa_in/models/account.py:95
#, python-format
msgid "Total amount ({bill_amount_total}) does not match with e-bill total amount ({e_bill_amount_total})"
msgstr ""
@@ -1043,7 +1043,7 @@ msgid "Unread Messages Counter"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:70
+#: code:addons/l10n_it_fatturapa_in/models/account.py:61
#, python-format
msgid "Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed amount ({e_bill_amount_untaxed})"
msgstr ""
@@ -1065,7 +1065,7 @@ msgid "VAT Rate"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:109
+#: code:addons/l10n_it_fatturapa_in/models/account.py:131
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
@@ -1113,7 +1113,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1138
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1139
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1125,7 +1125,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1130
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1131
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 4beeddf07167..651824151643 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -50,6 +50,57 @@ def invoice_validate(self):
invoice.display_name)
return super(AccountInvoice, self).invoice_validate()
+ def e_inv_check_amount_untaxed(self):
+ error_message = ''
+ if (self.e_invoice_amount_untaxed and
+ float_compare(self.amount_untaxed,
+ self.e_invoice_amount_untaxed,
+ precision_rounding=self.currency_id
+ .rounding) != 0):
+ error_message = (
+ _("Untaxed amount ({bill_amount_untaxed}) "
+ "does not match with "
+ "e-bill untaxed amount ({e_bill_amount_untaxed})")
+ .format(
+ bill_amount_untaxed=self.amount_untaxed or 0,
+ e_bill_amount_untaxed=self.e_invoice_amount_untaxed
+ ))
+ return error_message
+
+ def e_inv_check_amount_tax(self):
+ error_message = ''
+ if (self.e_invoice_amount_tax and
+ float_compare(self.amount_tax,
+ self.e_invoice_amount_tax,
+ precision_rounding=self.currency_id
+ .rounding) != 0):
+ error_message = (
+ _("Taxed amount ({bill_amount_tax}) "
+ "does not match with "
+ "e-bill taxed amount ({e_bill_amount_tax})")
+ .format(
+ bill_amount_tax=self.amount_tax or 0,
+ e_bill_amount_tax=self.e_invoice_amount_tax
+ ))
+ return error_message
+
+ def e_inv_check_amount_total(self):
+ error_message = ''
+ if (self.e_invoice_amount_total and
+ float_compare(self.amount_total,
+ self.e_invoice_amount_total,
+ precision_rounding=self.currency_id
+ .rounding) != 0):
+ error_message = (
+ _("Total amount ({bill_amount_total}) "
+ "does not match with "
+ "e-bill total amount ({e_bill_amount_total})")
+ .format(
+ bill_amount_total=self.amount_total or 0,
+ e_bill_amount_total=self.e_invoice_amount_total
+ ))
+ return error_message
+
@api.depends('type', 'state', 'fatturapa_attachment_in_id',
'amount_untaxed', 'amount_tax', 'amount_total',
'reference', 'date_invoice')
@@ -61,47 +112,18 @@ def _compute_e_invoice_validation_error(self):
inv.fatturapa_attachment_in_id)
for bill in bills_to_check:
error_messages = list()
- if (bill.e_invoice_amount_untaxed and
- float_compare(bill.amount_untaxed,
- bill.e_invoice_amount_untaxed,
- precision_rounding=bill.currency_id
- .rounding) != 0):
- error_messages.append(
- _("Untaxed amount ({bill_amount_untaxed}) "
- "does not match with "
- "e-bill untaxed amount ({e_bill_amount_untaxed})")
- .format(
- bill_amount_untaxed=bill.amount_untaxed or 0,
- e_bill_amount_untaxed=bill.e_invoice_amount_untaxed
- ))
- if (bill.e_invoice_amount_tax and
- float_compare(bill.amount_tax,
- bill.e_invoice_amount_tax,
- precision_rounding=bill.currency_id
- .rounding) != 0):
- error_messages.append(
- _("Taxed amount ({bill_amount_tax}) "
- "does not match with "
- "e-bill taxed amount ({e_bill_amount_tax})")
- .format(
- bill_amount_tax=bill.amount_tax or 0,
- e_bill_amount_tax=bill.e_invoice_amount_tax
- ))
+ error_message = bill.e_inv_check_amount_untaxed()
+ if error_message:
+ error_messages.append(error_message)
- if (bill.e_invoice_amount_total and
- float_compare(bill.amount_total,
- bill.e_invoice_amount_total,
- precision_rounding=bill.currency_id
- .rounding) != 0):
- error_messages.append(
- _("Total amount ({bill_amount_total}) "
- "does not match with "
- "e-bill total amount ({e_bill_amount_total})")
- .format(
- bill_amount_total=bill.amount_total or 0,
- e_bill_amount_total=bill.e_invoice_amount_total
- ))
+ error_message = bill.e_inv_check_amount_tax()
+ if error_message:
+ error_messages.append(error_message)
+
+ error_message = bill.e_inv_check_amount_total()
+ if error_message:
+ error_messages.append(error_message)
if (bill.e_invoice_reference and
bill.reference != bill.e_invoice_reference):
@@ -227,7 +249,7 @@ class EInvoiceLine(models.Model):
_name = 'einvoice.line'
_description = 'E-invoice line'
invoice_id = fields.Many2one(
- "account.invoice", "Bill", readonly=True)
+ "account.invoice", "Bill", readonly=True, ondelete='cascade')
line_number = fields.Integer('Line Number', readonly=True)
service_type = fields.Char('Sale Provision Type', readonly=True)
cod_article_ids = fields.One2many(
diff --git a/l10n_it_fatturapa_in/tests/__init__.py b/l10n_it_fatturapa_in/tests/__init__.py
index 82c21f57eb22..3c7d2e8e2e7a 100644
--- a/l10n_it_fatturapa_in/tests/__init__.py
+++ b/l10n_it_fatturapa_in/tests/__init__.py
@@ -1,2 +1,3 @@
+from . import fatturapa_common
from . import test_import_fatturapa_xml
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
new file mode 100644
index 000000000000..d903f23fa5f5
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -0,0 +1,86 @@
+# -*- coding: utf-8 -*-
+
+import base64
+import tempfile
+from odoo.modules import get_module_resource
+from odoo.tests.common import SingleTransactionCase
+
+
+class FatturapaCommon(SingleTransactionCase):
+
+ def getFile(self, filename, module_name=None):
+ if module_name is None:
+ module_name = 'l10n_it_fatturapa_in'
+ path = get_module_resource(module_name, 'tests', 'data', filename)
+ with open(path, 'rb') as test_data:
+ with tempfile.TemporaryFile() as out:
+ base64.encode(test_data, out)
+ out.seek(0)
+ return path, out.read()
+
+ def create_wt(self):
+ return self.env['withholding.tax'].create({
+ 'name': '1040',
+ 'code': '1040',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 20.0})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.a').id,
+ })
+
+ def run_wizard(self, name, file_name, datas_fname=None,
+ mode='import', wiz_values=None, module_name=None):
+ if module_name is None:
+ module_name = 'l10n_it_fatturapa_in'
+ if datas_fname is None:
+ datas_fname = file_name
+ attach_id = self.attach_model.create(
+ {
+ 'name': name,
+ 'datas': self.getFile(file_name, module_name=module_name)[1],
+ 'datas_fname': datas_fname
+ }).id
+ if mode == 'import':
+ wizard = self.wizard_model.with_context(
+ active_ids=[attach_id], active_model='fatturapa.attachment.in'
+ ).create(wiz_values or {})
+ return wizard.importFatturaPA()
+ if mode == 'link':
+ wizard = self.wizard_link_model.with_context(
+ active_ids=[attach_id], active_model='fatturapa.attachment.in'
+ ).create(wiz_values or {})
+ return wizard.link()
+
+ def run_wizard_multi(self, file_name_list, module_name=None):
+ if module_name is None:
+ module_name = 'l10n_it_fatturapa_in'
+ active_ids = []
+ for file_name in file_name_list:
+ active_ids.append(self.attach_model.create(
+ {
+ 'name': file_name,
+ 'datas': self.getFile(file_name, module_name)[1],
+ 'datas_fname': file_name
+ }).id)
+ wizard = self.wizard_model.with_context(
+ active_ids=active_ids).create({})
+ return wizard.importFatturaPA()
+
+ def setUp(self):
+ super(FatturapaCommon, self).setUp()
+ self.wizard_model = self.env['wizard.import.fatturapa']
+ self.wizard_link_model = self.env['wizard.link.to.invoice']
+ self.data_model = self.env['ir.model.data']
+ self.attach_model = self.env['fatturapa.attachment.in']
+ self.invoice_model = self.env['account.invoice']
+ self.payable_account_id = self.env['account.account'].search([
+ ('user_type_id', '=', self.env.ref(
+ 'account.data_account_type_payable').id)
+ ], limit=1).id
+ self.headphones = self.env.ref(
+ 'product.product_product_7_product_template')
+ self.imac = self.env.ref(
+ 'product.product_product_8_product_template')
+ self.service = self.env.ref('product.product_product_1')
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 6ad809280b05..31e5aec8c097 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -1,83 +1,13 @@
-import base64
-import tempfile
from datetime import date
-from odoo.tests.common import SingleTransactionCase
-from odoo.modules import get_module_resource
+from .fatturapa_common import FatturapaCommon
from odoo.exceptions import UserError
-class TestFatturaPAXMLValidation(SingleTransactionCase):
-
- def getFile(self, filename):
- path = get_module_resource(
- 'l10n_it_fatturapa_in', 'tests', 'data', filename)
- with open(path, 'rb') as test_data:
- with tempfile.TemporaryFile() as out:
- base64.encode(test_data, out)
- out.seek(0)
- return path, out.read()
-
- def create_wt(self):
- return self.env['withholding.tax'].create({
- 'name': '1040',
- 'code': '1040',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 20.0})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.a').id,
- })
+class TestFatturaPAXMLValidation(FatturapaCommon):
def setUp(self):
super(TestFatturaPAXMLValidation, self).setUp()
- self.wizard_model = self.env['wizard.import.fatturapa']
- self.wizard_link_model = self.env['wizard.link.to.invoice']
- self.data_model = self.env['ir.model.data']
- self.attach_model = self.env['fatturapa.attachment.in']
- self.invoice_model = self.env['account.invoice']
- self.payable_account_id = self.env['account.account'].search([
- ('user_type_id', '=', self.env.ref(
- 'account.data_account_type_payable').id)
- ], limit=1).id
- self.headphones = self.env.ref(
- 'product.product_product_7_product_template')
- self.imac = self.env.ref(
- 'product.product_product_8_product_template')
- self.service = self.env.ref('product.product_product_1')
-
- def run_wizard(self, name, file_name, datas_fname=None,
- mode='import', wiz_values=None):
- if datas_fname is None:
- datas_fname = file_name
- attach_id = self.attach_model.create(
- {
- 'name': name,
- 'datas': self.getFile(file_name)[1],
- 'datas_fname': datas_fname
- }).id
- if mode == 'import':
- wizard = self.wizard_model.with_context(
- active_ids=[attach_id]).create(wiz_values or {})
- return wizard.importFatturaPA()
- if mode == 'link':
- wizard = self.wizard_link_model.with_context(
- active_ids=[attach_id]).create(wiz_values or {})
- return wizard.link()
-
- def run_wizard_multi(self, file_name_list):
- active_ids = []
- for file_name in file_name_list:
- active_ids.append(self.attach_model.create(
- {
- 'name': file_name,
- 'datas': self.getFile(file_name)[1],
- 'datas_fname': file_name
- }).id)
- wizard = self.wizard_model.with_context(
- active_ids=active_ids).create({})
- return wizard.importFatturaPA()
def test_00_xml_import(self):
self.env.user.company_id.cassa_previdenziale_product_id = (
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 795e5d1fc1c7..a587c3721f8c 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -883,7 +883,8 @@ def invoiceCreate(
'currency_id': currency[0].id,
'journal_id': purchase_journal.id,
# 'origin': xmlData.datiOrdineAcquisto,
- 'fiscal_position_id': False,
+ 'fiscal_position_id': (
+ partner.property_account_position_id.id or False),
'payment_term_id': partner.property_supplier_payment_term_id.id,
'company_id': company.id,
'fatturapa_attachment_in_id': fatturapa_attachment.id,
From 735e094efed83258d2d718fdfb82f95736dbb9ac Mon Sep 17 00:00:00 2001
From: SimoRubi
Date: Fri, 21 Jun 2019 16:30:37 +0200
Subject: [PATCH 056/155] [IMP] l10n_it_fatturapa_in: When linking an e-invoice
to an invoice, set reference and invoice date in the invoice if empty
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 212 +++++++++++++-----
.../i18n/l10n_it_fatturapa_in.pot | 22 +-
.../tests/test_import_fatturapa_xml.py | 19 +-
.../wizard/link_to_existing_invoice.py | 2 +
.../wizard/wizard_import_fatturapa.py | 18 +-
6 files changed, 205 insertions(+), 70 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index bea7b60ad13e..b51ab861e2b7 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.6.0',
+ 'version': '12.0.1.6.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 930499552f17..55c8c9d075b0 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -64,6 +64,7 @@ msgstr "Codice articoli"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__ir_attachment_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__attachment_id
msgid "Attachment"
msgstr "Allegato"
@@ -78,7 +79,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:80
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:95
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
@@ -89,7 +90,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:701
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:709
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -104,12 +105,27 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__invoice_id
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__invoice_id
msgid "Bill"
msgstr "Fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1194
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_nbr
+#, fuzzy
+#| msgid "Bills Number"
+msgid "Bill number in XML"
+msgstr "Numero fatture"
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:94
+#, python-format
+msgid ""
+"Bill number {bill_nbr} of {bill_date}.\n"
+"Total no tax: {bill_no_tax}\n"
+"Total tax: {bill_tax}"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1260
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -167,7 +183,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -195,6 +211,7 @@ msgstr "Codice nazione %s non trovato nel sistema."
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__create_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__create_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__create_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__create_uid
msgid "Created by"
msgstr "Creato da"
@@ -205,6 +222,7 @@ msgstr "Creato da"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__create_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__create_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__create_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__create_date
msgid "Created on"
msgstr "Creato il"
@@ -214,7 +232,7 @@ msgid "Creation"
msgstr "Creazione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:270
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:274
#, python-format
msgid ""
"Current invoice is from {} with REA Code {}. Yet it seems that partners {} "
@@ -242,7 +260,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:756
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:764
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -281,11 +299,12 @@ msgstr "Dettagli sconto e maggiorazione"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__display_name
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__display_name
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__display_name
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:862
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -296,6 +315,14 @@ msgstr "Tipo documento %s non gestito."
msgid "E Invoice Validation Error"
msgstr "Errore di validazione e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_validation_message
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_validation_message
+#, fuzzy
+#| msgid "E Invoice Validation Error"
+msgid "E Invoice Validation Message"
+msgstr "Errore di validazione e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
msgid "E-Invoice Tax Amount"
@@ -338,6 +365,13 @@ msgstr "File importato e-fattura"
msgid "E-bill Inconsistencies"
msgstr "Incongruenze e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_descr
+#, fuzzy
+#| msgid "Description"
+msgid "E-bill description"
+msgstr "Descrizione"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
msgid "E-bill import file"
@@ -355,6 +389,13 @@ msgstr "Livello di dettaglio e-fatture"
msgid "E-invoice Discount Supplement Data"
msgstr "Dati sconto maggiorazione e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_date_invoice
+#, fuzzy
+#| msgid "E-invoice line"
+msgid "E-invoice date"
+msgstr "Riga e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
msgid "E-invoice line"
@@ -365,6 +406,13 @@ msgstr "Riga e-fattura"
msgid "E-invoice line other data"
msgstr "Altri dati riga e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_reference
+#, fuzzy
+#| msgid "E-invoice line"
+msgid "E-invoice vendor reference"
+msgstr "Riga e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
msgid "Electronic Bill Import"
@@ -387,7 +435,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1232
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -423,7 +471,7 @@ msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:589
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:597
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -440,6 +488,7 @@ msgstr "Cronologia"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__id
msgid "ID"
msgstr "ID"
@@ -511,6 +560,7 @@ msgstr "Contenuto indicizzato"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__invoice_id
msgid "Invoice"
msgstr "Fattura"
@@ -519,6 +569,14 @@ msgstr "Fattura"
msgid "Invoice Line"
msgstr "Riga fattura"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:142
+#, python-format
+msgid ""
+"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
+"({e_bill_date_invoice})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_is_follower
msgid "Is Follower"
@@ -541,6 +599,7 @@ msgstr "Chiave"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in____last_update
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa____last_update
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice____last_update
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
@@ -551,6 +610,7 @@ msgstr "Ultima modifica il"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__write_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__write_uid
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__write_uid
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"
@@ -561,9 +621,15 @@ msgstr "Ultimo aggiornamento di"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__write_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_import_fatturapa__write_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__write_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__line_ids
+msgid "Line"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Line Detail"
@@ -585,6 +651,13 @@ msgstr "Dettaglio righe"
msgid "Link"
msgstr "Collega"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice_line
+#, fuzzy
+#| msgid "Link to Bill"
+msgid "Link e-bill to bill"
+msgstr "Collega a fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice
msgid "Link to Bill"
@@ -593,7 +666,9 @@ msgstr "Collega a fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_link_supplier_invoice
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
-msgid "Link to existing supplier bill"
+#, fuzzy
+#| msgid "Link to existing supplier bill"
+msgid "Link to existing supplier bills"
msgstr "Collega a fattura fornitore esistente"
#. module: l10n_it_fatturapa_in
@@ -655,7 +730,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:677
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:685
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
@@ -666,13 +741,13 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:839
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:841
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:317
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:325
#, python-format
msgid ""
"No tax with percentage %s and nature %s found. Please configure this tax."
@@ -680,7 +755,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:923
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1113
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale documento %s e aliquota %s non trovata."
@@ -715,15 +790,6 @@ msgstr "Numero di messaggi con errore di consegna"
msgid "Number of unread messages"
msgstr "Numero di messaggi non letti"
-#. module: l10n_it_fatturapa_in
-#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
-msgid ""
-"One or more invoice doesn't match the amount (tax or untaxed or total) of "
-"the original e-invoice. Please check"
-msgstr ""
-"L'importo di una o più fatture (imposta, imponibile o totale) non combacia "
-"con quello della e-fattura originale. Prego controllare"
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -731,19 +797,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:619
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:627
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1153
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1148
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -801,7 +867,7 @@ msgid "Progress data"
msgstr "Dati stato avanzamento lavori"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:213
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:217
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr "Provincia ( %s ) non presente nel sistema"
@@ -812,13 +878,13 @@ msgid "Quantity"
msgstr "Quantità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:245
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:249
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr "Codice provincia dell'ufficio REA ( %s ) non presente nel sistema"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:202
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr "Provincia Albo ( %s ) non presente nel sistema"
@@ -907,7 +973,7 @@ msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr "Il campo cognome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:231
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:235
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr "Regime fiscale %s non presente nel sistema."
@@ -918,11 +984,19 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:510
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:518
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:78
+#, python-format
+msgid ""
+"Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount "
+"({e_bill_amount_tax})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__key
msgid ""
@@ -937,7 +1011,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:911
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -952,20 +1026,11 @@ msgid "The database object this attachment will be attached to."
msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:37
+#: code:addons/l10n_it_fatturapa_in/models/account.py:49
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr "La fattura '%s' non combacia con la relativa e-fattura"
-#. module: l10n_it_fatturapa_in
-#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
-msgid ""
-"The invoice doesn't match one of the amount untaxed, tax amount or total "
-"amount of the original e-invoice. Please check"
-msgstr ""
-"L'imponibile, l'imposta o il totale della fattura non combacia con quello "
-"della e-fattura originale. Prego controllare"
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
msgid "The record id this is attached to."
@@ -987,7 +1052,7 @@ msgid "To Register"
msgstr "Da registrare"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:322
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:330
#, fuzzy, python-format
#| msgid "Too many taxes with percentage %s and nature %s found."
msgid ""
@@ -996,7 +1061,7 @@ msgid ""
msgstr "Rilevate troppe imposte con aliquota %s e natura %s."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:347
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:355
#, python-format
msgid ""
"Too many taxes with percentage equals to '%s'.\n"
@@ -1010,6 +1075,14 @@ msgstr ""
msgid "Total Price"
msgstr "Prezzo totale"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:95
+#, python-format
+msgid ""
+"Total amount ({bill_amount_total}) does not match with e-bill total amount "
+"({e_bill_amount_total})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
#, python-format
@@ -1045,6 +1118,14 @@ msgstr "Messaggi non letti"
msgid "Unread Messages Counter"
msgstr "Contatore messaggi non letti"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:61
+#, python-format
+msgid ""
+"Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed "
+"amount ({e_bill_amount_untaxed})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__url
msgid "Url"
@@ -1066,6 +1147,14 @@ msgstr ""
msgid "VAT Rate"
msgstr "Aliquota IVA"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:131
+#, python-format
+msgid ""
+"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
+"reference ({e_bill_vendor_ref})"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__website_id
msgid "Website"
@@ -1092,7 +1181,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:537
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1109,7 +1198,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:971
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1149
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1119,19 +1208,24 @@ msgstr ""
"presenti nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:519
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:527
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:963
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1141
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:409
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__wizard_id
+msgid "Wizard"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:417
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
@@ -1139,7 +1233,7 @@ msgstr ""
"quella dell'XML."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:338
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:346
#, python-format
msgid ""
"XML contains tax with percentage '%s' but it does not exist in your system"
@@ -1162,7 +1256,7 @@ msgstr ""
"collegamento Internet al file."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:23
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:118
#, python-format
msgid "You can select only one XML file to link."
msgstr "È possibile selezionare solo un file XML da collegare."
@@ -1172,6 +1266,20 @@ msgstr "È possibile selezionare solo un file XML da collegare."
msgid "on"
msgstr "il"
+#~ msgid ""
+#~ "One or more invoice doesn't match the amount (tax or untaxed or total) of "
+#~ "the original e-invoice. Please check"
+#~ msgstr ""
+#~ "L'importo di una o più fatture (imposta, imponibile o totale) non "
+#~ "combacia con quello della e-fattura originale. Prego controllare"
+
+#~ msgid ""
+#~ "The invoice doesn't match one of the amount untaxed, tax amount or total "
+#~ "amount of the original e-invoice. Please check"
+#~ msgstr ""
+#~ "L'imponibile, l'imposta o il totale della fattura non combacia con quello "
+#~ "della e-fattura originale. Prego controllare"
+
#~ msgid "Product used to model DatiBollo XML element on bills"
#~ msgstr ""
#~ "Prodotto usato come modello per l'elemento XML DatiBollo delle fatture."
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index a0d32d32dc53..332827497a7a 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -98,7 +98,7 @@ msgid "Bill number in XML"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:92
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:94
#, python-format
msgid "Bill number {bill_nbr} of {bill_date}.\n"
"Total no tax: {bill_no_tax}\n"
@@ -106,7 +106,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1250
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1260
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -164,7 +164,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1265
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -406,7 +406,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1288
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -706,7 +706,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1103
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1113
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -754,13 +754,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1070
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1065
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -951,7 +951,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1113,7 +1113,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1139
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1149
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1125,7 +1125,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1131
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1141
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
@@ -1158,7 +1158,7 @@ msgid "You can either upload a file from your computer or copy/paste an internet
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:116
+#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:118
#, python-format
msgid "You can select only one XML file to link."
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 31e5aec8c097..a8562874f90f 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -477,13 +477,18 @@ def test_30_xml_import(self):
self.assertEqual(invoice.partner_id.street, 'Viale Repubblica, 34')
def test_01_xml_link(self):
- """einvoice lines are created but Vendor Reference is kept"""
+ """
+ E-invoice lines are created.
+ Vendor Reference and Invoice Date are kept.
+ """
+
supplier = self.env['res.partner'].search(
[('vat', '=', 'IT02780790107')], limit=1)
invoice_values = {
'partner_id': supplier.id,
'type': 'in_invoice',
'reference': 'original_ref',
+ 'date_invoice': date(2020, 1, 1),
}
orig_invoice = self.invoice_model.create(invoice_values)
wiz_values = {
@@ -500,9 +505,17 @@ def test_01_xml_link(self):
invoice_values['reference'],
orig_invoice.reference,
)
+ self.assertEqual(
+ invoice_values['date_invoice'],
+ orig_invoice.date_invoice,
+ )
def test_02_xml_link(self):
- """einvoice lines are created but Vendor Reference is kept"""
+ """
+ E-invoice lines are created.
+ Vendor Reference and Invoice Date are fetched from the XML.
+ """
+
supplier = self.env['res.partner'].search(
[('vat', '=', 'IT02780790107')], limit=1)
invoice_values = {
@@ -520,3 +533,5 @@ def test_02_xml_link(self):
self.assertTrue(orig_invoice.e_invoice_line_ids)
self.assertFalse(orig_invoice.invoice_line_ids)
self.assertTrue(orig_invoice.e_invoice_validation_error)
+ self.assertTrue(orig_invoice.reference)
+ self.assertTrue(orig_invoice.date_invoice)
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index afe25d1f3cba..3a4dce94a2af 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -50,6 +50,8 @@ def link(self):
self.invoice_id.set_einvoice_data(FatturaBody)
+ import_wiz.set_vendor_bill_data(FatturaBody, self.invoice_id)
+
import_wiz.set_e_invoice_lines(FatturaBody, self.invoice_id)
import_wiz.set_summary_data(FatturaBody, self.invoice_id.id)
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index a587c3721f8c..e33d5d192c6e 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -872,10 +872,6 @@ def invoiceCreate(
invoice_data = {
'fiscal_document_type_id': docType_id,
- 'date_invoice':
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data.date(),
- 'reference':
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
'account_id': pay_acc_id,
'type': invtype,
@@ -912,6 +908,8 @@ def invoiceCreate(
invoice.write(invoice._convert_to_write(invoice._cache))
invoice_id = invoice.id
+ self.set_vendor_bill_data(FatturaBody, invoice)
+
# 2.1.1.7
self.set_welfares_fund(
FatturaBody, credit_account_id, invoice, wt_found)
@@ -970,6 +968,18 @@ def invoiceCreate(
invoice.compute_taxes()
return invoice_id
+ def set_vendor_bill_data(self, FatturaBody, invoice):
+ if not invoice.date_invoice:
+ invoice.update({
+ 'date_invoice':
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data.date(),
+ })
+ if not invoice.reference:
+ invoice.update({
+ 'reference':
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
+ })
+
def set_parent_invoice_data(self, FatturaBody, invoice):
ParentInvoice = FatturaBody.DatiGenerali.FatturaPrincipale
if ParentInvoice:
From d5a8480993d9af93568312cf72ff2ea78b656f8c Mon Sep 17 00:00:00 2001
From: Lorenzo Battistini
Date: Wed, 4 Sep 2019 08:34:02 +0000
Subject: [PATCH 057/155] Translated using Weblate (Italian)
Currently translated at 100.0% (207 of 207 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 57 +++++++++++++++++----------------
1 file changed, 30 insertions(+), 27 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 55c8c9d075b0..dfd39559eb9c 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2019-07-24 19:43+0000\n"
+"PO-Revision-Date: 2019-09-04 11:23+0000\n"
"Last-Translator: Lorenzo Battistini \n"
"Language-Team: \n"
"Language: it\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.7.1\n"
+"X-Generator: Weblate 3.8\n"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
@@ -110,10 +110,8 @@ msgstr "Fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_nbr
-#, fuzzy
-#| msgid "Bills Number"
msgid "Bill number in XML"
-msgstr "Numero fatture"
+msgstr "Numero fattura nell'XML"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py:94
@@ -123,6 +121,9 @@ msgid ""
"Total no tax: {bill_no_tax}\n"
"Total tax: {bill_tax}"
msgstr ""
+"Numero fattura {bill_nbr} del {bill_date}.\n"
+"Totale imponibile: {bill_no_tax}\n"
+"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1260
@@ -238,6 +239,9 @@ msgid ""
"Current invoice is from {} with REA Code {}. Yet it seems that partners {} "
"have the same REA Code. This code should be unique; please fix it."
msgstr ""
+"La fattura corrente viene da {} con codice REA {}. Tuttavia sembra che i "
+"partner {} abbiano lo stesso codice REA. questo codice dovrebbe essere unico;"
+" prego correggere."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data__name
@@ -318,10 +322,8 @@ msgstr "Errore di validazione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_validation_message
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_validation_message
-#, fuzzy
-#| msgid "E Invoice Validation Error"
msgid "E Invoice Validation Message"
-msgstr "Errore di validazione e-fattura"
+msgstr "Messaggio di validazione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
@@ -367,10 +369,8 @@ msgstr "Incongruenze e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_descr
-#, fuzzy
-#| msgid "Description"
msgid "E-bill description"
-msgstr "Descrizione"
+msgstr "Descrizione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
@@ -391,10 +391,8 @@ msgstr "Dati sconto maggiorazione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_date_invoice
-#, fuzzy
-#| msgid "E-invoice line"
msgid "E-invoice date"
-msgstr "Riga e-fattura"
+msgstr "Data e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
@@ -408,10 +406,8 @@ msgstr "Altri dati riga e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_reference
-#, fuzzy
-#| msgid "E-invoice line"
msgid "E-invoice vendor reference"
-msgstr "Riga e-fattura"
+msgstr "Riferimento fornitore e-fattura"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_import_fatturapa_form_view
@@ -576,6 +572,8 @@ msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
"({e_bill_date_invoice})"
msgstr ""
+"La data fattura ({bill_date_invoice}) non corrisponde con la data della "
+"fattura elettronica ({e_bill_date_invoice})"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_is_follower
@@ -628,7 +626,7 @@ msgstr "Ultimo aggiornamento il"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice__line_ids
msgid "Line"
-msgstr ""
+msgstr "Riga"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -653,8 +651,6 @@ msgstr "Collega"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_wizard_link_to_invoice_line
-#, fuzzy
-#| msgid "Link to Bill"
msgid "Link e-bill to bill"
msgstr "Collega a fattura"
@@ -666,10 +662,8 @@ msgstr "Collega a fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.actions.act_window,name:l10n_it_fatturapa_in.action_wizard_link_supplier_invoice
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.wizard_link_supplier_invoice
-#, fuzzy
-#| msgid "Link to existing supplier bill"
msgid "Link to existing supplier bills"
-msgstr "Collega a fattura fornitore esistente"
+msgstr "Collega a fatture fornitore esistenti"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_main_attachment_id
@@ -996,6 +990,8 @@ msgid ""
"Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount "
"({e_bill_amount_tax})"
msgstr ""
+"L'importo delle imposte ({bill_amount_tax}) non corrisponde con l'importo "
+"delle imposte della fattura elettronica ({e_bill_amount_tax})"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__key
@@ -1053,12 +1049,13 @@ msgstr "Da registrare"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:330
-#, fuzzy, python-format
-#| msgid "Too many taxes with percentage %s and nature %s found."
+#, python-format
msgid ""
"Too many taxes with percentage %s and nature %s found. Tax %s with lower "
"priority has been set on invoice lines."
-msgstr "Rilevate troppe imposte con aliquota %s e natura %s."
+msgstr ""
+"Troppe imposte con aliquota %s e natura %s trovate. L'imposta %s con "
+"maggiore priorità è stata impostata sulle righe fattura."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:355
@@ -1082,6 +1079,8 @@ msgid ""
"Total amount ({bill_amount_total}) does not match with e-bill total amount "
"({e_bill_amount_total})"
msgstr ""
+"L'importo totale ({bill_amount_total}) non corrisponde con l'importo totale "
+"della fattura elettronica ({e_bill_amount_total})"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
@@ -1125,6 +1124,8 @@ msgid ""
"Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed "
"amount ({e_bill_amount_untaxed})"
msgstr ""
+"L'imponibile ({bill_amount_untaxed}) non corrisponde con l'imponibile della "
+"fattura elettronica ({e_bill_amount_untaxed})"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__url
@@ -1154,6 +1155,8 @@ msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
"reference ({e_bill_vendor_ref})"
msgstr ""
+"Il riferimento fornitore ({bill_vendor_ref}) non corrisponde con il "
+"riferimento fornitore della fattura elettronica ({e_bill_vendor_ref})"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__website_id
@@ -1222,7 +1225,7 @@ msgstr "Cassa previdenziale: %s"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__wizard_id
msgid "Wizard"
-msgstr ""
+msgstr "Procedura guidata"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:417
From c78861dd1506b44f1eb03ea73bf31760b6ffe1ae Mon Sep 17 00:00:00 2001
From: eLBati
Date: Wed, 11 Sep 2019 15:52:20 +0200
Subject: [PATCH 058/155] FIX l10n_it_fatturapa_in when importing XML with 100%
discount. See test case
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../tests/data/IT01234567890_FPR05.xml | 89 +++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 8 ++
.../wizard/wizard_import_fatturapa.py | 2 +-
4 files changed, 99 insertions(+), 2 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index b51ab861e2b7..122aa146e532 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.6.1',
+ 'version': '12.0.1.6.2',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
new file mode 100644
index 000000000000..26e08ca02990
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ FPR05
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2014-12-18
+ 123
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+
+
+ 1
+ LA DESCRIZIONE
+ 1.00
+ 10.00
+ 10.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 1.00
+ 20.00
+
+ SC
+ 100.00
+
+ 0.00
+ 22.00
+
+
+ 22.00
+ 10.00
+ 2.20
+ I
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index a8562874f90f..5cda85937f23 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -476,6 +476,14 @@ def test_30_xml_import(self):
self.assertEqual(invoice.partner_id.id, partner_id.id)
self.assertEqual(invoice.partner_id.street, 'Viale Repubblica, 34')
+ def test_31_xml_import(self):
+ res = self.run_wizard('test31', 'IT01234567890_FPR05.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.invoice_line_ids[1].discount, 100)
+ self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, 0)
+ self.assertEqual(invoice.amount_total, 12.2)
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index e33d5d192c6e..1c4a277b3abc 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -435,7 +435,7 @@ def _prepareInvoiceLine(self, credit_account_id, line, wt_found=False):
if line.Quantita:
retLine['quantity'] = float(line.Quantita)
if (
- float(line.PrezzoTotale) and float(line.PrezzoUnitario) and
+ float(line.PrezzoUnitario) and
line.Quantita and float(line.Quantita) and # Quantita not required
line.ScontoMaggiorazione
):
From 2621f4c9a0cab578aa53de00fdef4ab5106286f2 Mon Sep 17 00:00:00 2001
From: SimoRubi
Date: Wed, 14 Aug 2019 17:23:01 +0200
Subject: [PATCH 059/155] [IMP] l10n_it_fatturapa_in: FatturaPA attachment
names must be unique
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 18 ++++++++++--
.../i18n/l10n_it_fatturapa_in.pot | 12 +++++++-
l10n_it_fatturapa_in/models/attachment.py | 9 ++++++
.../tests/test_import_fatturapa_xml.py | 29 +++++++++++++++----
5 files changed, 60 insertions(+), 10 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 122aa146e532..78de70277928 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.6.2',
+ 'version': '12.0.1.7.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index dfd39559eb9c..0fb84c25bba2 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -79,7 +79,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:95
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:104
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
@@ -240,8 +240,8 @@ msgid ""
"have the same REA Code. This code should be unique; please fix it."
msgstr ""
"La fattura corrente viene da {} con codice REA {}. Tuttavia sembra che i "
-"partner {} abbiano lo stesso codice REA. questo codice dovrebbe essere unico;"
-" prego correggere."
+"partner {} abbiano lo stesso codice REA. questo codice dovrebbe essere "
+"unico; prego correggere."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data__name
@@ -394,6 +394,13 @@ msgstr "Dati sconto maggiorazione e-fattura"
msgid "E-invoice date"
msgstr "Data e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
+#, fuzzy
+#| msgid "E-invoice line"
+msgid "E-invoice file name"
+msgstr "Riga e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
msgid "E-invoice line"
@@ -1027,6 +1034,11 @@ msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr "La fattura '%s' non combacia con la relativa e-fattura"
+#. module: l10n_it_fatturapa_in
+#: sql_constraint:fatturapa.attachment.in:0
+msgid "The name of the e-invoice file must be unique!"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
msgid "The record id this is attached to."
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 332827497a7a..3091ffe4859c 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -67,7 +67,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:95
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:104
#, python-format
msgid "Attachment without name"
msgstr ""
@@ -369,6 +369,11 @@ msgstr ""
msgid "E-invoice date"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
+msgid "E-invoice file name"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
msgid "E-invoice line"
@@ -967,6 +972,11 @@ msgstr ""
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: sql_constraint:fatturapa.attachment.in:0
+msgid "The name of the e-invoice file must be unique!"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
msgid "The record id this is attached to."
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 6e6b69163513..3eb34de44bea 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -12,6 +12,10 @@ class FatturaPAAttachmentIn(models.Model):
ir_attachment_id = fields.Many2one(
'ir.attachment', 'Attachment', required=True, ondelete="cascade")
+ att_name = fields.Char(
+ string="E-invoice file name",
+ related='ir_attachment_id.name',
+ store=True)
in_invoice_ids = fields.One2many(
'account.invoice', 'fatturapa_attachment_in_id',
string="In Bills", readonly=True)
@@ -34,6 +38,11 @@ class FatturaPAAttachmentIn(models.Model):
e_invoice_validation_message = fields.Text(
compute='_compute_e_invoice_validation_error')
+ _sql_constraints = [(
+ 'ftpa_attachment_in_name_uniq',
+ 'unique(att_name)',
+ 'The name of the e-invoice file must be unique!')]
+
@api.depends('in_invoice_ids.e_invoice_validation_error')
def _compute_e_invoice_validation_error(self):
for att in self:
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 5cda85937f23..4317e8c1dc8a 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -1,9 +1,28 @@
+from psycopg2 import IntegrityError
from datetime import date
+
+from odoo.tools import mute_logger
from .fatturapa_common import FatturapaCommon
from odoo.exceptions import UserError
+class TestDuplicatedAttachment(FatturapaCommon):
+
+ def test_duplicated_attachment(self):
+ """Attachment name must be unique"""
+ # This test breaks the current transaction
+ # and every test executed after this in the
+ # same transaction would fail.
+ # Note that all the tests in TestFatturaPAXMLValidation
+ # are executed in the same transaction.
+ self.run_wizard('test_duplicated', 'IT02780790107_11005.xml')
+ with self.assertRaises(IntegrityError) as ie:
+ with mute_logger('odoo.sql_db'):
+ self.run_wizard('test_duplicated', 'IT02780790107_11005.xml')
+ self.assertEqual(ie.exception.pgcode, '23505')
+
+
class TestFatturaPAXMLValidation(FatturapaCommon):
def setUp(self):
@@ -257,7 +276,7 @@ def test_13_xml_import(self):
# inconsistencies must not be duplicated
res = self.run_wizard_multi([
'IT02780790107_11005.xml',
- 'IT02780790107_11005.xml',
+ 'IT02780790107_11006.xml',
])
invoice1_id = res.get('domain')[0][2][0]
invoice2_id = res.get('domain')[0][2][1]
@@ -303,7 +322,7 @@ def test_15_xml_import(self):
def test_16_xml_import(self):
# file B2B downloaded from
# http://www.fatturapa.gov.it/export/fatturazione/it/a-3.htm
- res = self.run_wizard('test16', 'IT01234567890_FPR03.xml')
+ res = self.run_wizard('test16a', 'IT01234567890_FPR03.xml')
invoice_ids = res.get('domain')[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
@@ -329,7 +348,7 @@ def test_16_xml_import(self):
'product_tmpl_id': self.headphones.id,
'product_code': 'ART123',
})
- res = self.run_wizard('test17', 'IT01234567890_FPR03.xml')
+ res = self.run_wizard('test16b', 'IT01234567890_FPR03.xml')
invoice_ids = res.get('domain')[0][2]
invoices = self.invoice_model.browse(invoice_ids)
for invoice in invoices:
@@ -348,7 +367,7 @@ def test_16_xml_import(self):
# change Livello di dettaglio Fatture elettroniche to Minimo
partner.e_invoice_detail_level = '0'
- res = self.run_wizard('test17', 'IT01234567890_FPR03.xml')
+ res = self.run_wizard('test16c', 'IT01234567890_FPR03.xml')
invoice_ids = res.get('domain')[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertTrue(len(invoices) == 2)
@@ -470,7 +489,7 @@ def test_30_xml_import(self):
'street': 'Viale Repubblica, 34',
'electronic_invoice_no_contact_update': True,
})
- res = self.run_wizard('test30', 'IT05979361218_002.xml')
+ res = self.run_wizard('test30a', 'IT05979361218_002.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id.id, partner_id.id)
From a3f7045225612d2dc97cee4af2af37fc661dcb58 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Mon, 30 Sep 2019 22:42:50 +0200
Subject: [PATCH 060/155] [FIX] e-invoice translation source terms
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 16 ++++++++--------
.../i18n/l10n_it_fatturapa_in.pot | 12 ++++++------
l10n_it_fatturapa_in/models/attachment.py | 4 ++--
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 78de70277928..176b6e321588 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.7.0',
+ 'version': '12.0.1.7.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 0fb84c25bba2..53665684bcc0 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -372,6 +372,13 @@ msgstr "Incongruenze e-fattura"
msgid "E-bill description"
msgstr "Descrizione e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
+#, fuzzy
+#| msgid "E-invoice line"
+msgid "E-bill file name"
+msgstr "Riga e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
msgid "E-bill import file"
@@ -394,13 +401,6 @@ msgstr "Dati sconto maggiorazione e-fattura"
msgid "E-invoice date"
msgstr "Data e-fattura"
-#. module: l10n_it_fatturapa_in
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
-#, fuzzy
-#| msgid "E-invoice line"
-msgid "E-invoice file name"
-msgstr "Riga e-fattura"
-
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
msgid "E-invoice line"
@@ -1036,7 +1036,7 @@ msgstr "La fattura '%s' non combacia con la relativa e-fattura"
#. module: l10n_it_fatturapa_in
#: sql_constraint:fatturapa.attachment.in:0
-msgid "The name of the e-invoice file must be unique!"
+msgid "The name of the e-bill file must be unique!"
msgstr ""
#. module: l10n_it_fatturapa_in
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 3091ffe4859c..ba36e60c0462 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -347,6 +347,11 @@ msgstr ""
msgid "E-bill description"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
+msgid "E-bill file name"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
msgid "E-bill import file"
@@ -369,11 +374,6 @@ msgstr ""
msgid "E-invoice date"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
-msgid "E-invoice file name"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_einvoice_line
msgid "E-invoice line"
@@ -974,7 +974,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: sql_constraint:fatturapa.attachment.in:0
-msgid "The name of the e-invoice file must be unique!"
+msgid "The name of the e-bill file must be unique!"
msgstr ""
#. module: l10n_it_fatturapa_in
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 3eb34de44bea..327b0a7f62e5 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -13,7 +13,7 @@ class FatturaPAAttachmentIn(models.Model):
ir_attachment_id = fields.Many2one(
'ir.attachment', 'Attachment', required=True, ondelete="cascade")
att_name = fields.Char(
- string="E-invoice file name",
+ string="E-bill file name",
related='ir_attachment_id.name',
store=True)
in_invoice_ids = fields.One2many(
@@ -41,7 +41,7 @@ class FatturaPAAttachmentIn(models.Model):
_sql_constraints = [(
'ftpa_attachment_in_name_uniq',
'unique(att_name)',
- 'The name of the e-invoice file must be unique!')]
+ 'The name of the e-bill file must be unique!')]
@api.depends('in_invoice_ids.e_invoice_validation_error')
def _compute_e_invoice_validation_error(self):
From 4243f422fb2f1e5b393bedfdcc6cbf0a40c46083 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Thu, 17 Jan 2019 15:17:04 +0100
Subject: [PATCH 061/155] l10n_it_fatturapa_in: IMP e-invoice modules: multi
company
---
l10n_it_fatturapa_in/security/rules.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 l10n_it_fatturapa_in/security/rules.xml
diff --git a/l10n_it_fatturapa_in/security/rules.xml b/l10n_it_fatturapa_in/security/rules.xml
new file mode 100644
index 000000000000..d4ee92bb4934
--- /dev/null
+++ b/l10n_it_fatturapa_in/security/rules.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ Fatturapa in fatturapa_in_multi_company_rule multi company rule
+
+
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+
+
+
From c6c569cb0285c9c8b39d43b87f7b5fe7947099c2 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Thu, 1 Aug 2019 16:48:13 +0200
Subject: [PATCH 062/155] [12.0][l10n_it_fatturapa_pec] Cleanup company details
and fix related view for the multicompany
---
l10n_it_fatturapa_in/__manifest__.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 176b6e321588..4671c3d131fe 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.7.1',
+ 'version': '12.0.1.8.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
@@ -23,9 +23,10 @@
'views/account_view.xml',
'views/partner_view.xml',
'wizard/wizard_import_fatturapa_view.xml',
- 'security/ir.model.access.csv',
'wizard/link_to_existing_invoice.xml',
'views/company_view.xml',
+ 'security/ir.model.access.csv',
+ 'security/rules.xml',
],
"installable": True
}
From dbb653e58e0a246d1f9f4f62e0ac2dd31c9decb4 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Thu, 1 Aug 2019 18:52:24 +0200
Subject: [PATCH 063/155] [12.0][l10n_it_fatturapa_in] Supporto per la
rilevazione degli arrotondamenti in fatture elettroniche d'acquisto
---
l10n_it_fatturapa_in/README.rst | 23 +++++
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 97 ++++++++++++++++---
.../i18n/l10n_it_fatturapa_in.pot | 90 ++++++++++++++---
l10n_it_fatturapa_in/models/account.py | 14 +--
l10n_it_fatturapa_in/models/company.py | 60 +++++++-----
l10n_it_fatturapa_in/readme/ROADMAP.rst | 19 ++++
.../static/description/index.html | 37 +++++--
.../tests/data/IT05979361218_012.xml | 94 ++++++++++++++++++
.../tests/data/IT05979361218_013.xml | 94 ++++++++++++++++++
.../tests/fatturapa_common.py | 15 +++
.../tests/test_import_fatturapa_xml.py | 16 +++
l10n_it_fatturapa_in/views/company_view.xml | 12 +++
.../wizard/link_to_existing_invoice.py | 2 +-
.../wizard/wizard_import_fatturapa.py | 56 ++++++++++-
15 files changed, 556 insertions(+), 75 deletions(-)
create mode 100644 l10n_it_fatturapa_in/readme/ROADMAP.rst
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_012.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index f5b30b55b77b..b438d58cc01b 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -123,6 +123,29 @@ Nell'elenco file delle fatture elettroniche in ingresso saranno presenti, in mod
In the incoming electronic bill files list you will see, by default, files to be registered. These are files not yet linked to one or more bills.
+Known issues / Roadmap
+======================
+
+Il modulo contiene un cambiamento alla firma di un metodo in ``models/account.py``
+il quale cambia da
+
+``compute_xml_amount_untaxed(self, DatiRiepilogo)``
+
+a
+
+``compute_xml_amount_untaxed(self, FatturaBody)``
+
+Il cambiamento è dovuto all'implementazione della gestione degli arrotondamenti
+che posso essere presenti in 2 sezioni diverse del file XML della fattura elettronica.
+
+La soluzione ottimale è stata di cambiare la firma del metodo per consentire
+la visibilità delle sezioni ``FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo`` e
+``FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento`` dove è presente il nodo ``Arrotondamento``
+
+Pertanto, al fine di ottenere il corretto valore del totale imponibile, i moduli che
+avessero ridefinito il metodo ``compute_xml_amount_untaxed`` nel modello ``account.invoice``
+dovranno adeguare la chiamata al metodo stesso preoccupandosi di utilizzare come primo parametro l'oggetto ``FatturaElettronicaBody``.
+
Bug Tracker
===========
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 4671c3d131fe..b304c16d218d 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.8.0',
+ 'version': '12.0.1.9.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 53665684bcc0..816e75961bd8 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -36,6 +36,18 @@ msgstr ""
msgid "Access Token"
msgstr "Token di accesso"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_passivi_account_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_passivi_account_id
+msgid "Account used to round down bills amount."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_attivi_account_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_attivi_account_id
+msgid "Account used to round up bills amount."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_needaction
msgid "Action Needed"
@@ -126,7 +138,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1260
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1314
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -184,7 +196,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1329
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -438,7 +450,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1352
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -756,7 +768,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1113
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1167
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale documento %s e aliquota %s non trovata."
@@ -804,13 +816,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1134
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -848,15 +860,9 @@ msgstr ""
"Prodotto usato come modello per l'elemento XML DatiCassaPrevidenziale delle "
"fatture."
-#. module: l10n_it_fatturapa_in
-#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__sconto_maggiorazione_product_id
-msgid "Product used to model ScontoMaggiorazione XML element on bills"
-msgstr ""
-"Prodotto usato come modello per l'elemento XML ScontoMaggiorazione delle "
-"fatture."
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__sconto_maggiorazione_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__sconto_maggiorazione_product_id
msgid "Product used to model ScontoMaggiorazione XML element on bills."
msgstr ""
"Prodotto usato come modello per l'elemento XML ScontoMaggiorazione delle "
@@ -937,6 +943,54 @@ msgstr "Modello risorsa"
msgid "Resource Name"
msgstr "Nome risorsa"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_passivi_account_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_passivi_account_id
+msgid "Round Down Account"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_attivi_account_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_attivi_account_id
+msgid "Round Up Account"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1068
+#, python-format
+msgid "Round down account is not set in Accounting Settings"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1062
+#, python-format
+msgid "Round up account is not set in Accounting Settings"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
+#, python-format
+msgid "Round up and down tax is not set"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
+msgid "Rounding Tax"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#, python-format
+msgid "Rounding down"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#, python-format
+msgid "Rounding up"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__service_type
msgid "Sale Provision Type"
@@ -990,6 +1044,12 @@ msgstr "Ritenuta d'acconto"
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
+msgid "Tax used to both round up and down bills amount."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:78
#, python-format
@@ -1014,7 +1074,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1213,7 +1273,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1149
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1229,7 +1289,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1141
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
@@ -1281,6 +1341,11 @@ msgstr "È possibile selezionare solo un file XML da collegare."
msgid "on"
msgstr "il"
+#~ msgid "Product used to model ScontoMaggiorazione XML element on bills"
+#~ msgstr ""
+#~ "Prodotto usato come modello per l'elemento XML ScontoMaggiorazione delle "
+#~ "fatture."
+
#~ msgid ""
#~ "One or more invoice doesn't match the amount (tax or untaxed or total) of "
#~ "the original e-invoice. Please check"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index ba36e60c0462..5cc207b02ffd 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -24,6 +24,18 @@ msgstr ""
msgid "Access Token"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_passivi_account_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_passivi_account_id
+msgid "Account used to round down bills amount."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_attivi_account_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_attivi_account_id
+msgid "Account used to round up bills amount."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_needaction
msgid "Action Needed"
@@ -106,7 +118,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1260
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1314
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -164,7 +176,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1329
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -411,7 +423,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1352
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -711,7 +723,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1113
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1167
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -759,13 +771,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1134
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -801,13 +813,9 @@ msgstr ""
msgid "Product used to model DatiCassaPrevidenziale XML element on bills."
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__sconto_maggiorazione_product_id
-msgid "Product used to model ScontoMaggiorazione XML element on bills"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__sconto_maggiorazione_product_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__sconto_maggiorazione_product_id
msgid "Product used to model ScontoMaggiorazione XML element on bills."
msgstr ""
@@ -886,6 +894,54 @@ msgstr ""
msgid "Resource Name"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_passivi_account_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_passivi_account_id
+msgid "Round Down Account"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_attivi_account_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_attivi_account_id
+msgid "Round Up Account"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1068
+#, python-format
+msgid "Round down account is not set in Accounting Settings"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1062
+#, python-format
+msgid "Round up account is not set in Accounting Settings"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
+#, python-format
+msgid "Round up and down tax is not set"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
+msgid "Rounding Tax"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#, python-format
+msgid "Rounding down"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#, python-format
+msgid "Rounding up"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__service_type
msgid "Sale Provision Type"
@@ -939,6 +995,12 @@ msgstr ""
msgid "Tax kind %s not found"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
+#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
+msgid "Tax used to both round up and down bills amount."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:78
#, python-format
@@ -956,7 +1018,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1123,7 +1185,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1149
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1135,7 +1197,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1141
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 651824151643..a09ec93ba744 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -179,10 +179,13 @@ def remove_attachment_link(self):
return {'type': 'ir.actions.client', 'tag': 'reload'}
@api.model
- def compute_xml_amount_untaxed(self, DatiRiepilogo):
- amount_untaxed = 0.0
- for Riepilogo in DatiRiepilogo:
- amount_untaxed += float(Riepilogo.ImponibileImporto)
+ def compute_xml_amount_untaxed(self, FatturaBody):
+ amount_untaxed = float(
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento
+ or 0.0)
+ for Riepilogo in FatturaBody.DatiBeniServizi.DatiRiepilogo:
+ rounding = float(Riepilogo.Arrotondamento or 0.0)
+ amount_untaxed += float(Riepilogo.ImponibileImporto) + rounding
return amount_untaxed
@api.model
@@ -194,8 +197,7 @@ def compute_xml_amount_tax(self, DatiRiepilogo):
def set_einvoice_data(self, fattura):
self.ensure_one()
- amount_untaxed = self.compute_xml_amount_untaxed(
- fattura.DatiBeniServizi.DatiRiepilogo)
+ amount_untaxed = self.compute_xml_amount_untaxed(fattura)
amount_tax = self.compute_xml_amount_tax(
fattura.DatiBeniServizi.DatiRiepilogo)
amount_total = float(
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 5b1dac6da8e7..6f26694fa03b 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -1,9 +1,10 @@
-from odoo import fields, models, api
+from odoo import fields, models
class ResCompany(models.Model):
_inherit = 'res.company'
+
cassa_previdenziale_product_id = fields.Many2one(
'product.product', 'Welfare Fund Data Product',
help="Product used to model DatiCassaPrevidenziale XML element "
@@ -12,38 +13,45 @@ class ResCompany(models.Model):
sconto_maggiorazione_product_id = fields.Many2one(
'product.product', 'Discount Supplement Product',
help="Product used to model ScontoMaggiorazione XML element on bills."
- )
+ )
+
+ arrotondamenti_attivi_account_id = fields.Many2one(
+ 'account.account', 'Round Up Account',
+ domain=[('deprecated', '=', False)],
+ help="Account used to round up bills amount."
+ )
+ arrotondamenti_passivi_account_id = fields.Many2one(
+ 'account.account', 'Round Down Account',
+ domain=[('deprecated', '=', False)],
+ help="Account used to round down bills amount."
+ )
+ arrotondamenti_tax_id = fields.Many2one(
+ 'account.tax', 'Rounding Tax',
+ domain=[('type_tax_use', '=', 'purchase'), ('amount', '=', 0.0)],
+ help="Tax used to both round up and down bills amount."
+ )
class AccountConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
+
cassa_previdenziale_product_id = fields.Many2one(
related='company_id.cassa_previdenziale_product_id',
- string="Welfare Fund Data Product",
- help="Product used to model DatiCassaPrevidenziale XML element "
- "on bills.", readonly=False
+ readonly=False
)
sconto_maggiorazione_product_id = fields.Many2one(
related='company_id.sconto_maggiorazione_product_id',
- string="Discount Supplement Product",
- help='Product used to model ScontoMaggiorazione XML element on bills',
readonly=False
- )
-
- @api.onchange('company_id')
- def onchange_company_id(self):
- res = super(AccountConfigSettings, self).onchange_company_id()
- if self.company_id:
- company = self.company_id
- self.cassa_previdenziale_product_id = (
- company.cassa_previdenziale_product_id and
- company.cassa_previdenziale_product_id.id or False
- )
- self.sconto_maggiorazione_product_id = (
- company.sconto_maggiorazione_product_id and
- company.sconto_maggiorazione_product_id.id or False
- )
- else:
- self.cassa_previdenziale_product_id = False
- self.sconto_maggiorazione_product_id = False
- return res
+ )
+ arrotondamenti_attivi_account_id = fields.Many2one(
+ related='company_id.arrotondamenti_attivi_account_id',
+ readonly=False
+ )
+ arrotondamenti_passivi_account_id = fields.Many2one(
+ related='company_id.arrotondamenti_passivi_account_id',
+ readonly=False
+ )
+ arrotondamenti_tax_id = fields.Many2one(
+ related='company_id.arrotondamenti_tax_id',
+ readonly=False
+ )
diff --git a/l10n_it_fatturapa_in/readme/ROADMAP.rst b/l10n_it_fatturapa_in/readme/ROADMAP.rst
new file mode 100644
index 000000000000..9ec04c0ccbb1
--- /dev/null
+++ b/l10n_it_fatturapa_in/readme/ROADMAP.rst
@@ -0,0 +1,19 @@
+Il modulo contiene un cambiamento alla firma di un metodo in ``models/account.py``
+il quale cambia da
+
+``compute_xml_amount_untaxed(self, DatiRiepilogo)``
+
+a
+
+``compute_xml_amount_untaxed(self, FatturaBody)``
+
+Il cambiamento è dovuto all'implementazione della gestione degli arrotondamenti
+che posso essere presenti in 2 sezioni diverse del file XML della fattura elettronica.
+
+La soluzione ottimale è stata di cambiare la firma del metodo per consentire
+la visibilità delle sezioni ``FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo`` e
+``FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento`` dove è presente il nodo ``Arrotondamento``
+
+Pertanto, al fine di ottenere il corretto valore del totale imponibile, i moduli che
+avessero ridefinito il metodo ``compute_xml_amount_untaxed`` nel modello ``account.invoice``
+dovranno adeguare la chiamata al metodo stesso preoccupandosi di utilizzare come primo parametro l'oggetto ``FatturaElettronicaBody``.
\ No newline at end of file
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index c63536c197d9..a4372e9ecc9e 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -384,11 +384,12 @@ ITA - Fattura elettronica - Ricezione
Installation
Configuration
Usage
-Bug Tracker
-Credits
@@ -454,8 +455,24 @@
In the incoming electronic bill files list you will see, by default, files to be registered. These are files not yet linked to one or more bills.
+
+
+
Il modulo contiene un cambiamento alla firma di un metodo in models/account.py
+il quale cambia da
+
compute_xml_amount_untaxed(self, DatiRiepilogo)
+
a
+
compute_xml_amount_untaxed(self, FatturaBody)
+
Il cambiamento è dovuto all’implementazione della gestione degli arrotondamenti
+che posso essere presenti in 2 sezioni diverse del file XML della fattura elettronica.
+
La soluzione ottimale è stata di cambiare la firma del metodo per consentire
+la visibilità delle sezioni FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo e
+FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento dove è presente il nodo Arrotondamento
+
Pertanto, al fine di ottenere il corretto valore del totale imponibile, i moduli che
+avessero ridefinito il metodo compute_xml_amount_untaxed nel modello account.invoice
+dovranno adeguare la chiamata al metodo stesso preoccupandosi di utilizzare come primo parametro l’oggetto FatturaElettronicaBody .
+
-
+
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
@@ -463,16 +480,16 @@
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
Agile Business Group
Innoviu
-
+
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_012.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_012.xml
new file mode 100644
index 000000000000..84f640e0730d
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_012.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 006
+ FPA12
+ UFPQ1O
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2019-05-11
+ 852S1
+ 34.32
+ Rif ordine 908
+
+
+
+
+ 1
+ USB4
+ 1.00
+ Pz.
+ 18.07
+ 18.07
+ 0.00
+ N4
+
+
+ 2
+ USB
+ 1.00
+ Pz.
+ 16.60
+ 16.60
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ -0.35
+ 34.67
+ 0.00
+ I
+ Esenzione Art.8 comma 1 DPR 633/72
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml
new file mode 100644
index 000000000000..2ade52ad22b1
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 006
+ FPA12
+ UFPQ1O
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2019-05-11
+ 852S1
+ 34.32
+ -0.35
+ Rif ordine 908
+
+
+
+
+ 1
+ USB4
+ 1.00
+ Pz.
+ 18.07
+ 18.07
+ 0.00
+ N4
+
+
+ 2
+ USB
+ 1.00
+ Pz.
+ 16.60
+ 16.60
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 34.67
+ 0.00
+ I
+ Esenzione Art.8 comma 1 DPR 633/72
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index d903f23fa5f5..10ffcbac31f7 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -84,3 +84,18 @@ def setUp(self):
self.imac = self.env.ref(
'product.product_product_8_product_template')
self.service = self.env.ref('product.product_product_1')
+ arrotondamenti_attivi_account_id = self.env['account.account'].\
+ search([('user_type_id', '=', self.env.ref(
+ 'account.data_account_type_other_income').id)], limit=1).id
+ arrotondamenti_passivi_account_id = self.env['account.account'].\
+ search([('user_type_id', '=', self.env.ref(
+ 'account.data_account_type_direct_costs').id)], limit=1).id
+ arrotondamenti_tax_id = self.env['account.tax'].search(
+ [('type_tax_use', '=', 'purchase'),
+ ('amount', '=', 0.0)], order='sequence', limit=1)
+ self.env.user.company_id.arrotondamenti_attivi_account_id = (
+ arrotondamenti_attivi_account_id)
+ self.env.user.company_id.arrotondamenti_passivi_account_id = (
+ arrotondamenti_passivi_account_id)
+ self.env.user.company_id.arrotondamenti_tax_id = (
+ arrotondamenti_tax_id)
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 4317e8c1dc8a..810961a789ea 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -478,6 +478,22 @@ def test_23_xml_import(self):
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
+ def test_24_xml_import(self):
+ res = self.run_wizard('test24', 'IT05979361218_012.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.32)
+ self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
+ self.assertEqual(invoice.e_invoice_amount_total, 34.32)
+
+ def test_25_xml_import(self):
+ res = self.run_wizard('test25', 'IT05979361218_013.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.32)
+ self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
+ self.assertEqual(invoice.e_invoice_amount_total, 34.32)
+
def test_30_xml_import(self):
self.env.user.company_id.cassa_previdenziale_product_id = (
self.service.id)
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 6ba336c43839..2b1957c986cb 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -27,6 +27,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index 3a4dce94a2af..9d0b8bbe5ff8 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -104,7 +104,7 @@ def _get_default_lines_vals(self, attachment):
bill_nbr=dati_generali_documento.Numero,
bill_date=dati_generali_documento.Data,
bill_no_tax=invoice_model.compute_xml_amount_untaxed(
- dati_riepilogo),
+ FatturaBody),
bill_tax=invoice_model.compute_xml_amount_tax(
dati_riepilogo)
),
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 1c4a277b3abc..15908dc5ea48 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -964,6 +964,8 @@ def invoiceCreate(
self._addGlobalDiscount(
invoice_id, FatturaBody.DatiGenerali.DatiGeneraliDocumento)
+ self.set_roundings(FatturaBody, invoice)
+
# compute the invoice
invoice.compute_taxes()
return invoice_id
@@ -1044,6 +1046,58 @@ def set_art73(self, FatturaBody, invoice_data):
if FatturaBody.DatiGenerali.DatiGeneraliDocumento.Art73:
invoice_data['art73'] = True
+ def set_roundings(self, FatturaBody, invoice):
+ rounding = 0.0
+ if FatturaBody.DatiBeniServizi.DatiRiepilogo:
+ for summary in FatturaBody.DatiBeniServizi.DatiRiepilogo:
+ rounding += float(summary.Arrotondamento or 0.0)
+ if FatturaBody.DatiGenerali.DatiGeneraliDocumento:
+ summary = FatturaBody.DatiGenerali.DatiGeneraliDocumento
+ rounding += float(summary.Arrotondamento or 0.0)
+
+ if rounding:
+ arrotondamenti_attivi_account_id = self.env.user.company_id.\
+ arrotondamenti_attivi_account_id
+ if not arrotondamenti_attivi_account_id:
+ raise UserError(_("Round up account is not set "
+ "in Accounting Settings"))
+
+ arrotondamenti_passivi_account_id = self.env.user.company_id.\
+ arrotondamenti_passivi_account_id
+ if not arrotondamenti_passivi_account_id:
+ raise UserError(_("Round down account is not set "
+ "in Accounting Settings"))
+
+ arrotondamenti_tax_id = self.env.user.company_id.\
+ arrotondamenti_tax_id
+ if not arrotondamenti_tax_id:
+ self.log_inconsistency(
+ _('Round up and down tax is not set')
+ )
+
+ line_vals = {}
+ if rounding > 0.0:
+ line_vals = {
+ 'invoice_id': invoice.id,
+ 'name': _("Rounding down"),
+ 'account_id': arrotondamenti_passivi_account_id.id,
+ 'price_unit': rounding,
+ 'invoice_line_tax_ids':
+ [(6, 0, [arrotondamenti_tax_id.id])],
+ }
+ elif rounding < 0.0:
+ line_vals = {
+ 'invoice_id': invoice.id,
+ 'name': _("Rounding up"),
+ 'account_id': arrotondamenti_attivi_account_id.id,
+ 'price_unit': rounding,
+ 'invoice_line_tax_ids':
+ [(6, 0, [arrotondamenti_tax_id.id])],
+ }
+
+ if line_vals:
+ self.env['account.invoice.line'].create(line_vals)
+
def set_efatt_rounding(self, FatturaBody, invoice_data):
if FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento:
invoice_data['efatt_rounding'] = float(
@@ -1267,7 +1321,7 @@ def check_invoice_amount(self, invoice, FatturaElettronicaBody):
# because otherwise DatiRiepilogo and odoo invoice total would
# differ
amount_untaxed = invoice.compute_xml_amount_untaxed(
- FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo)
+ FatturaElettronicaBody)
if not float_is_zero(
invoice.amount_untaxed-amount_untaxed, precision_digits=2
):
From de27c7736d72a9ecfd04c7720203fec82a521cb7 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Tue, 24 Sep 2019 09:59:13 +0200
Subject: [PATCH 064/155] [10.0][l10n_it_fatturapa_in] Add correct Enasarco
support
---
l10n_it_fatturapa_in/models/company.py | 4 +
.../tests/data/IT05979361218_014.xml | 105 ++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 79 +++++++++++++
l10n_it_fatturapa_in/views/company_view.xml | 4 +
.../wizard/wizard_import_fatturapa.py | 79 ++++++++++++-
5 files changed, 268 insertions(+), 3 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 6f26694fa03b..f8ed564df176 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -30,6 +30,7 @@ class ResCompany(models.Model):
domain=[('type_tax_use', '=', 'purchase'), ('amount', '=', 0.0)],
help="Tax used to both round up and down bills amount."
)
+ enasarco_relax_checks = fields.Boolean('Relax checks for Enasarco')
class AccountConfigSettings(models.TransientModel):
@@ -55,3 +56,6 @@ class AccountConfigSettings(models.TransientModel):
related='company_id.arrotondamenti_tax_id',
readonly=False
)
+ enasarco_relax_checks = fields.Boolean(
+ related='company_id.enasarco_relax_checks',
+ )
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml
new file mode 100644
index 000000000000..7f6ccbe03c81
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 00001
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2019-07-02
+ FPR 16/19
+
+ RT01
+ 284.05
+ 11.50
+ A
+
+
+ TC07
+ 1.57
+ 38.78
+ 2470.00
+ 0.00
+ N2
+
+ 3013.40
+
+
+
+
+ 1
+ ACCONTO PROVVIGIONI
+ 1.00
+ 2470.00
+ 2470.00
+ 22.00
+ SI
+
+
+ 22.00
+ 2470.00
+ 543.40
+
+
+ 0.00
+ N2
+ 38.78
+ 0.00
+ Escluso Art. 13 5C DPR 633/72
+
+
+
+ TP02
+
+ MP05
+ 2019-07-02
+ 2690.57
+
+
+
+
\ No newline at end of file
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 810961a789ea..7d42a07a4ca1 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -28,6 +28,8 @@ class TestFatturaPAXMLValidation(FatturapaCommon):
def setUp(self):
super(TestFatturaPAXMLValidation, self).setUp()
+ self.invoice_model = self.env['account.invoice']
+
def test_00_xml_import(self):
self.env.user.company_id.cassa_previdenziale_product_id = (
self.service.id)
@@ -578,3 +580,80 @@ def test_02_xml_link(self):
self.assertTrue(orig_invoice.e_invoice_validation_error)
self.assertTrue(orig_invoice.reference)
self.assertTrue(orig_invoice.date_invoice)
+
+
+class TestFatturaPAEnasarco(FatturapaCommon):
+
+ def setUp(self):
+ super(TestFatturaPAEnasarco, self).setUp()
+
+ self.invoice_model = self.env['account.invoice']
+
+ account_payable = self.env['account.account'].create({
+ 'name': 'Test WH tax',
+ 'code': 'whtaxpay2',
+ 'user_type_id': self.env.ref(
+ 'account.data_account_type_payable').id,
+ 'reconcile': True})
+ account_receivable = self.env['account.account'].create({
+ 'name': 'Test WH tax',
+ 'code': 'whtaxrec2',
+ 'user_type_id': self.env.ref(
+ 'account.data_account_type_receivable').id,
+ 'reconcile': True})
+ misc_journal = self.env['account.journal']. \
+ search([("code", "=", "MISC")])
+ welfare_fund_type_id = self.env['welfare.fund.type']. \
+ search([('name', '=', 'TC07')])
+ self.env['withholding.tax'].create({
+ 'name': 'Enasarco',
+ 'code': 'TC07',
+ 'account_receivable_id': account_receivable.id,
+ 'account_payable_id': account_payable.id,
+ 'journal_id': misc_journal.id,
+ 'payment_term': self.env.ref(
+ 'account.account_payment_term_advance').id,
+ 'welfare_fund_type_id': welfare_fund_type_id.id,
+ 'wt_types': 'enasarco',
+ 'rate_ids': [(0, 0, {
+ 'tax': 1.57,
+ 'base': 1.0,
+ })]
+ })
+ self.env['withholding.tax'].create({
+ 'name': '1040/3',
+ 'code': '1040',
+ 'account_receivable_id': account_receivable.id,
+ 'account_payable_id': account_payable.id,
+ 'journal_id': misc_journal.id,
+ 'payment_term': self.env.ref(
+ 'account.account_payment_term_advance').id,
+ 'welfare_fund_type_id': False,
+ 'wt_types': 'ritenuta',
+ 'causale_pagamento_id': self.env.ref(
+ 'l10n_it_causali_pagamento.a').id,
+ 'rate_ids': [(0, 0, {
+ 'tax': 11.50,
+ 'base': 1.0,
+ })]
+ })
+
+ def test_01_xml_import_enasarco(self):
+ res = self.run_wizard('test01', 'IT05979361218_014.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
+ self.assertEqual(invoice.amount_untaxed, 2470.00)
+ self.assertEqual(invoice.amount_tax, 543.40)
+ self.assertEqual(invoice.amount_total, 3013.40)
+ self.assertEqual(invoice.amount_net_pay, 2690.57)
+ self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, 'N2')
+ self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].name, 'ACCONTO PROVVIGIONI')
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].qty, 1.0)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].unit_price, 2470.0)
+ self.assertEqual(
+ invoice.e_invoice_line_ids[0].total_price, 2470.0)
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 2b1957c986cb..8f3b1ea8fd6d 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -39,6 +39,10 @@
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 15908dc5ea48..b8a9a09094a5 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1186,10 +1186,80 @@ def set_welfares_fund(
return
WelfareFundLineModel = self.env['welfare.fund.data.line']
+
+ wts = False
+ enasarco_relax_checks = self.env.user.company_id.enasarco_relax_checks
+ if any([welfareLine for welfareLine in Welfares
+ if welfareLine.TipoCassa == 'TC07']):
+ # Search the matching withholding tax
+ wts = self.env['withholding.tax'].search(
+ [('wt_types', '=', 'enasarco')])
+
+ processedLines = []
for welfareLine in Welfares:
- WalferLineVals = self._prepareWelfareLine(
- invoice.id, welfareLine)
- WelfareFundLineModel.create(WalferLineVals)
+ # Handle only TC07
+ if welfareLine.TipoCassa == 'TC07':
+ if not wts:
+ msg = _(
+ "The bill contains Welfare Fund tax with "
+ "Type %s, "
+ "but such a tax is not found in your system. Please "
+ "set it."
+ ) % welfareLine.TipoCassa
+ if enasarco_relax_checks:
+ self.log_inconsistency(msg)
+ else:
+ raise UserError(msg)
+
+ wt_found = False
+ for wt in wts:
+ if wt.tax == float(welfareLine.AlCassa):
+ wt_found = wt
+ break
+
+ if not wt_found:
+ msg = _(
+ "The bill contains Welfare Fund tax with "
+ "Type %s and Tax %s "
+ "but such a tax is not found in your system. Please "
+ "set it."
+ ) % (welfareLine.TipoCassa, float(welfareLine.AlCassa))
+ if enasarco_relax_checks:
+ self.log_inconsistency(msg)
+ else:
+ raise UserError(msg)
+
+ WalfarLineVals = self._prepareWelfareLine(invoice.id, welfareLine)
+ WelfareFundLineModel.create(WalfarLineVals)
+
+ # We are not interested to continue if Enasarco is used
+ if welfareLine.TipoCassa == 'TC07':
+ found = False
+ for line in invoice.invoice_line_ids:
+ # search an invoice line having a valid Welfare Tax
+ if (line.id not in processedLines and
+ line.invoice_line_tax_wt_ids):
+ processedLines.append(line.id)
+ ids = line.invoice_line_tax_wt_ids.ids
+ ids.append(wt_found.id)
+ line.update({
+ 'invoice_line_tax_wt_ids': [(6, 0, ids)],
+ })
+ found = True
+
+ if not found:
+ msg = _(
+ "The bill contains Welfare Fund tax with "
+ "Type %s and Tax %s "
+ "but such a tax cannot be added in accounting."
+ ) % (welfareLine.TipoCassa, float(welfareLine.AlCassa))
+ if enasarco_relax_checks:
+ self.log_inconsistency(msg)
+ else:
+ raise UserError(msg)
+
+ continue
+
line_vals = self._prepare_generic_line_data(welfareLine)
line_vals.update({
'name': _(
@@ -1216,6 +1286,9 @@ def set_welfares_fund(
)
self.env['account.invoice.line'].create(line_vals)
+ if processedLines:
+ invoice._onchange_invoice_line_wt_ids()
+
def set_delivery_data(self, FatturaBody, invoice):
Delivery = FatturaBody.DatiGenerali.DatiTrasporto
if Delivery:
From a8ac80839403ce00aceca7cbc50f667b5104caf1 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Tue, 8 Oct 2019 18:33:25 +0200
Subject: [PATCH 065/155] Porting gestione Enasarco to 12 + semplification of
set_welfares_fund
---
l10n_it_fatturapa_in/models/company.py | 2 +-
.../tests/data/IT05979361218_014.xml | 2 +-
l10n_it_fatturapa_in/views/company_view.xml | 16 ++++++--
.../wizard/wizard_import_fatturapa.py | 38 +++----------------
4 files changed, 20 insertions(+), 38 deletions(-)
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index f8ed564df176..3b68860e3787 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -57,5 +57,5 @@ class AccountConfigSettings(models.TransientModel):
readonly=False
)
enasarco_relax_checks = fields.Boolean(
- related='company_id.enasarco_relax_checks',
+ related='company_id.enasarco_relax_checks', readonly=False
)
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml
index 7f6ccbe03c81..6e1549a5638f 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_014.xml
@@ -102,4 +102,4 @@
-
\ No newline at end of file
+
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 8f3b1ea8fd6d..c86eb6b1942f 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -39,10 +39,18 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Do not block e-bill import in case of missing Enasarco configuration
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index b8a9a09094a5..1fc57f4fbac4 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1195,8 +1195,10 @@ def set_welfares_fund(
wts = self.env['withholding.tax'].search(
[('wt_types', '=', 'enasarco')])
- processedLines = []
for welfareLine in Welfares:
+ WalfarLineVals = self._prepareWelfareLine(invoice.id, welfareLine)
+ WelfareFundLineModel.create(WalfarLineVals)
+
# Handle only TC07
if welfareLine.TipoCassa == 'TC07':
if not wts:
@@ -1229,35 +1231,10 @@ def set_welfares_fund(
else:
raise UserError(msg)
- WalfarLineVals = self._prepareWelfareLine(invoice.id, welfareLine)
- WelfareFundLineModel.create(WalfarLineVals)
-
- # We are not interested to continue if Enasarco is used
- if welfareLine.TipoCassa == 'TC07':
- found = False
for line in invoice.invoice_line_ids:
- # search an invoice line having a valid Welfare Tax
- if (line.id not in processedLines and
- line.invoice_line_tax_wt_ids):
- processedLines.append(line.id)
- ids = line.invoice_line_tax_wt_ids.ids
- ids.append(wt_found.id)
- line.update({
- 'invoice_line_tax_wt_ids': [(6, 0, ids)],
- })
- found = True
-
- if not found:
- msg = _(
- "The bill contains Welfare Fund tax with "
- "Type %s and Tax %s "
- "but such a tax cannot be added in accounting."
- ) % (welfareLine.TipoCassa, float(welfareLine.AlCassa))
- if enasarco_relax_checks:
- self.log_inconsistency(msg)
- else:
- raise UserError(msg)
-
+ line.invoice_line_tax_wt_ids = [(4, wt_found.id)]
+ invoice._onchange_invoice_line_wt_ids()
+ invoice.write(invoice._convert_to_write(invoice._cache))
continue
line_vals = self._prepare_generic_line_data(welfareLine)
@@ -1286,9 +1263,6 @@ def set_welfares_fund(
)
self.env['account.invoice.line'].create(line_vals)
- if processedLines:
- invoice._onchange_invoice_line_wt_ids()
-
def set_delivery_data(self, FatturaBody, invoice):
Delivery = FatturaBody.DatiGenerali.DatiTrasporto
if Delivery:
From 3b4c558a67ffe7a908394eaf1b6a091f6706751b Mon Sep 17 00:00:00 2001
From: eLBati
Date: Wed, 9 Oct 2019 17:17:04 +0200
Subject: [PATCH 066/155] REF l10n_it_withholding_tax,
l10n_it_fatturapa_out_wt, l10n_it_fatturapa_in removing welfare_fund_type_id
---
l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 7d42a07a4ca1..010923f3985b 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -603,8 +603,6 @@ def setUp(self):
'reconcile': True})
misc_journal = self.env['account.journal']. \
search([("code", "=", "MISC")])
- welfare_fund_type_id = self.env['welfare.fund.type']. \
- search([('name', '=', 'TC07')])
self.env['withholding.tax'].create({
'name': 'Enasarco',
'code': 'TC07',
@@ -613,7 +611,6 @@ def setUp(self):
'journal_id': misc_journal.id,
'payment_term': self.env.ref(
'account.account_payment_term_advance').id,
- 'welfare_fund_type_id': welfare_fund_type_id.id,
'wt_types': 'enasarco',
'rate_ids': [(0, 0, {
'tax': 1.57,
@@ -628,7 +625,6 @@ def setUp(self):
'journal_id': misc_journal.id,
'payment_term': self.env.ref(
'account.account_payment_term_advance').id,
- 'welfare_fund_type_id': False,
'wt_types': 'ritenuta',
'causale_pagamento_id': self.env.ref(
'l10n_it_causali_pagamento.a').id,
From d825a0a9e3197e533e45d92b072fbc1b1d83f97d Mon Sep 17 00:00:00 2001
From: eLBati
Date: Thu, 10 Oct 2019 06:21:44 +0200
Subject: [PATCH 067/155] IMP l10n_it_fatturapa* attachment with "Open
full-screen" invoice
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 71 +++++++++++++++++--
.../i18n/l10n_it_fatturapa_in.pot | 43 +++++++++--
l10n_it_fatturapa_in/views/account_view.xml | 2 +
4 files changed, 107 insertions(+), 11 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index b304c16d218d..a0cb154b654a 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.9.0',
+ 'version': '12.0.1.10.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 816e75961bd8..ee887e348769 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -17,6 +17,25 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.8\n"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
+#, fuzzy
+#| msgid ""
+#| "Supplier Invoices \n"
+#| " "
+msgid ""
+""
+msgstr ""
+"Fatture fornitori \n"
+" "
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
msgid ""
@@ -138,7 +157,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1314
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1361
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -196,7 +215,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1329
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1376
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -319,6 +338,11 @@ msgstr "Dettagli sconto e maggiorazione"
msgid "Display Name"
msgstr "Nome visualizzato"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
+msgid "Do not block e-bill import in case of missing Enasarco configuration"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
#, python-format
@@ -450,7 +474,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1352
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1399
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -803,6 +827,11 @@ msgstr "Numero di messaggi con errore di consegna"
msgid "Number of unread messages"
msgstr "Numero di messaggi non letti"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Open full-screen"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -913,6 +942,12 @@ msgstr "Documenti collegati"
msgid "Related E-bill Line"
msgstr "Riga e-fattura collegata"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__enasarco_relax_checks
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__enasarco_relax_checks
+msgid "Relax checks for Enasarco"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
msgid "Remove"
@@ -1073,6 +1108,32 @@ msgstr ""
msgid "Text Reference"
msgstr "Riferimento testo"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1223
+#, fuzzy, python-format
+#| msgid ""
+#| "The bill contains withholding tax with payment reason %s, but such a tax "
+#| "is not found in your system. Please set it."
+msgid ""
+"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
+"not found in your system. Please set it."
+msgstr ""
+"La fattura contiene una ritenuta d'acconto con causale pagamento %s. Tale "
+"ritenuta non è presente nel sistema, è necessario impostarla."
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1205
+#, fuzzy, python-format
+#| msgid ""
+#| "The bill contains withholding tax with payment reason %s, but such a tax "
+#| "is not found in your system. Please set it."
+msgid ""
+"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
+"in your system. Please set it."
+msgstr ""
+"La fattura contiene una ritenuta d'acconto con causale pagamento %s. Tale "
+"ritenuta non è presente nel sistema, è necessario impostarla."
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
#, python-format
@@ -1273,7 +1334,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1250
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1289,7 +1350,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1242
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 5cc207b02ffd..1826658ae55b 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -13,6 +13,11 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
+msgid ""
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
msgid "Supplier Invoices \n"
@@ -118,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1314
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1361
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -176,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1329
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1376
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -294,6 +299,11 @@ msgstr ""
msgid "Display Name"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
+msgid "Do not block e-bill import in case of missing Enasarco configuration"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
#, python-format
@@ -423,7 +433,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1352
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1399
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -758,6 +768,11 @@ msgstr ""
msgid "Number of unread messages"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
+msgid "Open full-screen"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -864,6 +879,12 @@ msgstr ""
msgid "Related E-bill Line"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__enasarco_relax_checks
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__enasarco_relax_checks
+msgid "Relax checks for Enasarco"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
msgid "Remove"
@@ -1017,6 +1038,18 @@ msgstr ""
msgid "Text Reference"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1223
+#, python-format
+msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1205
+#, python-format
+msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
#, python-format
@@ -1185,7 +1218,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1250
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1197,7 +1230,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1242
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 69b3bb85ecca..c8a88d2acc28 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -41,6 +41,8 @@
+
From dea112611d5ba9aec8db96b7998ecb5cee08a213 Mon Sep 17 00:00:00 2001
From: Roberto Fichera
Date: Wed, 17 Jul 2019 13:12:50 +0200
Subject: [PATCH 068/155] [12.0][IMP][l10n_it_fatturapa_in] Set the supplier
invoice bill registration date by looking at the PEC date
---
l10n_it_fatturapa_in/models/account.py | 3 +++
l10n_it_fatturapa_in/models/attachment.py | 2 ++
l10n_it_fatturapa_in/views/account_view.xml | 2 ++
l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py | 7 +++++++
4 files changed, 14 insertions(+)
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index a09ec93ba744..a292ad7b9136 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -40,6 +40,9 @@ class AccountInvoice(models.Model):
e_invoice_force_validation = fields.Boolean(
string='Force E-Invoice Validation')
+ e_invoice_received_date = fields.Date(
+ string='E-Bill Received Date')
+
@api.multi
def invoice_validate(self):
for invoice in self:
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 327b0a7f62e5..3fb77ecb1cfa 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -32,6 +32,8 @@ class FatturaPAAttachmentIn(models.Model):
registered = fields.Boolean(
"Registered", compute="_compute_registered", store=True)
+ e_invoice_received_date = fields.Datetime(string='E-Bill Received Date')
+
e_invoice_validation_error = fields.Boolean(
compute='_compute_e_invoice_validation_error')
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index c8a88d2acc28..22d25f1a949b 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -26,6 +26,7 @@
+
@@ -129,6 +130,7 @@
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 1fc57f4fbac4..fcbc83088b14 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -870,7 +870,14 @@ def invoiceCreate(
for rel_doc in causLst:
comment += rel_doc + '\n'
+ if fatturapa_attachment.e_invoice_received_date:
+ e_invoice_received_date = fatturapa_attachment.\
+ e_invoice_received_date.date()
+ else:
+ e_invoice_received_date = fatturapa_attachment.create_date.date()
+
invoice_data = {
+ 'e_invoice_received_date': e_invoice_received_date,
'fiscal_document_type_id': docType_id,
'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
'account_id': pay_acc_id,
From 8de3f3bec86020185337c16e6ec4c4540e6116bb Mon Sep 17 00:00:00 2001
From: Lorenzo Battistini
Date: Tue, 12 Nov 2019 14:24:55 +0000
Subject: [PATCH 069/155] Translated using Weblate (Italian)
Currently translated at 100.0% (225 of 225 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 72 +++++++++++++++------------------
1 file changed, 32 insertions(+), 40 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index ee887e348769..12504871976b 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2019-09-04 11:23+0000\n"
-"Last-Translator: Lorenzo Battistini \n"
+"PO-Revision-Date: 2019-11-18 11:34+0000\n"
+"Last-Translator: Lorenzo Battistini \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
@@ -19,22 +19,14 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
-#, fuzzy
-#| msgid ""
-#| "Supplier Invoices \n"
-#| " "
msgid ""
""
msgstr ""
-"Fatture fornitori \n"
-" "
+""
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
@@ -59,13 +51,13 @@ msgstr "Token di accesso"
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_passivi_account_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_passivi_account_id
msgid "Account used to round down bills amount."
-msgstr ""
+msgstr "Conto usato per gli arrotonamenti passivi dell'importo delle fatture."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_attivi_account_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_attivi_account_id
msgid "Account used to round up bills amount."
-msgstr ""
+msgstr "Conto usato per gli arrotondamenti attivi dell'importo delle fatture."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_needaction
@@ -342,6 +334,8 @@ msgstr "Nome visualizzato"
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
+"Non bloccare l'importazione delle e-fatture in caso di configurazione "
+"Enasarco mancante"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
@@ -410,10 +404,8 @@ msgstr "Descrizione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__att_name
-#, fuzzy
-#| msgid "E-invoice line"
msgid "E-bill file name"
-msgstr "Riga e-fattura"
+msgstr "Nome file e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_fatturapa_attachment_in
@@ -795,7 +787,7 @@ msgstr ""
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1167
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
-msgstr "Ritenuta d'acconto con causale documento %s e aliquota %s non trovata."
+msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data__num_ref
@@ -830,7 +822,7 @@ msgstr "Numero di messaggi non letti"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
msgid "Open full-screen"
-msgstr ""
+msgstr "Apri a tutto schermo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__other_data_ids
@@ -946,7 +938,7 @@ msgstr "Riga e-fattura collegata"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__enasarco_relax_checks
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__enasarco_relax_checks
msgid "Relax checks for Enasarco"
-msgstr ""
+msgstr "Rilassare i controlli per Enasarco"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
@@ -982,49 +974,53 @@ msgstr "Nome risorsa"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_passivi_account_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_passivi_account_id
msgid "Round Down Account"
-msgstr ""
+msgstr "Conto arrotondamenti passivi"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_attivi_account_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_attivi_account_id
msgid "Round Up Account"
-msgstr ""
+msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1068
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
+"Il conto per l'arrotondamento passivo non è impostato in configurazione "
+"contabilità"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1062
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
+"Il conto per l'arrotondamento attivo non è impostato in configurazione "
+"contabilità"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
#, python-format
msgid "Round up and down tax is not set"
-msgstr ""
+msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
msgid "Rounding Tax"
-msgstr ""
+msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
#, python-format
msgid "Rounding down"
-msgstr ""
+msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Rounding up"
-msgstr ""
+msgstr "Arrotondamento attivo"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line__service_type
@@ -1084,6 +1080,8 @@ msgstr "Tipo imposta %s non trovato"
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
msgid "Tax used to both round up and down bills amount."
msgstr ""
+"Imposta usata per gli arrotondamenti attivi e passivi degli importi delle "
+"fatture."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:78
@@ -1110,29 +1108,23 @@ msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1223
-#, fuzzy, python-format
-#| msgid ""
-#| "The bill contains withholding tax with payment reason %s, but such a tax "
-#| "is not found in your system. Please set it."
+#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
"not found in your system. Please set it."
msgstr ""
-"La fattura contiene una ritenuta d'acconto con causale pagamento %s. Tale "
-"ritenuta non è presente nel sistema, è necessario impostarla."
+"La fattura contiene un'imposta cassa previdenziale con tipo %s e imposta %s "
+"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1205
-#, fuzzy, python-format
-#| msgid ""
-#| "The bill contains withholding tax with payment reason %s, but such a tax "
-#| "is not found in your system. Please set it."
+#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
"in your system. Please set it."
msgstr ""
-"La fattura contiene una ritenuta d'acconto con causale pagamento %s. Tale "
-"ritenuta non è presente nel sistema, è necessario impostarla."
+"La fattura contiene un'imposta cassa previdenziale con tipo %s, ma una tale "
+"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
@@ -1158,7 +1150,7 @@ msgstr "La fattura '%s' non combacia con la relativa e-fattura"
#. module: l10n_it_fatturapa_in
#: sql_constraint:fatturapa.attachment.in:0
msgid "The name of the e-bill file must be unique!"
-msgstr ""
+msgstr "Il nome del file della e-fattura deve essere unico!"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_fatturapa_attachment_in__res_id
From bd22abd6cfa8d06c262aed8ea49df689a46699a2 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Tue, 19 Nov 2019 11:26:05 +0100
Subject: [PATCH 070/155] IMP l10n_it_fatturapa_in: use last due date for
invoice due date, if supplier payment term is not set
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 22 +++++++++----------
.../i18n/l10n_it_fatturapa_in.pot | 22 +++++++++----------
.../tests/test_import_fatturapa_xml.py | 2 ++
.../wizard/wizard_import_fatturapa.py | 16 ++++++++++++++
5 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index a0cb154b654a..d58cd3ae667b 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.10.0',
+ 'version': '12.0.1.11.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 12504871976b..0b773d4c1302 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1361
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1377
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1376
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1392
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -466,7 +466,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1399
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1415
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -784,7 +784,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1167
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -837,13 +837,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1134
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1145
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -1107,7 +1107,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1223
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1239
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1117,7 +1117,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1205
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1221
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1127,7 +1127,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1326,7 +1326,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1250
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1342,7 +1342,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1242
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1258
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 1826658ae55b..af058a5b54ca 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1361
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1377
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1376
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1392
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -433,7 +433,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1399
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1415
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -733,7 +733,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1167
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -786,13 +786,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1134
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1145
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -1039,19 +1039,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1223
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1239
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1205
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1221
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1155
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1218,7 +1218,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1250
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1230,7 +1230,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1242
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1258
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 010923f3985b..8822ca0a375a 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -336,10 +336,12 @@ def test_16_xml_import(self):
self.assertTrue(len(invoice.invoice_line_ids) == 2)
for line in invoice.invoice_line_ids:
self.assertFalse(line.product_id)
+ self.assertEqual(invoice.date_due, date(2015, 1, 30))
if invoice.reference == '456':
self.assertTrue(len(invoice.invoice_line_ids) == 1)
for line in invoice.invoice_line_ids:
self.assertFalse(line.product_id)
+ self.assertEqual(invoice.date_due, date(2015, 1, 28))
partner = invoice.partner_id
partner.e_invoice_default_product_id = (
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index fcbc83088b14..ea1a4bf43ace 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1124,8 +1124,24 @@ def set_activity_progress(self, FatturaBody, invoice_id):
}
)
+ def _get_last_due_date(self, DatiPagamento):
+ dates = []
+ for PaymentLine in DatiPagamento:
+ details = PaymentLine.DettaglioPagamento
+ if details:
+ for dline in details:
+ if dline.DataScadenzaPagamento:
+ dates.append(fields.Date.to_date(dline.DataScadenzaPagamento))
+ dates.sort(reverse=True)
+ return dates
+
def set_payments_data(self, FatturaBody, invoice_id, partner_id):
PaymentsData = FatturaBody.DatiPagamento
+ partner = self.env['res.partner'].browse(partner_id)
+ if not partner.property_supplier_payment_term_id:
+ due_dates = self._get_last_due_date(FatturaBody.DatiPagamento)
+ if due_dates:
+ self.env['account.invoice'].browse(invoice_id).date_due = due_dates[0]
if PaymentsData:
PaymentDataModel = self.env['fatturapa.payment.data']
PaymentTermsModel = self.env['fatturapa.payment_term']
From 9dd54e7491fa3029a5f1a485d7a27b64dddd9ac5 Mon Sep 17 00:00:00 2001
From: Sergio Zanchetta
Date: Mon, 23 Dec 2019 11:07:32 +0000
Subject: [PATCH 071/155] Translated using Weblate (Italian)
Currently translated at 100.0% (225 of 225 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/i18n/it.po | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 0b773d4c1302..f162c79bc833 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2019-11-18 11:34+0000\n"
-"Last-Translator: Lorenzo Battistini \n"
+"PO-Revision-Date: 2020-01-07 11:13+0000\n"
+"Last-Translator: Sergio Zanchetta \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.8\n"
+"X-Generator: Weblate 3.10\n"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
@@ -215,7 +215,7 @@ msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_res_config_settings
msgid "Config Settings"
-msgstr "Impostazioni configurazione"
+msgstr "Impostazioni di configurazione"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_res_partner
@@ -334,8 +334,8 @@ msgstr "Nome visualizzato"
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
-"Non bloccare l'importazione delle e-fatture in caso di configurazione "
-"Enasarco mancante"
+"Non blocca l'importazione delle e-fatture in caso di configurazione Enasarco "
+"mancante"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
@@ -938,7 +938,7 @@ msgstr "Riga e-fattura collegata"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__enasarco_relax_checks
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__enasarco_relax_checks
msgid "Relax checks for Enasarco"
-msgstr "Rilassare i controlli per Enasarco"
+msgstr "Rilassare controlli per Enasarco"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
@@ -1240,7 +1240,7 @@ msgstr "Messaggi non letti"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_unread_counter
msgid "Unread Messages Counter"
-msgstr "Contatore messaggi non letti"
+msgstr "Numero messaggi non letti"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:61
From a9947a3e2958ef01ff7a15efc2b218a06742bec7 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Thu, 9 Jan 2020 11:54:04 +0100
Subject: [PATCH 072/155] ADD test for refund with positive total FIX importing
refund XML with negative lines
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 54 ++++++------
.../i18n/l10n_it_fatturapa_in.pot | 52 ++++++------
l10n_it_fatturapa_in/models/account.py | 19 ++++-
.../tests/data/IT01234567890_FPR06.xml | 82 +++++++++++++++++++
.../tests/data/IT01234567890_FPR07.xml | 74 +++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 27 ++++++
.../wizard/wizard_import_fatturapa.py | 2 +
8 files changed, 262 insertions(+), 50 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR06.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR07.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index d58cd3ae667b..64d2b2edf47f 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.11.0',
+ 'version': '12.0.1.12.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index f162c79bc833..63fd7a155371 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -102,7 +102,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:104
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:106
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1377
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1386
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1392
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1401
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -355,6 +355,14 @@ msgstr "Errore di validazione e-fattura"
msgid "E Invoice Validation Message"
msgstr "Messaggio di validazione e-fattura"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_received_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_received_date
+#, fuzzy
+#| msgid "E-bill file name"
+msgid "E-Bill Received Date"
+msgstr "Nome file e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
msgid "E-Invoice Tax Amount"
@@ -466,7 +474,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1415
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1424
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -601,7 +609,7 @@ msgid "Invoice Line"
msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:142
+#: code:addons/l10n_it_fatturapa_in/models/account.py:148
#, python-format
msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
@@ -784,7 +792,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1192
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -837,13 +845,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1145
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1154
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -983,7 +991,7 @@ msgid "Round Up Account"
msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1068
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1077
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -991,7 +999,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1062
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1071
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -999,7 +1007,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1084
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1011,13 +1019,13 @@ msgid "Rounding Tax"
msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1100
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1084,7 +1092,7 @@ msgstr ""
"fatture."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:78
+#: code:addons/l10n_it_fatturapa_in/models/account.py:84
#, python-format
msgid ""
"Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount "
@@ -1107,7 +1115,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1239
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1117,7 +1125,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1221
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1230
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1127,7 +1135,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1180
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1142,7 +1150,7 @@ msgid "The database object this attachment will be attached to."
msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:49
+#: code:addons/l10n_it_fatturapa_in/models/account.py:52
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr "La fattura '%s' non combacia con la relativa e-fattura"
@@ -1198,7 +1206,7 @@ msgid "Total Price"
msgstr "Prezzo totale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:95
+#: code:addons/l10n_it_fatturapa_in/models/account.py:101
#, python-format
msgid ""
"Total amount ({bill_amount_total}) does not match with e-bill total amount "
@@ -1243,7 +1251,7 @@ msgid "Unread Messages Counter"
msgstr "Numero messaggi non letti"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:61
+#: code:addons/l10n_it_fatturapa_in/models/account.py:67
#, python-format
msgid ""
"Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed "
@@ -1274,7 +1282,7 @@ msgid "VAT Rate"
msgstr "Aliquota IVA"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:131
+#: code:addons/l10n_it_fatturapa_in/models/account.py:137
#, python-format
msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
@@ -1326,7 +1334,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1342,7 +1350,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1258
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1267
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index af058a5b54ca..ccdee504b535 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -84,7 +84,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:104
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:106
#, python-format
msgid "Attachment without name"
msgstr ""
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1377
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1386
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1392
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1401
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -322,6 +322,12 @@ msgstr ""
msgid "E Invoice Validation Message"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_received_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_received_date
+msgid "E-Bill Received Date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
msgid "E-Invoice Tax Amount"
@@ -433,7 +439,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1415
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1424
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -563,7 +569,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:142
+#: code:addons/l10n_it_fatturapa_in/models/account.py:148
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -733,7 +739,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1192
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -786,13 +792,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1150
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1145
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1154
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -928,19 +934,19 @@ msgid "Round Up Account"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1068
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1077
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1062
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1071
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1075
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1084
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -952,13 +958,13 @@ msgid "Rounding Tax"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1100
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1023,7 +1029,7 @@ msgid "Tax used to both round up and down bills amount."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:78
+#: code:addons/l10n_it_fatturapa_in/models/account.py:84
#, python-format
msgid "Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount ({e_bill_amount_tax})"
msgstr ""
@@ -1039,19 +1045,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1239
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1221
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1230
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1180
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1062,7 +1068,7 @@ msgid "The database object this attachment will be attached to."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:49
+#: code:addons/l10n_it_fatturapa_in/models/account.py:52
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr ""
@@ -1111,7 +1117,7 @@ msgid "Total Price"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:95
+#: code:addons/l10n_it_fatturapa_in/models/account.py:101
#, python-format
msgid "Total amount ({bill_amount_total}) does not match with e-bill total amount ({e_bill_amount_total})"
msgstr ""
@@ -1148,7 +1154,7 @@ msgid "Unread Messages Counter"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:61
+#: code:addons/l10n_it_fatturapa_in/models/account.py:67
#, python-format
msgid "Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed amount ({e_bill_amount_untaxed})"
msgstr ""
@@ -1170,7 +1176,7 @@ msgid "VAT Rate"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:131
+#: code:addons/l10n_it_fatturapa_in/models/account.py:137
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
@@ -1218,7 +1224,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1230,7 +1236,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1258
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1267
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index a292ad7b9136..d1190dffe42b 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -57,7 +57,10 @@ def e_inv_check_amount_untaxed(self):
error_message = ''
if (self.e_invoice_amount_untaxed and
float_compare(self.amount_untaxed,
- self.e_invoice_amount_untaxed,
+ # Using abs because odoo invoice total can't be negative,
+ # while XML total can.
+ # See process_negative_lines method
+ abs(self.e_invoice_amount_untaxed),
precision_rounding=self.currency_id
.rounding) != 0):
error_message = (
@@ -74,7 +77,7 @@ def e_inv_check_amount_tax(self):
error_message = ''
if (self.e_invoice_amount_tax and
float_compare(self.amount_tax,
- self.e_invoice_amount_tax,
+ abs(self.e_invoice_amount_tax),
precision_rounding=self.currency_id
.rounding) != 0):
error_message = (
@@ -91,7 +94,7 @@ def e_inv_check_amount_total(self):
error_message = ''
if (self.e_invoice_amount_total and
float_compare(self.amount_total,
- self.e_invoice_amount_total,
+ abs(self.e_invoice_amount_total),
precision_rounding=self.currency_id
.rounding) != 0):
error_message = (
@@ -218,6 +221,16 @@ def set_einvoice_data(self, fattura):
'e_invoice_date_invoice': date_invoice,
})
+ def process_negative_lines(self):
+ self.ensure_one()
+ for line in self.invoice_line_ids:
+ if line.price_unit >= 0:
+ return
+ # if every line is negative, change them all
+ for line in self.invoice_line_ids:
+ line.price_unit = -line.price_unit
+ self.compute_taxes()
+
class FatturapaArticleCode(models.Model):
# _position = ['2.2.1.3']
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR06.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR06.xml
new file mode 100644
index 000000000000..01f94d37e168
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR06.xml
@@ -0,0 +1,82 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 00001
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD04
+ EUR
+ 2020-01-09
+ 123
+
+
+
+
+ 1
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 2
+ SCONTO
+ 5.00
+ -1.00
+ -5.00
+ 22.00
+
+
+ 22.00
+ 15.00
+ 3.30
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR07.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR07.xml
new file mode 100644
index 000000000000..091302d73cff
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR07.xml
@@ -0,0 +1,74 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 00001
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD04
+ EUR
+ 2020-01-09
+ 123
+
+
+
+
+ 1
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ -2.00
+ -20.00
+ 22.00
+
+
+ 22.00
+ -20.00
+ -4.40
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 8822ca0a375a..bc12cb39df93 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -523,6 +523,33 @@ def test_31_xml_import(self):
self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, 0)
self.assertEqual(invoice.amount_total, 12.2)
+ def test_32_xml_import(self):
+ # Refund with positive total
+ res = self.run_wizard('test32', 'IT01234567890_FPR06.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.type, 'in_refund')
+ self.assertEqual(invoice.amount_total, 18.3)
+ self.assertEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
+ self.assertEqual(invoice.invoice_line_ids[0].quantity, 10.0)
+ self.assertEqual(invoice.invoice_line_ids[0].price_subtotal, 20.0)
+ self.assertEqual(invoice.invoice_line_ids[1].price_unit, -1.0)
+ self.assertEqual(invoice.invoice_line_ids[1].quantity, 5.0)
+ self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, -5.0)
+
+ def test_33_xml_import(self):
+ # Refund with negative total
+ res = self.run_wizard('test33', 'IT01234567890_FPR07.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.type, 'in_refund')
+ self.assertEqual(invoice.amount_total, 24.4)
+ self.assertEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
+ self.assertEqual(invoice.invoice_line_ids[0].quantity, 10.0)
+ self.assertEqual(invoice.invoice_line_ids[0].price_subtotal, 20.0)
+ self.assertEqual(invoice.e_invoice_amount_untaxed, -20.0)
+ self.assertEqual(invoice.e_invoice_amount_tax, -4.4)
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index ea1a4bf43ace..6d892ada5d51 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -975,6 +975,8 @@ def invoiceCreate(
# compute the invoice
invoice.compute_taxes()
+ # this can happen with refunds with negative amounts
+ invoice.process_negative_lines()
return invoice_id
def set_vendor_bill_data(self, FatturaBody, invoice):
From a3680f4ed5fee04778f35269071b2cbafb163ebb Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Sun, 26 Jan 2020 00:23:32 +0100
Subject: [PATCH 073/155] [IMP] add ability to set default registration
in_invoice with default to invoice date as is actual
---
l10n_it_fatturapa_in/models/company.py | 8 ++++++++
l10n_it_fatturapa_in/views/company_view.xml | 13 +++++++++++++
.../wizard/wizard_import_fatturapa.py | 3 +++
3 files changed, 24 insertions(+)
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 3b68860e3787..b1d477f19720 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -31,6 +31,11 @@ class ResCompany(models.Model):
help="Tax used to both round up and down bills amount."
)
enasarco_relax_checks = fields.Boolean('Relax checks for Enasarco')
+ in_invoice_registration_date = fields.Selection([
+ ('inv_date', 'Invoice Date'),
+ ('rec_date', 'Received Date'),
+ ], string='Vendor invoice registration default date',
+ default='inv_date')
class AccountConfigSettings(models.TransientModel):
@@ -59,3 +64,6 @@ class AccountConfigSettings(models.TransientModel):
enasarco_relax_checks = fields.Boolean(
related='company_id.enasarco_relax_checks', readonly=False
)
+ in_invoice_registration_date = fields.Selection(
+ related='company_id.in_invoice_registration_date', readonly=False
+ )
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index c86eb6b1942f..0e56361c1401 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -41,6 +41,19 @@
+
+
+
+
+
+ Set default date used to register vendor invoices: date of invoice or received date.
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 6d892ada5d51..4a5d7aa48593 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -875,9 +875,12 @@ def invoiceCreate(
e_invoice_received_date.date()
else:
e_invoice_received_date = fatturapa_attachment.create_date.date()
+ e_invoice_date = FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data.date()
invoice_data = {
'e_invoice_received_date': e_invoice_received_date,
+ 'date': e_invoice_received_date
+ if company.in_invoice_registration_date == 'rec_date' else e_invoice_date,
'fiscal_document_type_id': docType_id,
'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
'account_id': pay_acc_id,
From 0ae45309bdc8b171055c3ae9338a0d71d6b46337 Mon Sep 17 00:00:00 2001
From: Gianluigi Tiesi
Date: Fri, 31 Jan 2020 15:03:49 +0100
Subject: [PATCH 074/155] [FIX] l10n_it_fatturapa_in: invoice lines with
quantity 0
if an e-invoice has a line with quantity set to 0, odoo will import
lines with quantity 1 instead of 0
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 59 ++++++++----
.../i18n/l10n_it_fatturapa_in.pot | 53 +++++++----
.../tests/data/IT05979361218_q0.xml | 92 +++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 7 ++
.../wizard/wizard_import_fatturapa.py | 4 +-
6 files changed, 183 insertions(+), 34 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_q0.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 64d2b2edf47f..7d6174e63c3d 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.12.1',
+ 'version': '12.0.1.13.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 63fd7a155371..5dd198d6ce1b 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1386
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1389
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1401
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -474,7 +474,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1424
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1427
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -603,6 +603,13 @@ msgstr "Contenuto indicizzato"
msgid "Invoice"
msgstr "Fattura"
+#. module: l10n_it_fatturapa_in
+#: selection:res.company,in_invoice_registration_date:0
+#, fuzzy
+#| msgid "E-invoice date"
+msgid "Invoice Date"
+msgstr "Data e-fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
msgid "Invoice Line"
@@ -792,7 +799,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1192
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -845,13 +852,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1162
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1154
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1157
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -919,6 +926,13 @@ msgstr "Quantità"
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr "Codice provincia dell'ufficio REA ( %s ) non presente nel sistema"
+#. module: l10n_it_fatturapa_in
+#: selection:res.company,in_invoice_registration_date:0
+#, fuzzy
+#| msgid "E-bill file name"
+msgid "Received Date"
+msgstr "Nome file e-fattura"
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
#, python-format
@@ -991,7 +1005,7 @@ msgid "Round Up Account"
msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1077
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -999,7 +1013,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1071
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1074
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1007,7 +1021,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1084
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1087
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1019,13 +1033,13 @@ msgid "Rounding Tax"
msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1100
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1103
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1035,6 +1049,13 @@ msgstr "Arrotondamento attivo"
msgid "Sale Provision Type"
msgstr "Tipo cessione prestazione"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
+msgid ""
+"Set default date used to register vendor invoices: date of invoice or "
+"received date."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Stable Organization"
@@ -1115,7 +1136,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1251
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1125,7 +1146,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1230
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1233
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1135,7 +1156,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1180
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1281,6 +1302,12 @@ msgstr ""
msgid "VAT Rate"
msgstr "Aliquota IVA"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__in_invoice_registration_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__in_invoice_registration_date
+msgid "Vendor invoice registration default date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:137
#, python-format
@@ -1334,7 +1361,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1278
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1350,7 +1377,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1267
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1270
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index ccdee504b535..6de8c48dd675 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1386
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1389
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1401
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -439,7 +439,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1424
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1427
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -563,6 +563,11 @@ msgstr ""
msgid "Invoice"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: selection:res.company,in_invoice_registration_date:0
+msgid "Invoice Date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
msgid "Invoice Line"
@@ -739,7 +744,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1192
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -792,13 +797,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1162
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1154
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1157
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -862,6 +867,11 @@ msgstr ""
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: selection:res.company,in_invoice_registration_date:0
+msgid "Received Date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
#, python-format
@@ -934,19 +944,19 @@ msgid "Round Up Account"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1077
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1071
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1074
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1084
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1087
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -958,13 +968,13 @@ msgid "Rounding Tax"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1100
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1103
#, python-format
msgid "Rounding up"
msgstr ""
@@ -974,6 +984,11 @@ msgstr ""
msgid "Sale Provision Type"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
+msgid "Set default date used to register vendor invoices: date of invoice or received date."
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Stable Organization"
@@ -1045,19 +1060,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1251
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1230
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1233
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1180
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1175,6 +1190,12 @@ msgstr ""
msgid "VAT Rate"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__in_invoice_registration_date
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__in_invoice_registration_date
+msgid "Vendor invoice registration default date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:137
#, python-format
@@ -1224,7 +1245,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1275
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1278
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1236,7 +1257,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1267
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1270
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_q0.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_q0.xml
new file mode 100644
index 000000000000..ac699e8d4871
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_q0.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 006
+ FPA12
+ UFPQ1O
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2019-05-11
+ 852S1
+ 16.60
+ Rif ordine 908
+
+
+
+
+ 1
+ USB4
+ 0.00
+ Pz.
+ 18.07
+ 0.00
+ 0.00
+ N4
+
+
+ 2
+ USB
+ Pz.
+ 16.60
+ 16.60
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ 16.60
+ 0.00
+ I
+ Esenzione Art.8 comma 1 DPR 633/72
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index bc12cb39df93..dbd90422f0ae 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -610,6 +610,13 @@ def test_02_xml_link(self):
self.assertTrue(orig_invoice.reference)
self.assertTrue(orig_invoice.date_invoice)
+ def test_01_xml_zero_quantity_line(self):
+ res = self.run_wizard('test_zeroq_01', 'IT05979361218_q0.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.invoice_line_ids[0].quantity, 0)
+ self.assertEqual(invoice.invoice_line_ids[1].quantity, 1)
+
class TestFatturaPAEnasarco(FatturapaCommon):
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 4a5d7aa48593..cb431a4a5361 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -432,7 +432,9 @@ def _prepareInvoiceLine(self, credit_account_id, line, wt_found=False):
'account_id': credit_account_id,
'price_unit': float(line.PrezzoUnitario),
})
- if line.Quantita:
+ if line.Quantita is None:
+ retLine['quantity'] = 1.0
+ else:
retLine['quantity'] = float(line.Quantita)
if (
float(line.PrezzoUnitario) and
From 899faa7a6bedf65c766508fe2ab28c3f604fb824 Mon Sep 17 00:00:00 2001
From: Lorenzo Battistini
Date: Mon, 3 Feb 2020 09:13:44 +0000
Subject: [PATCH 075/155] Translated using Weblate (Italian)
Currently translated at 100.0% (230 of 230 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 72 +++++++++----------
.../i18n/l10n_it_fatturapa_in.pot | 52 +++++++-------
3 files changed, 61 insertions(+), 65 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 7d6174e63c3d..50ffa8f53033 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.13.0',
+ 'version': '12.0.1.13.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 5dd198d6ce1b..554a03416f62 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2020-01-07 11:13+0000\n"
-"Last-Translator: Sergio Zanchetta \n"
+"PO-Revision-Date: 2020-02-03 12:13+0000\n"
+"Last-Translator: Lorenzo Battistini \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
@@ -113,7 +113,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:709
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:711
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1389
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1391
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1406
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -287,7 +287,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:764
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:766
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -338,7 +338,7 @@ msgstr ""
"mancante"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:865
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -358,10 +358,8 @@ msgstr "Messaggio di validazione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_received_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__e_invoice_received_date
-#, fuzzy
-#| msgid "E-bill file name"
msgid "E-Bill Received Date"
-msgstr "Nome file e-fattura"
+msgstr "Data ricezione e-fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_account_invoice__e_invoice_amount_tax
@@ -474,7 +472,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1427
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1429
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -510,7 +508,7 @@ msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:597
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:599
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -605,10 +603,8 @@ msgstr "Fattura"
#. module: l10n_it_fatturapa_in
#: selection:res.company,in_invoice_registration_date:0
-#, fuzzy
-#| msgid "E-invoice date"
msgid "Invoice Date"
-msgstr "Data e-fattura"
+msgstr "Data fattura"
#. module: l10n_it_fatturapa_in
#: model:ir.model,name:l10n_it_fatturapa_in.model_account_invoice_line
@@ -774,7 +770,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:685
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:687
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
@@ -785,7 +781,7 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:841
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:843
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
@@ -799,7 +795,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -846,19 +842,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:627
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:629
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1162
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1164
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1157
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -928,10 +924,8 @@ msgstr "Codice provincia dell'ufficio REA ( %s ) non presente nel sistema"
#. module: l10n_it_fatturapa_in
#: selection:res.company,in_invoice_registration_date:0
-#, fuzzy
-#| msgid "E-bill file name"
msgid "Received Date"
-msgstr "Nome file e-fattura"
+msgstr "Data ricezione"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
@@ -1005,7 +999,7 @@ msgid "Round Up Account"
msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -1013,7 +1007,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1074
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1076
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1021,7 +1015,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1087
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1089
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1033,13 +1027,13 @@ msgid "Rounding Tax"
msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1103
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1055,6 +1049,8 @@ msgid ""
"Set default date used to register vendor invoices: date of invoice or "
"received date."
msgstr ""
+"Imposta la data predefinita usata per registrare le fatture fornitore: data "
+"della fattura o data ricezione."
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
@@ -1099,7 +1095,7 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:518
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:520
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
@@ -1136,7 +1132,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1251
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1253
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1146,7 +1142,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1233
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1235
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1156,7 +1152,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1185
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1306,7 +1302,7 @@ msgstr "Aliquota IVA"
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__in_invoice_registration_date
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__in_invoice_registration_date
msgid "Vendor invoice registration default date"
-msgstr ""
+msgstr "Data predefinita per la registrazione delle fatture fornitore"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:137
@@ -1344,7 +1340,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:547
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1361,7 +1357,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1278
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1280
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1371,13 +1367,13 @@ msgstr ""
"presenti nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:527
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:529
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1270
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 6de8c48dd675..65753806df42 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -95,7 +95,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:709
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:711
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1389
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1391
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1406
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -256,7 +256,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:764
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:766
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -305,7 +305,7 @@ msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:863
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:865
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -439,7 +439,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1427
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1429
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -475,7 +475,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:597
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:599
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -721,7 +721,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:685
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:687
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -732,7 +732,7 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:841
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:843
#, python-format
msgid "No currency found with code %s."
msgstr ""
@@ -744,7 +744,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1195
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -791,19 +791,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:627
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:629
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1162
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1164
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1157
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -944,19 +944,19 @@ msgid "Round Up Account"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1080
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1074
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1076
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1087
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1089
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -968,13 +968,13 @@ msgid "Rounding Tax"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1103
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1032,7 +1032,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:518
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:520
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -1060,19 +1060,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1251
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1253
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1233
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1235
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1185
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1228,7 +1228,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:547
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -1245,19 +1245,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1278
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1280
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:527
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:529
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1270
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
From 1a6e10be20305eec6a7307779ad981c566a1c125 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Wed, 5 Feb 2020 11:55:46 +0100
Subject: [PATCH 076/155] IMP l10n_it_fatturapa_in when XML contains
DatiRitenuta but suppliers did not set Ritenuta for any line
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 12 ++-
.../i18n/l10n_it_fatturapa_in.pot | 10 ++-
l10n_it_fatturapa_in/models/account.py | 15 ++++
.../tests/data/IT01234567890_FPR08.xml | 89 +++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 12 +++
6 files changed, 135 insertions(+), 5 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR08.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 50ffa8f53033..cfed628ee627 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.13.1',
+ 'version': '12.0.1.14.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 554a03416f62..c4ba4f7d621e 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -403,6 +403,14 @@ msgstr "File importato e-fattura"
msgid "E-bill Inconsistencies"
msgstr "Incongruenze e-fattura"
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:115
+#, python-format
+msgid ""
+"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. "
+"Please manually check Withholding tax Amount"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_descr
msgid "E-bill description"
@@ -612,7 +620,7 @@ msgid "Invoice Line"
msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:148
+#: code:addons/l10n_it_fatturapa_in/models/account.py:163
#, python-format
msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
@@ -1305,7 +1313,7 @@ msgid "Vendor invoice registration default date"
msgstr "Data predefinita per la registrazione delle fatture fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:137
+#: code:addons/l10n_it_fatturapa_in/models/account.py:152
#, python-format
msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 65753806df42..eea55c452646 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -370,6 +370,12 @@ msgstr ""
msgid "E-bill Inconsistencies"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:115
+#, python-format
+msgid "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. Please manually check Withholding tax Amount"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__e_invoice_descr
msgid "E-bill description"
@@ -574,7 +580,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:148
+#: code:addons/l10n_it_fatturapa_in/models/account.py:163
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -1197,7 +1203,7 @@ msgid "Vendor invoice registration default date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:137
+#: code:addons/l10n_it_fatturapa_in/models/account.py:152
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index d1190dffe42b..d5f773da53d5 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -107,6 +107,17 @@ def e_inv_check_amount_total(self):
))
return error_message
+ def e_inv_dati_ritenuta(self):
+ error_message = ''
+ # ftpa_withholding_type is set when DatiRitenuta is set,
+ # withholding_tax is not set if no lines with Ritenuta = SI are found
+ if self.ftpa_withholding_type and not self.withholding_tax:
+ error_message = (_(
+ "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
+ "found. Please manually check Withholding tax Amount"
+ ))
+ return error_message
+
@api.depends('type', 'state', 'fatturapa_attachment_in_id',
'amount_untaxed', 'amount_tax', 'amount_total',
'reference', 'date_invoice')
@@ -131,6 +142,10 @@ def _compute_e_invoice_validation_error(self):
if error_message:
error_messages.append(error_message)
+ error_message = bill.e_inv_dati_ritenuta()
+ if error_message:
+ error_messages.append(error_message)
+
if (bill.e_invoice_reference and
bill.reference != bill.e_invoice_reference):
error_messages.append(
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR08.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR08.xml
new file mode 100644
index 000000000000..a59656a91ff8
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR08.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ FPR08
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD06
+ EUR
+ 2020-01-09
+ 124
+
+ RT01
+ 360.00
+ 20.00
+ A
+
+
+ TC02
+ 4.00
+ 72.00
+ 1800.00
+ 22.00
+
+ 2283.84
+ PARCELLA
+
+
+
+
+ 1
+ ASSISTENZA TRIBUTARIA
+ 1800.00
+ 1800.00
+ 22.00
+
+
+ 22.00
+ 1872.00
+ 411.84
+ I
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index dbd90422f0ae..786c02c0f916 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -550,6 +550,18 @@ def test_33_xml_import(self):
self.assertEqual(invoice.e_invoice_amount_untaxed, -20.0)
self.assertEqual(invoice.e_invoice_amount_tax, -4.4)
+ def test_34_xml_import(self):
+ # No Ritenuta lines set
+ res = self.run_wizard('test34', 'IT01234567890_FPR08.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertTrue(invoice.e_invoice_validation_error)
+ self.assertEqual(
+ invoice.e_invoice_validation_message,
+ "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
+ "found. Please manually check Withholding tax Amount."
+ )
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
From df37f17480a66b6e3ad1327839f7f134f7f6c5c0 Mon Sep 17 00:00:00 2001
From: SilvioGregorini
Date: Wed, 26 Feb 2020 18:20:55 +0100
Subject: [PATCH 077/155] [FIX][l10n_it_fatturapa_in] Fix partner search to be
multicompany-compliant
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 78 +++++++++----------
.../i18n/l10n_it_fatturapa_in.pot | 78 +++++++++----------
l10n_it_fatturapa_in/models/attachment.py | 7 +-
.../wizard/wizard_import_fatturapa.py | 24 ++++--
5 files changed, 101 insertions(+), 88 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index cfed628ee627..24c851a68125 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.14.0',
+ 'version': '12.0.1.14.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index c4ba4f7d621e..ddde430ca135 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -102,7 +102,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:106
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:107
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
@@ -113,7 +113,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:711
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:723
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1391
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1403
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1406
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1418
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -223,7 +223,7 @@ msgid "Contact"
msgstr "Contatto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:164
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:176
#, python-format
msgid "Country Code %s not found in system."
msgstr "Codice nazione %s non trovato nel sistema."
@@ -256,7 +256,7 @@ msgid "Creation"
msgstr "Creazione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:274
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:286
#, python-format
msgid ""
"Current invoice is from {} with REA Code {}. Yet it seems that partners {} "
@@ -287,7 +287,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:766
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:778
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -338,7 +338,7 @@ msgstr ""
"mancante"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:865
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:877
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -480,7 +480,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1429
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1441
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -516,7 +516,7 @@ msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:599
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:611
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -778,7 +778,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:687
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:699
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
@@ -789,13 +789,13 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:843
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:855
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:325
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:337
#, python-format
msgid ""
"No tax with percentage %s and nature %s found. Please configure this tax."
@@ -803,7 +803,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -850,19 +850,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:629
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:641
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1164
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1176
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -914,7 +914,7 @@ msgid "Progress data"
msgstr "Dati stato avanzamento lavori"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:217
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:229
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr "Provincia ( %s ) non presente nel sistema"
@@ -925,7 +925,7 @@ msgid "Quantity"
msgstr "Quantità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:249
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:261
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr "Codice provincia dell'ufficio REA ( %s ) non presente nel sistema"
@@ -936,7 +936,7 @@ msgid "Received Date"
msgstr "Data ricezione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:218
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr "Provincia Albo ( %s ) non presente nel sistema"
@@ -1007,7 +1007,7 @@ msgid "Round Up Account"
msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -1015,7 +1015,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1076
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1023,7 +1023,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1089
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1035,13 +1035,13 @@ msgid "Rounding Tax"
msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1108
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1092,7 +1092,7 @@ msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr "Il campo cognome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:235
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:247
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr "Regime fiscale %s non presente nel sistema."
@@ -1103,7 +1103,7 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:520
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:532
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
@@ -1140,7 +1140,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1253
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1265
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1150,7 +1150,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1235
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1247
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1160,7 +1160,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1185
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1206,7 +1206,7 @@ msgid "To Register"
msgstr "Da registrare"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:330
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:342
#, python-format
msgid ""
"Too many taxes with percentage %s and nature %s found. Tax %s with lower "
@@ -1216,7 +1216,7 @@ msgstr ""
"maggiore priorità è stata impostata sulle righe fattura."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:355
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:367
#, python-format
msgid ""
"Too many taxes with percentage equals to '%s'.\n"
@@ -1241,7 +1241,7 @@ msgstr ""
"della fattura elettronica ({e_bill_amount_total})"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:158
#, python-format
msgid ""
"Two distinct partners with VAT number %s or Fiscal Code %s already present "
@@ -1348,7 +1348,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:547
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:559
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1365,7 +1365,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1280
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1375,13 +1375,13 @@ msgstr ""
"presenti nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:529
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:541
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
@@ -1392,7 +1392,7 @@ msgid "Wizard"
msgstr "Procedura guidata"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:417
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:429
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
@@ -1400,7 +1400,7 @@ msgstr ""
"quella dell'XML."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:346
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:358
#, python-format
msgid ""
"XML contains tax with percentage '%s' but it does not exist in your system"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index eea55c452646..4d175b479cca 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -84,7 +84,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:106
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:107
#, python-format
msgid "Attachment without name"
msgstr ""
@@ -95,7 +95,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:711
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:723
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1391
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1403
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1406
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1418
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -197,7 +197,7 @@ msgid "Contact"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:164
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:176
#, python-format
msgid "Country Code %s not found in system."
msgstr ""
@@ -230,7 +230,7 @@ msgid "Creation"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:274
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:286
#, python-format
msgid "Current invoice is from {} with REA Code {}. Yet it seems that partners {} have the same REA Code. This code should be unique; please fix it."
msgstr ""
@@ -256,7 +256,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:766
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:778
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -305,7 +305,7 @@ msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:865
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:877
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -445,7 +445,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1429
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1441
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -481,7 +481,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:599
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:611
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -727,7 +727,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:687
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:699
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -738,19 +738,19 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:843
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:855
#, python-format
msgid "No currency found with code %s."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:325
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:337
#, python-format
msgid "No tax with percentage %s and nature %s found. Please configure this tax."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -797,19 +797,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:629
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:641
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1164
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1176
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1159
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -857,7 +857,7 @@ msgid "Progress data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:217
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:229
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr ""
@@ -868,7 +868,7 @@ msgid "Quantity"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:249
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:261
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr ""
@@ -879,7 +879,7 @@ msgid "Received Date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:206
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:218
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr ""
@@ -950,19 +950,19 @@ msgid "Round Up Account"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1082
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1076
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1089
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -974,13 +974,13 @@ msgid "Rounding Tax"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1096
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1108
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1027,7 +1027,7 @@ msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:235
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:247
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr ""
@@ -1038,7 +1038,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:520
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:532
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -1066,19 +1066,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1253
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1265
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1235
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1247
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1185
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1120,13 +1120,13 @@ msgid "To Register"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:330
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:342
#, python-format
msgid "Too many taxes with percentage %s and nature %s found. Tax %s with lower priority has been set on invoice lines."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:355
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:367
#, python-format
msgid "Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -1144,7 +1144,7 @@ msgid "Total amount ({bill_amount_total}) does not match with e-bill total amoun
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:146
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:158
#, python-format
msgid "Two distinct partners with VAT number %s or Fiscal Code %s already present in db."
msgstr ""
@@ -1234,7 +1234,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:547
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:559
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -1251,19 +1251,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1280
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:529
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:541
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
@@ -1274,13 +1274,13 @@ msgid "Wizard"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:417
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:429
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:346
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:358
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 3fb77ecb1cfa..7a463bf602fa 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -74,10 +74,11 @@ def get_xml_string(self):
@api.depends('ir_attachment_id.datas')
def _compute_xml_data(self):
for att in self:
- fatt = self.env['wizard.import.fatturapa'].get_invoice_obj(att)
+ wiz_obj = self.env['wizard.import.fatturapa'] \
+ .with_context(from_attachment=att)
+ fatt = wiz_obj.get_invoice_obj(att)
cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
- partner_id = self.env['wizard.import.fatturapa'].getCedPrest(
- cedentePrestatore)
+ partner_id = wiz_obj.getCedPrest(cedentePrestatore)
att.xml_supplier_id = partner_id
att.invoices_number = len(fatt.FatturaElettronicaBody)
att.invoices_total = 0
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index cb431a4a5361..60be0f4b381e 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -125,13 +125,25 @@ def getPartnerBase(self, DatiAnagrafici, supplier=True):
)
partners = partner_model
if vat:
- partners = partner_model.search([
- ('vat', '=', vat),
- ])
+ domain = [('vat', '=', vat)]
+ if self.env.context.get('from_attachment'):
+ att = self.env.context.get('from_attachment')
+ domain.extend([
+ '|',
+ ('company_id', 'child_of', att.company_id.id),
+ ('company_id', '=', False)
+ ])
+ partners = partner_model.search(domain)
if not partners and cf:
- partners = partner_model.search([
- ('fiscalcode', '=', cf),
- ])
+ domain = [('fiscalcode', '=', cf)]
+ if self.env.context.get('from_attachment'):
+ att = self.env.context.get('from_attachment')
+ domain.extend([
+ '|',
+ ('company_id', 'child_of', att.company_id.id),
+ ('company_id', '=', False)
+ ])
+ partners = partner_model.search(domain)
commercial_partner_id = False
if len(partners) > 1:
for partner in partners:
From db8ecc453667e24ec03a80d7e5afeab3b68043d0 Mon Sep 17 00:00:00 2001
From: Lara Baggio
Date: Wed, 13 May 2020 18:03:37 +0200
Subject: [PATCH 078/155] merge PR 1264 1717 1728 1737 1739
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 24c851a68125..2536dc6ebb4c 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.14.1',
+ 'version': '12.0.1.14.2',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
From 720f797a9219bdaaf17d95c7232b0b2d3fa06117 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Fri, 15 May 2020 16:23:48 +0200
Subject: [PATCH 079/155] IMP l10n_it_fatturapa_in: alert user when WT data are
incoherent
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 26 +++---
.../i18n/l10n_it_fatturapa_in.pot | 28 ++++---
.../migrations/12.0.1.15.0/post-migration.py | 13 +++
l10n_it_fatturapa_in/models/account.py | 11 ++-
.../tests/data/IT01234567890_FPR09.xml | 83 +++++++++++++++++++
.../tests/fatturapa_common.py | 24 ++++++
.../tests/test_import_fatturapa_xml.py | 18 +++-
.../wizard/wizard_import_fatturapa.py | 1 +
9 files changed, 182 insertions(+), 24 deletions(-)
create mode 100644 l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR09.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 2536dc6ebb4c..2001ce902964 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.14.2',
+ 'version': '12.0.1.16.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index ddde430ca135..d97cf0c75121 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1403
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1418
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1419
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -408,7 +408,13 @@ msgstr "Incongruenze e-fattura"
#, python-format
msgid ""
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. "
-"Please manually check Withholding tax Amount"
+"Please manually check Withholding tax Amount\n"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:122
+#, python-format
+msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
msgstr ""
#. module: l10n_it_fatturapa_in
@@ -480,7 +486,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1441
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1442
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -620,7 +626,7 @@ msgid "Invoice Line"
msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:163
+#: code:addons/l10n_it_fatturapa_in/models/account.py:170
#, python-format
msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
@@ -1140,7 +1146,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1265
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1150,7 +1156,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1247
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1313,7 +1319,7 @@ msgid "Vendor invoice registration default date"
msgstr "Data predefinita per la registrazione delle fatture fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:152
+#: code:addons/l10n_it_fatturapa_in/models/account.py:159
#, python-format
msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
@@ -1365,7 +1371,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1293
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1381,7 +1387,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1285
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 4d175b479cca..e45762734ffa 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1403
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1418
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1419
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -373,7 +373,15 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:115
#, python-format
-msgid "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. Please manually check Withholding tax Amount"
+msgid "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. Please manually check Withholding tax Amount\n"
+""
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/models/account.py:122
+#, python-format
+msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
+""
msgstr ""
#. module: l10n_it_fatturapa_in
@@ -445,7 +453,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1441
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1442
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -580,7 +588,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:163
+#: code:addons/l10n_it_fatturapa_in/models/account.py:170
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -1066,13 +1074,13 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1265
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1247
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1203,7 +1211,7 @@ msgid "Vendor invoice registration default date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:152
+#: code:addons/l10n_it_fatturapa_in/models/account.py:159
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
@@ -1251,7 +1259,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1293
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1263,7 +1271,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1284
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1285
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
new file mode 100644
index 000000000000..58573b763ac1
--- /dev/null
+++ b/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
@@ -0,0 +1,13 @@
+from odoo import api, SUPERUSER_ID
+
+
+def migrate(cr, version):
+ if not version:
+ return
+ with api.Environment.manage():
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ invoices = env['account.invoice'].search([])
+ # in order to prevent error messages in old invoices,
+ # where ftpa_withholding_amount is 0
+ for invoice in invoices:
+ invoice.ftpa_withholding_amount = invoice.withholding_tax_amount
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index d5f773da53d5..bb12d1503982 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -112,9 +112,16 @@ def e_inv_dati_ritenuta(self):
# ftpa_withholding_type is set when DatiRitenuta is set,
# withholding_tax is not set if no lines with Ritenuta = SI are found
if self.ftpa_withholding_type and not self.withholding_tax:
- error_message = (_(
+ error_message += (_(
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
- "found. Please manually check Withholding tax Amount"
+ "found. Please manually check Withholding tax Amount\n"
+ ))
+ if self.ftpa_withholding_amount != self.withholding_tax_amount:
+ error_message += (_(
+ "E-bill contains ImportoRitenuta %s but created invoice has got"
+ " %s\n" % (
+ self.ftpa_withholding_amount, self.withholding_tax_amount
+ )
))
return error_message
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR09.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR09.xml
new file mode 100644
index 000000000000..7d7a1441bcaa
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR09.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ FPR09
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD06
+ EUR
+ 2020-05-15
+ 125
+
+ RT02
+ 30.16
+ 23.00
+ A
+
+ 800.00
+
+
+
+
+ 1
+ Compensi provvigionali per procurata vendita
+ 1.000
+ 655.74000
+ 655.74
+ 22.00
+ SI
+
+
+ 22.00
+ 655.74
+ 144.26
+ I
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index 10ffcbac31f7..15c2d7e883e7 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -30,6 +30,30 @@ def create_wt(self):
self.env.ref('l10n_it_causali_pagamento.a').id,
})
+ def create_wt_23_20(self):
+ return self.env['withholding.tax'].create({
+ 'name': '2320',
+ 'code': '2320',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 23.0, 'base': 0.2})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.a').id,
+ })
+
+ def create_wt_23_50(self):
+ return self.env['withholding.tax'].create({
+ 'name': '2320',
+ 'code': '2320',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 23.0, 'base': 0.5})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.a').id,
+ })
+
def run_wizard(self, name, file_name, datas_fname=None,
mode='import', wiz_values=None, module_name=None):
if module_name is None:
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 786c02c0f916..49c91b473e74 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -559,7 +559,23 @@ def test_34_xml_import(self):
self.assertEqual(
invoice.e_invoice_validation_message,
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
- "found. Please manually check Withholding tax Amount."
+ "found. Please manually check Withholding tax Amount\nE-bill contains "
+ "ImportoRitenuta 360.0 but created invoice has got 0.0\n."
+ )
+
+ def test_35_xml_import(self):
+ # creating 2350 before 2320, so odoo will use 2350 but e-invoices
+ # contains 2320: error message must appear
+ self.create_wt_23_50()
+ self.create_wt_23_20()
+ res = self.run_wizard('test35', 'IT01234567890_FPR09.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertTrue(invoice.e_invoice_validation_error)
+ self.assertEqual(
+ invoice.e_invoice_validation_message,
+ "E-bill contains ImportoRitenuta 30.16 but created invoice has got "
+ "75.41\n."
)
def test_01_xml_link(self):
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 60be0f4b381e..83e21879c485 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1214,6 +1214,7 @@ def set_withholding_tax(self, FatturaBody, invoice_data):
Withholding.AliquotaRitenuta
))
invoice_data['ftpa_withholding_type'] = Withholding.TipoRitenuta
+ invoice_data['ftpa_withholding_amount'] = Withholding.ImportoRitenuta
return wt_found
def set_welfares_fund(
From 002adf97e265277f38a6f33699e8e4fc3ef23799 Mon Sep 17 00:00:00 2001
From: Giovanni
Date: Sun, 3 May 2020 13:55:39 +0200
Subject: [PATCH 080/155] [12.0][IMP] l10n_fatturapa_in, arrotondamento per
aliquota iva.
---
l10n_it_fatturapa_in/README.rst | 1 +
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 82 ++++++++--------
.../i18n/l10n_it_fatturapa_in.pot | 82 ++++++++--------
l10n_it_fatturapa_in/models/account.py | 73 ++++++++++++--
l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst | 1 +
l10n_it_fatturapa_in/readme/ROADMAP.rst | 2 +-
.../static/description/index.html | 1 +
.../tests/data/IT05979361218_013.xml | 2 +-
.../tests/data/IT05979361218_015.xml | 94 +++++++++++++++++++
.../tests/fatturapa_common.py | 2 -
.../tests/test_import_fatturapa_xml.py | 23 ++++-
l10n_it_fatturapa_in/views/account_view.xml | 5 +-
.../wizard/wizard_import_fatturapa.py | 69 ++++++++------
14 files changed, 311 insertions(+), 128 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_015.xml
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index b438d58cc01b..cd4c3abf4936 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -172,6 +172,7 @@ Contributors
* Roberto Onnis
* Alessio Gerace
* Sergio Zanchetta
+* Giovanni Serra
Maintainers
~~~~~~~~~~~
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 2001ce902964..747e53e2e82d 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.16.0',
+ 'version': '12.0.1.17.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index d97cf0c75121..70f95d64b8fe 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -113,7 +113,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:723
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:727
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1419
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -287,7 +287,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:778
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -338,7 +338,7 @@ msgstr ""
"mancante"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:877
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -404,7 +404,7 @@ msgid "E-bill Inconsistencies"
msgstr "Incongruenze e-fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:115
+#: code:addons/l10n_it_fatturapa_in/models/account.py:165
#, python-format
msgid ""
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. "
@@ -412,7 +412,7 @@ msgid ""
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:122
+#: code:addons/l10n_it_fatturapa_in/models/account.py:172
#, python-format
msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
msgstr ""
@@ -486,7 +486,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1442
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -522,7 +522,7 @@ msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:611
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:615
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -626,7 +626,7 @@ msgid "Invoice Line"
msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:170
+#: code:addons/l10n_it_fatturapa_in/models/account.py:220
#, python-format
msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
@@ -784,7 +784,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:699
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:703
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
@@ -795,13 +795,13 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:855
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:337
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:343
#, python-format
msgid ""
"No tax with percentage %s and nature %s found. Please configure this tax."
@@ -809,7 +809,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -856,19 +856,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:641
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:645
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1176
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -1013,7 +1013,8 @@ msgid "Round Up Account"
msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
+#: code:addons/l10n_it_fatturapa_in/models/account.py:74
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -1021,7 +1022,8 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
+#: code:addons/l10n_it_fatturapa_in/models/account.py:81
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1029,7 +1031,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1041,13 +1043,15 @@ msgid "Rounding Tax"
msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1108
+#: code:addons/l10n_it_fatturapa_in/models/account.py:76
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
+#: code:addons/l10n_it_fatturapa_in/models/account.py:83
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1109,7 +1113,7 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:532
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:536
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
@@ -1123,7 +1127,7 @@ msgstr ""
"fatture."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:84
+#: code:addons/l10n_it_fatturapa_in/models/account.py:134
#, python-format
msgid ""
"Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount "
@@ -1146,7 +1150,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1156,7 +1160,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1166,7 +1170,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1181,7 +1185,7 @@ msgid "The database object this attachment will be attached to."
msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:52
+#: code:addons/l10n_it_fatturapa_in/models/account.py:102
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr "La fattura '%s' non combacia con la relativa e-fattura"
@@ -1212,7 +1216,7 @@ msgid "To Register"
msgstr "Da registrare"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:342
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:348
#, python-format
msgid ""
"Too many taxes with percentage %s and nature %s found. Tax %s with lower "
@@ -1222,7 +1226,7 @@ msgstr ""
"maggiore priorità è stata impostata sulle righe fattura."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:367
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:373
#, python-format
msgid ""
"Too many taxes with percentage equals to '%s'.\n"
@@ -1237,7 +1241,7 @@ msgid "Total Price"
msgstr "Prezzo totale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:101
+#: code:addons/l10n_it_fatturapa_in/models/account.py:151
#, python-format
msgid ""
"Total amount ({bill_amount_total}) does not match with e-bill total amount "
@@ -1282,7 +1286,7 @@ msgid "Unread Messages Counter"
msgstr "Numero messaggi non letti"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:67
+#: code:addons/l10n_it_fatturapa_in/models/account.py:117
#, python-format
msgid ""
"Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed "
@@ -1319,7 +1323,7 @@ msgid "Vendor invoice registration default date"
msgstr "Data predefinita per la registrazione delle fatture fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:159
+#: code:addons/l10n_it_fatturapa_in/models/account.py:209
#, python-format
msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
@@ -1354,7 +1358,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:559
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:563
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1371,7 +1375,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1293
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1381,13 +1385,13 @@ msgstr ""
"presenti nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:541
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1285
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
@@ -1398,7 +1402,7 @@ msgid "Wizard"
msgstr "Procedura guidata"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:429
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:433
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
@@ -1406,7 +1410,7 @@ msgstr ""
"quella dell'XML."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:358
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:364
#, python-format
msgid ""
"XML contains tax with percentage '%s' but it does not exist in your system"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index e45762734ffa..61267d62afa5 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -95,7 +95,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:723
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:727
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1404
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1419
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -256,7 +256,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:778
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -305,7 +305,7 @@ msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:877
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -371,14 +371,14 @@ msgid "E-bill Inconsistencies"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:115
+#: code:addons/l10n_it_fatturapa_in/models/account.py:165
#, python-format
msgid "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. Please manually check Withholding tax Amount\n"
""
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:122
+#: code:addons/l10n_it_fatturapa_in/models/account.py:172
#, python-format
msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
""
@@ -453,7 +453,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1442
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -489,7 +489,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:611
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:615
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -588,7 +588,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:170
+#: code:addons/l10n_it_fatturapa_in/models/account.py:220
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -735,7 +735,7 @@ msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:699
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:703
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -746,19 +746,19 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:855
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
#, python-format
msgid "No currency found with code %s."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:337
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:343
#, python-format
msgid "No tax with percentage %s and nature %s found. Please configure this tax."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1209
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -805,19 +805,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:641
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:645
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1176
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1171
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -958,19 +958,21 @@ msgid "Round Up Account"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1094
+#: code:addons/l10n_it_fatturapa_in/models/account.py:74
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1088
+#: code:addons/l10n_it_fatturapa_in/models/account.py:81
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1101
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -982,13 +984,15 @@ msgid "Rounding Tax"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1108
+#: code:addons/l10n_it_fatturapa_in/models/account.py:76
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1117
+#: code:addons/l10n_it_fatturapa_in/models/account.py:83
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1046,7 +1050,7 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:532
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:536
#, python-format
msgid "Tax kind %s not found"
msgstr ""
@@ -1058,7 +1062,7 @@ msgid "Tax used to both round up and down bills amount."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:84
+#: code:addons/l10n_it_fatturapa_in/models/account.py:134
#, python-format
msgid "Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount ({e_bill_amount_tax})"
msgstr ""
@@ -1074,19 +1078,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1266
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1248
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1197
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1097,7 +1101,7 @@ msgid "The database object this attachment will be attached to."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:52
+#: code:addons/l10n_it_fatturapa_in/models/account.py:102
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr ""
@@ -1128,13 +1132,13 @@ msgid "To Register"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:342
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:348
#, python-format
msgid "Too many taxes with percentage %s and nature %s found. Tax %s with lower priority has been set on invoice lines."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:367
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:373
#, python-format
msgid "Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -1146,7 +1150,7 @@ msgid "Total Price"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:101
+#: code:addons/l10n_it_fatturapa_in/models/account.py:151
#, python-format
msgid "Total amount ({bill_amount_total}) does not match with e-bill total amount ({e_bill_amount_total})"
msgstr ""
@@ -1183,7 +1187,7 @@ msgid "Unread Messages Counter"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:67
+#: code:addons/l10n_it_fatturapa_in/models/account.py:117
#, python-format
msgid "Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed amount ({e_bill_amount_untaxed})"
msgstr ""
@@ -1211,7 +1215,7 @@ msgid "Vendor invoice registration default date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:159
+#: code:addons/l10n_it_fatturapa_in/models/account.py:209
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
@@ -1242,7 +1246,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:559
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:563
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -1259,19 +1263,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1293
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:541
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1285
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
@@ -1282,13 +1286,13 @@ msgid "Wizard"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:429
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:433
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:358
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:364
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index bb12d1503982..a0f064cfc978 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -1,6 +1,6 @@
from odoo import fields, models, api, _
-from odoo.exceptions import ValidationError
+from odoo.exceptions import ValidationError, UserError
from odoo.tools import float_compare
import odoo.addons.decimal_precision as dp
@@ -43,6 +43,56 @@ class AccountInvoice(models.Model):
e_invoice_received_date = fields.Date(
string='E-Bill Received Date')
+ @api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount',
+ 'tax_line_ids.amount_rounding', 'currency_id', 'company_id',
+ 'date_invoice', 'type', 'efatt_rounding')
+ def _compute_amount(self):
+ super(AccountInvoice, self)._compute_amount()
+ if self.efatt_rounding != 0:
+ self.amount_total += self.efatt_rounding
+ amount_total_company_signed = self.amount_total
+ if self.currency_id and self.company_id and self.currency_id !=\
+ self.company_id.currency_id:
+ currency_id = self.currency_id
+ amount_total_company_signed = currency_id._convert(
+ self.amount_total, self.company_id.currency_id,
+ self.company_id, self.date_invoice or fields.Date.today())
+ sign = self.type in ['in_refund', 'out_refund'] and -1 or 1
+ self.amount_total_company_signed = amount_total_company_signed * sign
+ self.amount_total_signed = self.amount_total * sign
+
+ @api.model
+ def invoice_line_move_line_get(self):
+ """Append global rounding move lines"""
+ res = super().invoice_line_move_line_get()
+
+ if self.efatt_rounding != 0:
+ if self.efatt_rounding > 0:
+ arrotondamenti_account_id = self.env.user.company_id.\
+ arrotondamenti_passivi_account_id
+ if not arrotondamenti_account_id:
+ raise UserError(_("Round down account is not set "
+ "in Accounting Settings"))
+ name = _("Rounding down")
+ else:
+ arrotondamenti_account_id = self.env.user.company_id.\
+ arrotondamenti_attivi_account_id
+ if not arrotondamenti_account_id:
+ raise UserError(_("Round up account is not set "
+ "in Accounting Settings"))
+ name = _("Rounding up")
+
+ res.append({
+ 'type': 'global_rounding',
+ 'name': name,
+ 'price_unit': self.efatt_rounding,
+ 'quantity': 1,
+ 'price': self.efatt_rounding,
+ 'account_id': arrotondamenti_account_id.id,
+ 'invoice_id': self.id,
+ })
+ return res
+
@api.multi
def invoice_validate(self):
for invoice in self:
@@ -208,19 +258,23 @@ def remove_attachment_link(self):
@api.model
def compute_xml_amount_untaxed(self, FatturaBody):
- amount_untaxed = float(
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento
- or 0.0)
+ amount_untaxed = 0.0
for Riepilogo in FatturaBody.DatiBeniServizi.DatiRiepilogo:
- rounding = float(Riepilogo.Arrotondamento or 0.0)
- amount_untaxed += float(Riepilogo.ImponibileImporto) + rounding
+ amount_untaxed += float(Riepilogo.ImponibileImporto or 0.0)
return amount_untaxed
+ @api.model
+ def compute_xml_amount_total(self, FatturaBody, amount_untaxed, amount_tax):
+ rounding = float(
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento
+ or 0.0)
+ return amount_untaxed + amount_tax + rounding
+
@api.model
def compute_xml_amount_tax(self, DatiRiepilogo):
amount_tax = 0.0
for Riepilogo in DatiRiepilogo:
- amount_tax += float(Riepilogo.Imposta)
+ amount_tax += float(Riepilogo.Imposta or 0.0)
return amount_tax
def set_einvoice_data(self, fattura):
@@ -228,9 +282,8 @@ def set_einvoice_data(self, fattura):
amount_untaxed = self.compute_xml_amount_untaxed(fattura)
amount_tax = self.compute_xml_amount_tax(
fattura.DatiBeniServizi.DatiRiepilogo)
- amount_total = float(
- fattura.DatiGenerali.DatiGeneraliDocumento.
- ImportoTotaleDocumento or 0.0)
+ amount_total = self.compute_xml_amount_total(
+ fattura, amount_untaxed, amount_tax)
reference = fattura.DatiGenerali.DatiGeneraliDocumento.Numero
date_invoice = fields.Date.from_string(
fattura.DatiGenerali.DatiGeneraliDocumento.Data)
diff --git a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
index 9b00be3d2b34..1721984a8682 100644
--- a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
+++ b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
@@ -2,3 +2,4 @@
* Roberto Onnis
* Alessio Gerace
* Sergio Zanchetta
+* Giovanni Serra
diff --git a/l10n_it_fatturapa_in/readme/ROADMAP.rst b/l10n_it_fatturapa_in/readme/ROADMAP.rst
index 9ec04c0ccbb1..452aee30958f 100644
--- a/l10n_it_fatturapa_in/readme/ROADMAP.rst
+++ b/l10n_it_fatturapa_in/readme/ROADMAP.rst
@@ -16,4 +16,4 @@ la visibilità delle sezioni ``FatturaElettronicaBody.DatiBeniServizi.DatiRiepil
Pertanto, al fine di ottenere il corretto valore del totale imponibile, i moduli che
avessero ridefinito il metodo ``compute_xml_amount_untaxed`` nel modello ``account.invoice``
-dovranno adeguare la chiamata al metodo stesso preoccupandosi di utilizzare come primo parametro l'oggetto ``FatturaElettronicaBody``.
\ No newline at end of file
+dovranno adeguare la chiamata al metodo stesso preoccupandosi di utilizzare come primo parametro l'oggetto ``FatturaElettronicaBody``.
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index a4372e9ecc9e..ce853fcecd10 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -495,6 +495,7 @@
Roberto Onnis
Alessio Gerace
Sergio Zanchetta <https://github.com/primes2h >
+Giovanni Serra <giovanni@gslab.it >
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml
index 2ade52ad22b1..9e5346afe016 100644
--- a/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_013.xml
@@ -54,7 +54,7 @@ xsi:schemaLocation="http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.
TD01
EUR
2019-05-11
-
852S1
+
A852S1
34.32
-0.35
Rif ordine 908
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_015.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_015.xml
new file mode 100644
index 000000000000..ecbcd2956c1d
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_015.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 006
+ FPA12
+ UFPQ1O
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2019-05-11
+ 852S1
+ 34.32
+ Rif ordine 908
+
+
+
+
+ 1
+ USB4
+ 1.00
+ Pz.
+ 18.07
+ 18.07
+ 0.00
+ N4
+
+
+ 2
+ USB
+ 1.00
+ Pz.
+ 16.60
+ 16.60
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ -0.35
+ 34.32
+ 0.00
+ I
+ Esenzione Art.8 comma 1 DPR 633/72
+
+
+
+
\ No newline at end of file
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index 15c2d7e883e7..1a3af0cbf85a 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
import base64
import tempfile
from odoo.modules import get_module_resource
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 49c91b473e74..bb0c2481d598 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -486,14 +486,31 @@ def test_24_xml_import(self):
res = self.run_wizard('test24', 'IT05979361218_012.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.32)
- self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
- self.assertEqual(invoice.e_invoice_amount_total, 34.32)
+ self.assertEqual(
+ invoice.inconsistencies,
+ 'Computed amount untaxed 34.32 is different from'
+ ' summary data 34.67')
def test_25_xml_import(self):
res = self.run_wizard('test25', 'IT05979361218_013.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
+ self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.67)
+ self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
+ self.assertEqual(invoice.e_invoice_amount_total, 34.32)
+ self.assertEqual(invoice.efatt_rounding, -0.35)
+ invoice.action_invoice_open()
+ move_line = False
+ for line in invoice.move_id.line_ids:
+ if line.account_id.id == self.env.user.\
+ company_id.arrotondamenti_attivi_account_id.id:
+ move_line = True
+ self.assertTrue(move_line)
+
+ def test_26_xml_import(self):
+ res = self.run_wizard('test26', 'IT05979361218_015.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.32)
self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
self.assertEqual(invoice.e_invoice_amount_total, 34.32)
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 22d25f1a949b..b781030096d0 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -138,6 +138,9 @@
+
+
+
@@ -313,7 +316,7 @@
-
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 83e21879c485..6b7aa1136cef 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -315,6 +315,12 @@ def getCarrirerPartner(self, Carrier):
def _prepare_generic_line_data(self, line):
retLine = {}
+ account_taxes = self.get_account_taxes(line.AliquotaIVA, line.Natura)
+ if account_taxes:
+ retLine['invoice_line_tax_ids'] = [(6, 0, [account_taxes[0].id])]
+ return retLine
+
+ def get_account_taxes(self, AliquotaIVA, Natura):
account_tax_model = self.env['account.tax']
# check if a default tax exists and generate def_purchase_tax object
ir_values = self.env['ir.default']
@@ -325,30 +331,30 @@ def _prepare_generic_line_data(self, line):
def_purchase_tax = False
if supplier_taxes_ids:
def_purchase_tax = account_tax_model.browse(supplier_taxes_ids)[0]
- if float(line.AliquotaIVA) == 0.0 and line.Natura:
+ if float(AliquotaIVA) == 0.0 and Natura:
account_taxes = account_tax_model.search(
[
('type_tax_use', '=', 'purchase'),
- ('kind_id.code', '=', line.Natura),
+ ('kind_id.code', '=', Natura),
('amount', '=', 0.0),
], order='sequence')
if not account_taxes:
self.log_inconsistency(
_('No tax with percentage '
'%s and nature %s found. Please configure this tax.')
- % (line.AliquotaIVA, line.Natura))
+ % (AliquotaIVA, Natura))
if len(account_taxes) > 1:
self.log_inconsistency(
_('Too many taxes with percentage '
'%s and nature %s found. Tax %s with lower priority has '
'been set on invoice lines.')
- % (line.AliquotaIVA, line.Natura,
+ % (AliquotaIVA, Natura,
account_taxes[0].description))
else:
account_taxes = account_tax_model.search(
[
('type_tax_use', '=', 'purchase'),
- ('amount', '=', float(line.AliquotaIVA)),
+ ('amount', '=', float(AliquotaIVA)),
('price_include', '=', False),
# partially deductible VAT must be set by user
('children_tax_ids', '=', False),
@@ -358,7 +364,7 @@ def _prepare_generic_line_data(self, line):
_(
"XML contains tax with percentage '%s' "
"but it does not exist in your system"
- ) % line.AliquotaIVA
+ ) % AliquotaIVA
)
# check if there are multiple taxes with
# same percentage
@@ -367,18 +373,16 @@ def _prepare_generic_line_data(self, line):
_logger.warning(_(
"Too many taxes with percentage equals "
"to '%s'.\nFix it if required"
- ) % line.AliquotaIVA)
+ ) % AliquotaIVA)
# if there are multiple taxes with same percentage
# and there is a default tax with this percentage,
# set taxes list equal to supplier_taxes_id, loaded before
if (
def_purchase_tax and
- def_purchase_tax.amount == (float(line.AliquotaIVA))
+ def_purchase_tax.amount == (float(AliquotaIVA))
):
account_taxes = def_purchase_tax
- if account_taxes:
- retLine['invoice_line_tax_ids'] = [(6, 0, [account_taxes[0].id])]
- return retLine
+ return account_taxes
def get_line_product(self, line, partner):
product = None
@@ -1101,26 +1105,29 @@ def set_roundings(self, FatturaBody, invoice):
_('Round up and down tax is not set')
)
- line_vals = {}
- if rounding > 0.0:
- line_vals = {
- 'invoice_id': invoice.id,
- 'name': _("Rounding down"),
- 'account_id': arrotondamenti_passivi_account_id.id,
- 'price_unit': rounding,
- 'invoice_line_tax_ids':
- [(6, 0, [arrotondamenti_tax_id.id])],
- }
- elif rounding < 0.0:
- line_vals = {
- 'invoice_id': invoice.id,
- 'name': _("Rounding up"),
- 'account_id': arrotondamenti_attivi_account_id.id,
- 'price_unit': rounding,
- 'invoice_line_tax_ids':
- [(6, 0, [arrotondamenti_tax_id.id])],
- }
-
+ line_sequence = max(invoice.invoice_line_ids.mapped('sequence'))
+ line_vals = []
+ for summary in FatturaBody.DatiBeniServizi.DatiRiepilogo:
+ to_round = float(summary.Arrotondamento or 0.0)
+ if to_round != 0.0:
+ account_taxes = self.get_account_taxes(
+ summary.AliquotaIVA, summary.Natura)
+ arrotondamenti_account_id = arrotondamenti_passivi_account_id.id\
+ if to_round > 0.0 else arrotondamenti_attivi_account_id.id
+ invoice_line_tax_id = account_taxes[0].id if account_taxes\
+ else arrotondamenti_tax_id.id
+ name = _("Rounding down") if to_round > 0.0 else _(
+ "Rounding up")
+ line_sequence += 1
+ line_vals.append({
+ 'sequence': line_sequence,
+ 'invoice_id': invoice.id,
+ 'name': name,
+ 'account_id': arrotondamenti_account_id,
+ 'price_unit': to_round,
+ 'invoice_line_tax_ids':
+ [(6, 0, [invoice_line_tax_id])],
+ })
if line_vals:
self.env['account.invoice.line'].create(line_vals)
From 66632c175f185c081dfbaa771eee91da052062ec Mon Sep 17 00:00:00 2001
From: eLBati
Date: Tue, 16 Jun 2020 11:09:15 +0200
Subject: [PATCH 081/155] FIX l10n_it_fatturapa_in when importing an XML with
BIC (present in Odoo DB) but without IstitutoFinanziario
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 38 +++----
.../i18n/l10n_it_fatturapa_in.pot | 38 +++----
.../tests/data/IT01234567890_FPR10.xml | 99 +++++++++++++++++++
.../tests/fatturapa_common.py | 6 ++
.../tests/test_import_fatturapa_xml.py | 13 +++
.../wizard/wizard_import_fatturapa.py | 1 -
7 files changed, 157 insertions(+), 40 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR10.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 747e53e2e82d..1dcf4ed13edc 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.17.0',
+ 'version': '12.0.1.17.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 70f95d64b8fe..272269deed9c 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1410
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1425
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -287,7 +287,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:781
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -338,7 +338,7 @@ msgstr ""
"mancante"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -486,7 +486,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1448
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -795,7 +795,7 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:858
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
@@ -809,7 +809,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1215
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -862,13 +862,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1182
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1177
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -1014,7 +1014,7 @@ msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:74
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1097
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -1023,7 +1023,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:81
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1031,7 +1031,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1104
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1044,14 +1044,14 @@ msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:76
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:83
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1150,7 +1150,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1160,7 +1160,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1254
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1170,7 +1170,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1375,7 +1375,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1299
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1391,7 +1391,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1291
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 61267d62afa5..5e822dd1208c 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1410
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1425
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -256,7 +256,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:781
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -305,7 +305,7 @@ msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -453,7 +453,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1448
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -746,7 +746,7 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:858
#, python-format
msgid "No currency found with code %s."
msgstr ""
@@ -758,7 +758,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1215
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -811,13 +811,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1182
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1177
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -959,20 +959,20 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:74
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1097
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:81
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1104
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -985,14 +985,14 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:76
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:83
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1078,19 +1078,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1254
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1263,7 +1263,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1299
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1275,7 +1275,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1291
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR10.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR10.xml
new file mode 100644
index 000000000000..52c9e8573660
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR10.xml
@@ -0,0 +1,99 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ FPR10
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-06-16
+ 126
+ LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
+ SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
+
+
+
+
+ 1
+
+ INT
+ ART123
+
+ LA DESCRIZIONE DELLA FORNITURA PUO' SUPERARE I CENTO CARATTERI CHE RAPPRESENTAVANO IL PRECEDENTE LIMITE DIMENSIONALE. TALE LIMITE NELLA NUOVA VERSIONE E' STATO PORTATO A MILLE CARATTERI
+ 5.00
+ 1.00
+ 5.00
+ 22.00
+
+
+ 2
+ FORNITURE VARIE PER UFFICIO
+ 10.00
+ 2.00
+ 20.00
+ 22.00
+
+
+ 22.00
+ 25.00
+ 5.50
+ I
+
+
+
+ TP01
+
+ MP01
+ 2020-06-30
+ 32.50
+ IT59R0100003228000000000621
+ BCITITMM
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index 1a3af0cbf85a..3fd3ba5464f7 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -52,6 +52,12 @@ def create_wt_23_50(self):
self.env.ref('l10n_it_causali_pagamento.a').id,
})
+ def create_res_bank(self):
+ return self.env['res.bank'].create({
+ 'name': 'Banca generica',
+ 'bic': 'BCITITMM',
+ })
+
def run_wizard(self, name, file_name, datas_fname=None,
mode='import', wiz_values=None, module_name=None):
if module_name is None:
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index bb0c2481d598..4d991337f0e6 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -595,6 +595,19 @@ def test_35_xml_import(self):
"75.41\n."
)
+ def test_35_xml_import(self):
+ # creating a res.bank and importing an XML without "IstitutoFinanziario"
+ self.create_res_bank()
+ res = self.run_wizard('test35', 'IT01234567890_FPR10.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(
+ invoice.fatturapa_payments[0].payment_methods[0].payment_bank.bank_id.bic,
+ 'BCITITMM')
+ self.assertEqual(
+ invoice.fatturapa_payments[0].payment_methods[0].payment_bank.bank_id.name,
+ 'Banca generica')
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 6b7aa1136cef..9be9e4751043 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -741,7 +741,6 @@ def _createPaymentsLine(self, payment_id, line, partner_id):
'acc_number': dline.IBAN.strip(),
'partner_id': partner_id,
'bank_id': bankid,
- 'bank_name': dline.IstitutoFinanziario,
'bank_bic': dline.BIC
}
).id
From 2ea9036c5eeb3dc92f4d6000b54ef39dd4f300b0 Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Wed, 29 May 2019 19:23:42 +0200
Subject: [PATCH 082/155] [12.0][IMP] add invoices date to fatturapa in view
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 8 +++++++-
l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot | 7 ++++++-
l10n_it_fatturapa_in/models/attachment.py | 8 ++++++++
l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py | 6 ++++++
l10n_it_fatturapa_in/views/account_view.xml | 2 ++
6 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 1dcf4ed13edc..41104e649f57 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.17.1',
+ 'version': '12.0.1.18.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 272269deed9c..d46f4d23e8e3 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -102,7 +102,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:107
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:115
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
@@ -635,6 +635,12 @@ msgstr ""
"La data fattura ({bill_date_invoice}) non corrisponde con la data della "
"fattura elettronica ({e_bill_date_invoice})"
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__invoices_date
+#, fuzzy
+msgid "Invoices date"
+msgstr "Data fattura"
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_is_follower
msgid "Is Follower"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 5e822dd1208c..d6c91e3e4234 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -84,7 +84,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:107
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:115
#, python-format
msgid "Attachment without name"
msgstr ""
@@ -593,6 +593,11 @@ msgstr ""
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__invoices_date
+msgid "Invoices date"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_is_follower
msgid "Is Follower"
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 7a463bf602fa..9af85086ef6d 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -29,6 +29,8 @@ class FatturaPAAttachmentIn(models.Model):
help="If specified by supplier, total amount of the document net of "
"any discount and including tax charged to the buyer/ordered"
)
+ invoices_date = fields.Char(
+ string="Invoices date", compute="_compute_xml_data", store=True)
registered = fields.Boolean(
"Registered", compute="_compute_registered", store=True)
@@ -82,11 +84,17 @@ def _compute_xml_data(self):
att.xml_supplier_id = partner_id
att.invoices_number = len(fatt.FatturaElettronicaBody)
att.invoices_total = 0
+ invoices_date = []
for invoice_body in fatt.FatturaElettronicaBody:
att.invoices_total += float(
invoice_body.DatiGenerali.DatiGeneraliDocumento.
ImportoTotaleDocumento or 0
)
+ invoice_date = fields.Date.to_string(fields.Date.from_string(
+ invoice_body.DatiGenerali.DatiGeneraliDocumento.Data))
+ if invoice_date not in invoices_date:
+ invoices_date.append(invoice_date)
+ att.invoices_date = ' '.join(invoices_date)
@api.multi
@api.depends('in_invoice_ids')
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 4d991337f0e6..599b02d8e57b 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -40,6 +40,8 @@ def test_00_xml_import(self):
self.assertEqual(
invoice.partner_id.register_fiscalpos.code, 'RF02')
self.assertEqual(invoice.reference, 'FT/2015/0006')
+ self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date,
+ '2015-02-16')
self.assertEqual(invoice.amount_total, 57.00)
self.assertEqual(invoice.gross_weight, 0.00)
self.assertEqual(invoice.net_weight, 0.00)
@@ -78,6 +80,8 @@ def test_01_xml_import(self):
self.assertEqual(invoice.reference, '123')
self.assertEqual(invoice.amount_untaxed, 34.00)
self.assertEqual(invoice.amount_tax, 7.48)
+ self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date,
+ '2014-12-18')
self.assertEqual(
len(invoice.invoice_line_ids[0].invoice_line_tax_ids), 1)
self.assertEqual(
@@ -328,6 +332,8 @@ def test_16_xml_import(self):
invoice_ids = res.get('domain')[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
+ self.assertEqual(invoices[0].fatturapa_attachment_in_id.invoices_date,
+ '2014-12-18 2014-12-20')
for invoice in invoices:
self.assertEqual(invoice.inconsistencies, '')
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index b781030096d0..9c8f934e2f4b 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -29,6 +29,7 @@
+
@@ -73,6 +74,7 @@
+
From 25f472a81983d2e60f960edeb6900831ef2d898f Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Mon, 17 Aug 2020 15:28:44 +0200
Subject: [PATCH 083/155] [12.0][FIX] trailing whitespaces in xml data
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.xml | 2 +-
l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 41104e649f57..c4bfdd629eaf 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.18.0',
+ 'version': '12.0.1.18.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.xml
index f6b4040abae8..21046810c9bd 100644
--- a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR04.xml
@@ -51,7 +51,7 @@
TD01
EUR
- 2019-02-15
+ 2019-02-15
123
LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
index 26e08ca02990..16e55ce30bc8 100644
--- a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR05.xml
@@ -51,7 +51,7 @@
TD01
EUR
- 2014-12-18
+ 2014-12-18
123
LA FATTURA FA RIFERIMENTO AD UNA OPERAZIONE AAAA BBBBBBBBBBBBBBBBBB CCC DDDDDDDDDDDDDDD E FFFFFFFFFFFFFFFFFFFF GGGGGGGGGG HHHHHHH II LLLLLLLLLLLLLLLLL MMM NNNNN OO PPPPPPPPPPP QQQQ RRRR SSSSSSSSSSSSSS
SEGUE DESCRIZIONE CAUSALE NEL CASO IN CUI NON SIANO STATI SUFFICIENTI 200 CARATTERI AAAAAAAAAAA BBBBBBBBBBBBBBBBB
From 0f3bc90b346bb6705dd68317987f588eaeb47f94 Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Tue, 18 Aug 2020 08:07:49 +0200
Subject: [PATCH 084/155] [FIX] italian date format
---
l10n_it_fatturapa_in/models/attachment.py | 7 ++++--
.../tests/fatturapa_common.py | 1 +
.../tests/test_import_fatturapa_xml.py | 25 ++++++++++++++-----
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 9af85086ef6d..6c0505e45929 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -1,6 +1,7 @@
import base64
from odoo import fields, models, api, _
+from odoo.tools import format_date
class FatturaPAAttachmentIn(models.Model):
@@ -90,8 +91,10 @@ def _compute_xml_data(self):
invoice_body.DatiGenerali.DatiGeneraliDocumento.
ImportoTotaleDocumento or 0
)
- invoice_date = fields.Date.to_string(fields.Date.from_string(
- invoice_body.DatiGenerali.DatiGeneraliDocumento.Data))
+ invoice_date = format_date(
+ att.with_context(
+ lang=att.env.user.lang).env, fields.Date.from_string(
+ invoice_body.DatiGenerali.DatiGeneraliDocumento.Data))
if invoice_date not in invoices_date:
invoices_date.append(invoice_date)
att.invoices_date = ' '.join(invoices_date)
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index 3fd3ba5464f7..eae4886c37a7 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -127,3 +127,4 @@ def setUp(self):
arrotondamenti_passivi_account_id)
self.env.user.company_id.arrotondamenti_tax_id = (
arrotondamenti_tax_id)
+ self.env['res.lang'].load_lang('it_IT')
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 599b02d8e57b..b0bf256c2e81 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -40,8 +40,6 @@ def test_00_xml_import(self):
self.assertEqual(
invoice.partner_id.register_fiscalpos.code, 'RF02')
self.assertEqual(invoice.reference, 'FT/2015/0006')
- self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date,
- '2015-02-16')
self.assertEqual(invoice.amount_total, 57.00)
self.assertEqual(invoice.gross_weight, 0.00)
self.assertEqual(invoice.net_weight, 0.00)
@@ -80,8 +78,6 @@ def test_01_xml_import(self):
self.assertEqual(invoice.reference, '123')
self.assertEqual(invoice.amount_untaxed, 34.00)
self.assertEqual(invoice.amount_tax, 7.48)
- self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date,
- '2014-12-18')
self.assertEqual(
len(invoice.invoice_line_ids[0].invoice_line_tax_ids), 1)
self.assertEqual(
@@ -332,8 +328,6 @@ def test_16_xml_import(self):
invoice_ids = res.get('domain')[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
- self.assertEqual(invoices[0].fatturapa_attachment_in_id.invoices_date,
- '2014-12-18 2014-12-20')
for invoice in invoices:
self.assertEqual(invoice.inconsistencies, '')
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
@@ -614,6 +608,25 @@ def test_35_xml_import(self):
invoice.fatturapa_payments[0].payment_methods[0].payment_bank.bank_id.name,
'Banca generica')
+ def test_37_xml_import_dates(self):
+ self.env.user.lang = 'it_IT'
+ res = self.run_wizard('test37', 'IT02780790107_11004.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date,
+ '18/12/2014')
+
+ def test_38_xml_import_dates(self):
+ # file B2B downloaded from
+ # http://www.fatturapa.gov.it/export/fatturazione/it/a-3.htm
+ self.env.user.lang = 'it_IT'
+ res = self.run_wizard('test38', 'IT01234567890_FPR03.xml')
+ invoice_ids = res.get('domain')[0][2]
+ invoices = self.invoice_model.browse(invoice_ids)
+ self.assertEqual(len(invoices), 2)
+ self.assertEqual(invoices[0].fatturapa_attachment_in_id.invoices_date,
+ '18/12/2014 20/12/2014')
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
From 0ad0e13c04f22dd74ae38dfb55f027f283d8a4a4 Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Mon, 24 Aug 2020 15:13:09 +0200
Subject: [PATCH 085/155] [FIX] rename test as duplicated and not launched
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 2 +-
l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot | 2 +-
l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index c4bfdd629eaf..85446693d496 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.18.1',
+ 'version': '12.0.1.18.2',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index d46f4d23e8e3..0a494ac0765f 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -102,7 +102,7 @@ msgid "Attachment URL"
msgstr "URL allegato"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:115
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:118
#, python-format
msgid "Attachment without name"
msgstr "Allegato senza nome"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index d6c91e3e4234..22b8812efff7 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -84,7 +84,7 @@ msgid "Attachment URL"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/attachment.py:115
+#: code:addons/l10n_it_fatturapa_in/models/attachment.py:118
#, python-format
msgid "Attachment without name"
msgstr ""
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index b0bf256c2e81..5d2ac92e75e2 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -595,10 +595,10 @@ def test_35_xml_import(self):
"75.41\n."
)
- def test_35_xml_import(self):
+ def test_36_xml_import(self):
# creating a res.bank and importing an XML without "IstitutoFinanziario"
self.create_res_bank()
- res = self.run_wizard('test35', 'IT01234567890_FPR10.xml')
+ res = self.run_wizard('test36', 'IT01234567890_FPR10.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(
From 874bc1c1ee179eb81bf83068b5219e5e12ff8216 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Thu, 10 Sep 2020 16:39:49 +0200
Subject: [PATCH 086/155] FIX license compatibility
---
l10n_it_fatturapa_in/README.rst | 6 +++---
l10n_it_fatturapa_in/__manifest__.py | 6 +++---
l10n_it_fatturapa_in/static/description/index.html | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index cd4c3abf4936..08bdabc8b4a0 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -10,9 +10,9 @@ ITA - Fattura elettronica - Ricezione
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
-.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
- :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
- :alt: License: LGPL-3
+.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_fatturapa_in
:alt: OCA/l10n-italy
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 85446693d496..4c6b27f96e51 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -2,11 +2,11 @@
# Copyright 2015 innoviu Srl
# Copyright 2018 Lorenzo Battistini
# Copyright 2018 Sergio Zanchetta (Associazione PNLUG - Gruppo Odoo)
-# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.18.2',
+ 'version': '12.0.1.18.3',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
@@ -14,7 +14,7 @@
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/l10n-italy/tree/12.0/'
'l10n_it_fatturapa_in',
- 'license': 'LGPL-3',
+ 'license': 'AGPL-3',
"depends": [
'l10n_it_fatturapa',
'l10n_it_withholding_tax_causali',
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index ce853fcecd10..108057160c5a 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -367,7 +367,7 @@ ITA - Fattura elettronica - Ricezione
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
Italiano
Questo modulo consente di importare i file XML della fattura elettronica versione 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
From 26d1bfdffba34190193fbe33cb91686c56e217b3 Mon Sep 17 00:00:00 2001
From: SimoRubi
Date: Fri, 15 Mar 2019 13:09:04 +0100
Subject: [PATCH 087/155] [FIX] l10n_it_fatturapa_in: IstitutoFinanziario and
BIC are not mandatory in XML Avoid error bad query: UPDATE "res_bank" SET
"name"=NULL,"write_uid"=1,"write_date"=(now() at time zone 'UTC') WHERE id IN
(6)
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 38 +++++++++----------
.../i18n/l10n_it_fatturapa_in.pot | 38 +++++++++----------
.../wizard/wizard_import_fatturapa.py | 17 +++++----
4 files changed, 48 insertions(+), 47 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 4c6b27f96e51..2e34bb0cef54 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.18.3',
+ 'version': '12.0.1.18.4',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 0a494ac0765f..e3201ec5f0b0 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1410
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1425
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -287,7 +287,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:781
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -338,7 +338,7 @@ msgstr ""
"mancante"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -486,7 +486,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1448
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -801,7 +801,7 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:858
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
@@ -815,7 +815,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1215
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -868,13 +868,13 @@ msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1182
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1177
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -1020,7 +1020,7 @@ msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:74
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1097
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -1029,7 +1029,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:81
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1037,7 +1037,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1104
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1050,14 +1050,14 @@ msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:76
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:83
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1156,7 +1156,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1166,7 +1166,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1254
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1176,7 +1176,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1381,7 +1381,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1299
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1397,7 +1397,7 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1291
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 22b8812efff7..4b23b309b77b 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1410
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1425
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -256,7 +256,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:781
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -305,7 +305,7 @@ msgid "Do not block e-bill import in case of missing Enasarco configuration"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:880
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -453,7 +453,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1448
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -751,7 +751,7 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:858
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
#, python-format
msgid "No currency found with code %s."
msgstr ""
@@ -763,7 +763,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1215
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -816,13 +816,13 @@ msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1182
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1177
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -964,20 +964,20 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:74
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1097
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:81
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1091
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1104
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -990,14 +990,14 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:76
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:83
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1118
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1083,19 +1083,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1272
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1254
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1203
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1268,7 +1268,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1299
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1280,7 +1280,7 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1291
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 9be9e4751043..5ff3006ed0e5 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -691,7 +691,7 @@ def _createPaymentsLine(self, payment_id, line, partner_id):
dline.CodicePagamento or '',
'payment_data_id': payment_id
}
- bankid = False
+ bank = False
payment_bank_id = False
if dline.BIC:
banks = BankModel.search(
@@ -704,14 +704,14 @@ def _createPaymentsLine(self, payment_id, line, partner_id):
" Can't create bank") % dline.BIC
)
else:
- bankid = BankModel.create(
+ bank = BankModel.create(
{
'name': dline.IstitutoFinanziario,
'bic': dline.BIC,
}
- ).id
+ )
else:
- bankid = banks[0].id
+ bank = banks[0]
if dline.IBAN:
SearchDom = [
(
@@ -722,7 +722,7 @@ def _createPaymentsLine(self, payment_id, line, partner_id):
]
payment_bank_id = False
payment_banks = PartnerBankModel.search(SearchDom)
- if not payment_banks and not bankid:
+ if not payment_banks and not bank:
self.log_inconsistency(
_(
'BIC is required and not exist in Xml\n'
@@ -735,13 +735,14 @@ def _createPaymentsLine(self, payment_id, line, partner_id):
dline.IstitutoFinanziario or ''
)
)
- elif not payment_banks and bankid:
+ elif not payment_banks and bank:
payment_bank_id = PartnerBankModel.create(
{
'acc_number': dline.IBAN.strip(),
'partner_id': partner_id,
- 'bank_id': bankid,
- 'bank_bic': dline.BIC
+ 'bank_id': bank.id,
+ 'bank_name': dline.IstitutoFinanziario or bank.name,
+ 'bank_bic': dline.BIC or bank.bic
}
).id
if payment_banks:
From 2a80bf5a46d8f2b95a9b803f47894e5d5a45b0b2 Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Thu, 27 Aug 2020 08:01:42 +0200
Subject: [PATCH 088/155] [12.0][FIX] create field to exclude recomputation of
old invoices
---
.../migrations/12.0.1.18.3/pre-migration.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 l10n_it_fatturapa_in/migrations/12.0.1.18.3/pre-migration.py
diff --git a/l10n_it_fatturapa_in/migrations/12.0.1.18.3/pre-migration.py b/l10n_it_fatturapa_in/migrations/12.0.1.18.3/pre-migration.py
new file mode 100644
index 000000000000..0f231b3d4955
--- /dev/null
+++ b/l10n_it_fatturapa_in/migrations/12.0.1.18.3/pre-migration.py
@@ -0,0 +1,14 @@
+from openupgradelib import openupgrade
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ if not version:
+ return
+ openupgrade.logged_query(
+ env.cr,
+ """
+ ALTER TABLE fatturapa_attachment_in
+ ADD COLUMN IF NOT EXISTS invoices_date character varying
+ """,
+ )
From 2025aaa4bf257a46e43767ae34388c60ae202ce8 Mon Sep 17 00:00:00 2001
From: Sergio Corato
Date: Fri, 18 Sep 2020 12:31:00 +0200
Subject: [PATCH 089/155] [12.0][FIX] fatturapa withholding tax invoice
received e-invoice 1.6 (#1878)
* [12.0][FIX] fatturapa withholding tax invoice received - e-invoice 1.6
* [FIX] l10n_it_fatturapa_out_wt pep8 fixes
This reverts commit 421ef9e51634383263638e9b52ea4038829f62ec.
* [IMP] migration script
* [FIX] l10n_it_fatturapa_out_wt: Fixed ordering in DatiRitenuta generation, according to XML test file.
Otherwise:
2020-09-17 07:34:14,789 7808 ERROR openerp_test odoo.addons.l10n_it_fatturapa_out_wt.tests.test_fatturapa_wt: ` AssertionError: b'RT022.00' != b'RT040.83'
Co-authored-by: SimoRubi
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
.../migrations/12.0.1.19.0/post-migration.py | 38 ++++++++
l10n_it_fatturapa_in/models/account.py | 8 +-
.../tests/data/IT01234567890_FPR11.xml | 89 +++++++++++++++++++
.../tests/fatturapa_common.py | 24 +++++
.../tests/test_import_fatturapa_xml.py | 11 +++
l10n_it_fatturapa_in/views/account_view.xml | 8 ++
.../wizard/wizard_import_fatturapa.py | 80 +++++++++--------
8 files changed, 219 insertions(+), 41 deletions(-)
create mode 100644 l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 2e34bb0cef54..a5f514617755 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.18.4',
+ 'version': '12.0.1.19.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py
new file mode 100644
index 000000000000..958bc5055891
--- /dev/null
+++ b/l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py
@@ -0,0 +1,38 @@
+# Copyright 2020 Sergio Corato
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from openupgradelib import openupgrade
+
+
+def create_withholding_data_lines(env):
+ # create ftpa_withholding_ids from ftpa_withholding_type and ftpa_withholding_amount
+ openupgrade.logged_query(
+ env.cr, """
+ INSERT INTO withholding_data_line
+ (
+ name,
+ amount,
+ invoice_id,
+ create_uid,
+ create_date,
+ write_date,
+ write_uid
+ )
+ SELECT
+ ai.ftpa_withholding_type,
+ ai.ftpa_withholding_amount,
+ ai.id,
+ ai.create_uid,
+ ai.create_date,
+ ai.write_date,
+ ai.write_uid
+ FROM account_invoice ai
+ WHERE ai.ftpa_withholding_type IS NOT NULL;
+ """
+ )
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ if not version:
+ return
+ create_withholding_data_lines(env)
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index a0f064cfc978..60d2b508a6c8 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -161,16 +161,18 @@ def e_inv_dati_ritenuta(self):
error_message = ''
# ftpa_withholding_type is set when DatiRitenuta is set,
# withholding_tax is not set if no lines with Ritenuta = SI are found
- if self.ftpa_withholding_type and not self.withholding_tax:
+ if self.ftpa_withholding_ids and not self.withholding_tax:
error_message += (_(
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
"found. Please manually check Withholding tax Amount\n"
))
- if self.ftpa_withholding_amount != self.withholding_tax_amount:
+ if sum(self.ftpa_withholding_ids.mapped('amount'))\
+ != self.withholding_tax_amount:
error_message += (_(
"E-bill contains ImportoRitenuta %s but created invoice has got"
" %s\n" % (
- self.ftpa_withholding_amount, self.withholding_tax_amount
+ sum(self.ftpa_withholding_ids.mapped('amount')),
+ self.withholding_tax_amount
)
))
return error_message
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
new file mode 100644
index 000000000000..11387a2f8a7e
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ FPR11
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-01-09
+ 124
+
+ RT02
+ 46.00
+ 23.00
+ Q
+
+
+ RT04
+ 40.00
+ 4.00
+ Q
+
+ 1220.00
+
+
+
+
+ 1
+ Provvigione
+ 1.000
+ 1000.00000
+ 1000.00
+ 22.00
+ SI
+
+
+ 22.00
+ 1000.00
+ 220.00
+ I
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index eae4886c37a7..fbc330272d46 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -52,6 +52,30 @@ def create_wt_23_50(self):
self.env.ref('l10n_it_causali_pagamento.a').id,
})
+ def create_wt_23_20q(self):
+ return self.env['withholding.tax'].create({
+ 'name': '2320q',
+ 'code': '2320q',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 23.0, 'base': 0.2})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.q').id,
+ })
+
+ def create_wt_4q(self):
+ return self.env['withholding.tax'].create({
+ 'name': '4q',
+ 'code': '4q',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 4.0, 'base': 1.0})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.q').id,
+ })
+
def create_res_bank(self):
return self.env['res.bank'].create({
'name': 'Banca generica',
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 5d2ac92e75e2..44e83cd1edab 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -627,6 +627,17 @@ def test_38_xml_import_dates(self):
self.assertEqual(invoices[0].fatturapa_attachment_in_id.invoices_date,
'18/12/2014 20/12/2014')
+ def test_39_xml_import_withholding(self):
+ self.wt = self.create_wt_4q()
+ self.wtq = self.create_wt_23_20q()
+ res = self.run_wizard('test39', 'IT01234567890_FPR11.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertTrue(len(invoice.ftpa_withholding_ids), 2)
+ self.assertAlmostEquals(invoice.amount_total, 1220.0)
+ self.assertAlmostEquals(invoice.withholding_tax_amount, 86.0)
+ self.assertAlmostEquals(invoice.amount_net_pay, 1134.0)
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index 9c8f934e2f4b..e5453e1f1f98 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -282,6 +282,14 @@
+
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 5ff3006ed0e5..c8ae7dcefba0 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -440,7 +440,7 @@ def adjust_accounting_data(self, product, line_vals):
line_vals['invoice_line_tax_ids'] = [
(6, 0, [new_tax.id])]
- def _prepareInvoiceLine(self, credit_account_id, line, wt_found=False):
+ def _prepareInvoiceLine(self, credit_account_id, line, wt_founds=False):
retLine = self._prepare_generic_line_data(line)
retLine.update({
'name': line.Descrizione,
@@ -460,8 +460,8 @@ def _prepareInvoiceLine(self, credit_account_id, line, wt_found=False):
retLine['discount'] = self._computeDiscount(line)
if line.RiferimentoAmministrazione:
retLine['admin_ref'] = line.RiferimentoAmministrazione
- if wt_found and line.Ritenuta:
- retLine['invoice_line_tax_wt_ids'] = [(6, 0, [wt_found.id])]
+ if wt_founds and line.Ritenuta:
+ retLine['invoice_line_tax_wt_ids'] = [(6, 0, [x.id for x in wt_founds])]
return retLine
@@ -922,11 +922,11 @@ def invoiceCreate(
self.set_art73(FatturaBody, invoice_data)
# 2.1.1.5
- wt_found = self.set_withholding_tax(FatturaBody, invoice_data)
+ wt_founds = self.set_withholding_tax(FatturaBody, invoice_data)
# 2.2.1
self.set_invoice_line_ids(
- FatturaBody, credit_account_id, partner, wt_found, invoice_data)
+ FatturaBody, credit_account_id, partner, wt_founds, invoice_data)
self.set_e_invoice_lines(FatturaBody, invoice_data)
@@ -940,7 +940,7 @@ def invoiceCreate(
# 2.1.1.7
self.set_welfares_fund(
- FatturaBody, credit_account_id, invoice, wt_found)
+ FatturaBody, credit_account_id, invoice, wt_founds)
rel_docs_dict = {
# 2.1.2
@@ -1193,39 +1193,45 @@ def set_payments_data(self, FatturaBody, invoice_id, partner_id):
self._createPaymentsLine(PayDataId, PaymentLine, partner_id)
def set_withholding_tax(self, FatturaBody, invoice_data):
- Withholding = FatturaBody.DatiGenerali. \
+ Withholdings = FatturaBody.DatiGenerali. \
DatiGeneraliDocumento.DatiRitenuta
- if not Withholding:
+ if not Withholdings:
return None
- wts = self.env['withholding.tax'].search([
- ('causale_pagamento_id.code', '=', Withholding.CausalePagamento)
- ])
- if not wts:
- raise UserError(_(
- "The bill contains withholding tax with "
- "payment reason %s, "
- "but such a tax is not found in your system. Please "
- "set it."
- ) % Withholding.CausalePagamento)
-
- for wt in wts:
- if wt.tax == float(Withholding.AliquotaRitenuta):
- wt_found = wt
- break
- else:
- raise UserError(_(
- "No withholding tax found with "
- "document payment reason %s and rate %s.")
- % (
- Withholding.CausalePagamento,
- Withholding.AliquotaRitenuta
- ))
- invoice_data['ftpa_withholding_type'] = Withholding.TipoRitenuta
- invoice_data['ftpa_withholding_amount'] = Withholding.ImportoRitenuta
- return wt_found
+ invoice_data['ftpa_withholding_ids'] = []
+ wt_founds = []
+ for Withholding in Withholdings:
+ wts = self.env['withholding.tax'].search([
+ ('causale_pagamento_id.code', '=', Withholding.CausalePagamento)
+ ])
+ if not wts:
+ raise UserError(_(
+ "The bill contains withholding tax with "
+ "payment reason %s, "
+ "but such a tax is not found in your system. Please "
+ "set it."
+ ) % Withholding.CausalePagamento)
+
+ for wt in wts:
+ if wt.tax == float(Withholding.AliquotaRitenuta):
+ wt_founds.append(wt)
+ break
+ else:
+ raise UserError(_(
+ "No withholding tax found with "
+ "document payment reason %s and rate %s.")
+ % (
+ Withholding.CausalePagamento,
+ Withholding.AliquotaRitenuta
+ ))
+ invoice_data['ftpa_withholding_ids'].append((
+ 0, 0, {
+ 'name': Withholding.TipoRitenuta,
+ 'amount': Withholding.ImportoRitenuta,
+ }))
+ return wt_founds
def set_welfares_fund(
- self, FatturaBody, credit_account_id, invoice, wt_found
+ self, FatturaBody, credit_account_id, invoice, wt_founds
):
if not self.e_invoice_detail_level == '2':
return
@@ -1372,7 +1378,7 @@ def set_e_invoice_lines(self, FatturaBody, invoice_data):
invoice_data['e_invoice_line_ids'] = [(6, 0, e_invoice_lines.ids)]
def set_invoice_line_ids(
- self, FatturaBody, credit_account_id, partner, wt_found,
+ self, FatturaBody, credit_account_id, partner, wt_founds,
invoice_data):
if not self.e_invoice_detail_level == '2':
return
@@ -1381,7 +1387,7 @@ def set_invoice_line_ids(
invoice_line_model = self.env['account.invoice.line']
for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
invoice_line_data = self._prepareInvoiceLine(
- credit_account_id, line, wt_found)
+ credit_account_id, line, wt_founds)
product = self.get_line_product(line, partner)
if product:
invoice_line_data['product_id'] = product.id
From c6bea23cabbc00099e245da507d4e0f4610e0657 Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Tue, 29 Sep 2020 10:13:59 +0200
Subject: [PATCH 090/155] [IMP] add test l10n_it_fatturapa_in
---
.../tests/data/IT01234567890_FPR11.xml | 4 +-
.../tests/data/IT01234567890_FPR12.xml | 89 +++++++++++++++++++
.../tests/fatturapa_common.py | 32 ++++++-
.../tests/test_import_fatturapa_xml.py | 27 +++++-
4 files changed, 142 insertions(+), 10 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR12.xml
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
index 11387a2f8a7e..d556414a529d 100644
--- a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR11.xml
@@ -55,8 +55,8 @@
124
RT02
- 46.00
- 23.00
+ 52.00
+ 26.00
Q
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR12.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR12.xml
new file mode 100644
index 000000000000..df2b64534d5f
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR12.xml
@@ -0,0 +1,89 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ FPR12
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-01-09
+ 124
+
+ RT02
+ 54.00
+ 27.00
+ Q
+
+
+ RT04
+ 40.00
+ 4.00
+ Q
+
+ 1220.00
+
+
+
+
+ 1
+ Provvigione
+ 1.000
+ 1000.00000
+ 1000.00
+ 22.00
+ SI
+
+
+ 22.00
+ 1000.00
+ 220.00
+ I
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index fbc330272d46..cca1089997fc 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -52,14 +52,38 @@ def create_wt_23_50(self):
self.env.ref('l10n_it_causali_pagamento.a').id,
})
- def create_wt_23_20q(self):
+ def create_wt_26_20q(self):
return self.env['withholding.tax'].create({
- 'name': '2320q',
- 'code': '2320q',
+ 'name': '2620q',
+ 'code': '2620q',
'account_receivable_id': self.payable_account_id,
'account_payable_id': self.payable_account_id,
'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 23.0, 'base': 0.2})],
+ 'rate_ids': [(0, 0, {'tax': 26.0, 'base': 0.2})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.q').id,
+ })
+
+ def create_wt_26_40q(self):
+ return self.env['withholding.tax'].create({
+ 'name': '2640q',
+ 'code': '2640q',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 26.0, 'base': 0.4})],
+ 'causale_pagamento_id':
+ self.env.ref('l10n_it_causali_pagamento.q').id,
+ })
+
+ def create_wt_27_20q(self):
+ return self.env['withholding.tax'].create({
+ 'name': '2720q',
+ 'code': '2720q',
+ 'account_receivable_id': self.payable_account_id,
+ 'account_payable_id': self.payable_account_id,
+ 'payment_term': self.env.ref('account.account_payment_term').id,
+ 'rate_ids': [(0, 0, {'tax': 27.0, 'base': 0.2})],
'causale_pagamento_id':
self.env.ref('l10n_it_causali_pagamento.q').id,
})
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 44e83cd1edab..48b2f57c05e1 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -629,14 +629,33 @@ def test_38_xml_import_dates(self):
def test_39_xml_import_withholding(self):
self.wt = self.create_wt_4q()
- self.wtq = self.create_wt_23_20q()
- res = self.run_wizard('test39', 'IT01234567890_FPR11.xml')
+ with self.assertRaises(UserError):
+ self.run_wizard('test39', 'IT01234567890_FPR11.xml')
+
+ def test_40_xml_import_withholding(self):
+ self.wt = self.create_wt_4q()
+ self.wt4q = self.create_wt_26_40q()
+ self.wt2q = self.create_wt_26_20q()
+ res = self.run_wizard('test40', 'IT01234567890_FPR11.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertTrue(invoice.e_invoice_validation_error)
+ self.assertEqual(
+ invoice.e_invoice_validation_message,
+ "E-bill contains ImportoRitenuta 92.0 but created invoice has got "
+ "144.0\n."
+ )
+
+ def test_41_xml_import_withholding(self):
+ self.wt = self.create_wt_4q()
+ self.wtq = self.create_wt_27_20q()
+ res = self.run_wizard('test41', 'IT01234567890_FPR12.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(len(invoice.ftpa_withholding_ids), 2)
self.assertAlmostEquals(invoice.amount_total, 1220.0)
- self.assertAlmostEquals(invoice.withholding_tax_amount, 86.0)
- self.assertAlmostEquals(invoice.amount_net_pay, 1134.0)
+ self.assertAlmostEquals(invoice.withholding_tax_amount, 94.0)
+ self.assertAlmostEquals(invoice.amount_net_pay, 1126.0)
def test_01_xml_link(self):
"""
From 46165574b966f8b71e07ed090840cb01979994be Mon Sep 17 00:00:00 2001
From: eLBati
Date: Thu, 1 Oct 2020 12:12:17 +0200
Subject: [PATCH 091/155] Remove not used tests
FIX SDI tests:
00200 The value '10.00000000' of element 'Percentuale' is not valid. riga: 93 - colonna: 59 - File non conforme al formato
00305 CF associato alla P.iva non rilevato in IPA: 00146089990 - 1.4.1.1.2 non valido
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 34 ++--
.../i18n/l10n_it_fatturapa_in.pot | 34 ++--
.../tests/data/IT03638121008_X11111.xml | 155 ------------------
.../tests/test_import_fatturapa_xml.py | 13 --
5 files changed, 45 insertions(+), 193 deletions(-)
delete mode 100644 l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index a5f514617755..997c3e089b3c 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.1.19.0',
+ 'version': '12.0.2.0.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index e3201ec5f0b0..e66c313589bf 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1417
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -207,7 +207,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1432
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -412,7 +412,7 @@ msgid ""
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:172
+#: code:addons/l10n_it_fatturapa_in/models/account.py:174
#, python-format
msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
msgstr ""
@@ -486,7 +486,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1455
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -626,7 +626,7 @@ msgid "Invoice Line"
msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:220
+#: code:addons/l10n_it_fatturapa_in/models/account.py:222
#, python-format
msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
@@ -815,7 +815,7 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1219
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
@@ -1156,7 +1156,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1279
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
@@ -1166,7 +1166,7 @@ msgstr ""
"ma una tale imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1261
#, python-format
msgid ""
"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
@@ -1176,7 +1176,7 @@ msgstr ""
"imposta non è presente nel sistema. Prego impostarla."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1207
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1329,7 +1329,7 @@ msgid "Vendor invoice registration default date"
msgstr "Data predefinita per la registrazione delle fatture fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:209
+#: code:addons/l10n_it_fatturapa_in/models/account.py:211
#, python-format
msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
@@ -1381,7 +1381,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1306
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1397,11 +1397,21 @@ msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Withholding"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Withholding Details"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__wizard_id
msgid "Wizard"
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 4b23b309b77b..647b0a336ee1 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1411
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1417
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -181,7 +181,7 @@ msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1426
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1432
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -378,7 +378,7 @@ msgid "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:172
+#: code:addons/l10n_it_fatturapa_in/models/account.py:174
#, python-format
msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
""
@@ -453,7 +453,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1449
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1455
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -588,7 +588,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:220
+#: code:addons/l10n_it_fatturapa_in/models/account.py:222
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -763,7 +763,7 @@ msgid "No tax with percentage %s and nature %s found. Please configure this tax.
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1216
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1219
#, python-format
msgid "No withholding tax found with document payment reason %s and rate %s."
msgstr ""
@@ -1083,19 +1083,19 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1273
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1279
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1255
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1261
#, python-format
msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1204
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1207
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1220,7 +1220,7 @@ msgid "Vendor invoice registration default date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:209
+#: code:addons/l10n_it_fatturapa_in/models/account.py:211
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
@@ -1268,7 +1268,7 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1300
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1306
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
@@ -1280,11 +1280,21 @@ msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1292
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Withholding"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
+msgid "Withholding Details"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__wizard_id
msgid "Wizard"
diff --git a/l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml b/l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml
deleted file mode 100644
index a1d489da035e..000000000000
--- a/l10n_it_fatturapa_in/tests/data/IT03638121008_X11111.xml
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
- IT
- 03638121008
-
- 00001
- SDI11
- 79SRAK
-
- 060601
- prova@mail.it
-
-
-
-
-
- IT
- 03638121008
-
-
- Societa' alpha S.r.l.
-
- RF01
-
-
- Via Roma
- 00166
- Roma
- RM
- IT
-
-
- Piazza Garibaldi
- 00100
- Roma
- RM
- IT
-
-
-
-
- 09876543210
-
- Societa beta' S.r.l.
-
-
-
- Via Milano
- 00100
- Roma
- RM
- IT
-
-
- CC
-
-
-
-
- TD01
- EUR
- 2012-11-27
- 00001
- SI
-
-
- 1
- 123
- 123abc
- 456def
-
-
- 1
- 123
- 2012-09-01
- 5
- 123abc
- 456def
-
-
- 1
- 123
- 2012-09-01
- 5
- 123abc
- 456def
-
-
- 1
- 123
- 2012-09-01
- 5
- 123abc
- 456def
-
-
-
-
- IT
- 09399880153
-
-
- Trasporto spa
-
-
- 2012-10-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r4hHkoEIiwIDAQAB
-o4IBhDCCAYAwDgYDVR0PAQH/BAQDAgZAMIGZBgNVHSMEgZEwgY6AFOpEPx8Z4zc+q6qUgqWf6/wW
-un+1oXGkbzBtMQswCQYDVQQGEwJJVDEeMBwGA1UEChMVQWdlbnppYSBkZWxsZSBFbnRyYXRlMRsw
-GQYDVQQLExJTZXJ2aXppIFRlbGVtYXRpY2kxITAfBgNVBAMTGENBIEFnZW56aWEgZGVsbGUgRW50
-cmF0ZYIDEGJwMIGyBgNVHR8EgaowgacwgaSggaGggZ6GgZtsZGFwOi8vY2Fkcy5lbnRyYXRlLmZp
-bmFuemUuaXQvY24lM2RDQSUyMEFnZW56aWElMjBkZWxsZSUyMEVudHJhdGUsb3UlM2RTZXJ2aXpp
-JTIwVGVsZW1hdGljaSxvJTNkQWdlbnppYSUyMGRlbGxlJTIwRW50cmF0ZSxjJTNkaXQ/Y2VydGlm
-aWNhdGVSZXZvY2F0aW9uTGlzdDAdBgNVHQ4EFgQUn+JY07NI6xlrCUXERiHoFFN66dkwDQYJKoZI
-hvcNAQEFBQADggEBALZ0po2uLhLyZ8uiVfQUCAQd8s5o8ZJw2mcgZc/iaoNmDfcslZnTLWeuT6Gr
-UFgG0uc1rY0UwWx/R1UOyc0ZesRo7Z6+kFmVubT1tbjLMuLjjUIyt4zWeNjf4PwNS0+s6Y6eC8tx
-fOJmQNGQIbujWhAejoIteG01ciGeeII6AMnGK8KvbCA0UZmWl3Bou49zWajiEjtHFGkq/WNfDwRa
-Fd4UWjR+UWS3rLahV7iOfh/+Yy7h1F0RzQuPJk7TCm7iHyc9QtgwxHHCmknRyNXMv6DeTOfK8ciq
-uFWd6DasmblXLUm+uqhsWVRIkj2Bz63bpjuJU+8ptRfxHrVnzyCr9M4= 2014-06-05T14:21:40Z
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 48b2f57c05e1..46386cf49d5c 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -116,19 +116,6 @@ def test_02_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.intermediary.vat, 'IT03339130126')
- # def test_02_xml_import(self):
- # res = self.run_wizard('test2', 'IT03638121008_X11111.xml')
- # invoice_id = res.get('domain')[0][2][0]
- # invoice = self.invoice_model.browse(invoice_id)
- # self.assertEqual(invoice.supplier_invoice_number, '00001')
- # self.assertEqual(invoice.amount_untaxed, 3)
- # self.assertEqual(invoice.amount_tax, 0.66)
- # self.assertEqual(
- # invoice.fatturapa_summary_ids[0].amount_untaxed, 3)
- # self.assertEqual(
- # invoice.fatturapa_summary_ids[0].amount_tax, 0.66)
- # self.assertEqual(invoice.partner_id.name, "Societa' alpha S.r.l.")
-
def test_04_xml_import(self):
res = self.run_wizard('test4', 'IT02780790107_11005.xml')
invoice_id = res.get('domain')[0][2][0]
From f1c5c6520432344f767f83e23812e6c4a10431dc Mon Sep 17 00:00:00 2001
From: Lorenzo Battistini
Date: Mon, 5 Oct 2020 07:44:38 +0000
Subject: [PATCH 092/155] Translated using Weblate (Italian)
Currently translated at 99.1% (233 of 235 strings)
Translation: l10n-italy-12.0/l10n-italy-12.0-l10n_it_fatturapa_in
Translate-URL: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in/it/
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 997c3e089b3c..4b836b30bf09 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.2.0.0',
+ 'version': '12.0.2.0.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index e66c313589bf..e88a66761da5 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-27 08:07+0000\n"
-"PO-Revision-Date: 2020-02-03 12:13+0000\n"
+"PO-Revision-Date: 2020-10-05 08:16+0000\n"
"Last-Translator: Lorenzo Battistini \n"
"Language-Team: \n"
"Language: it\n"
@@ -637,9 +637,8 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__invoices_date
-#, fuzzy
msgid "Invoices date"
-msgstr "Data fattura"
+msgstr "Data fatture"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__message_is_follower
@@ -1405,12 +1404,12 @@ msgstr "Cassa previdenziale: %s"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Withholding"
-msgstr ""
+msgstr "Ritenuta"
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_invoice_form_fatturapa_in
msgid "Withholding Details"
-msgstr ""
+msgstr "Dettagli ritenuta"
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_wizard_link_to_invoice_line__wizard_id
From 8fa330c0f86ab57b0c2922f286d58ac213f16948 Mon Sep 17 00:00:00 2001
From: sergiocorato
Date: Sat, 10 Oct 2020 22:03:58 +0200
Subject: [PATCH 093/155] [12.0][FIX] migration e-invoice 1.6
---
.../migrations/12.0.1.19.0/post-migration.py | 38 ---------
.../migrations/12.0.2.0.0/post-migration.py | 82 +++++++++++++++++++
.../migrations/12.0.2.0.0/pre-migration.py | 18 ++++
3 files changed, 100 insertions(+), 38 deletions(-)
delete mode 100644 l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py
create mode 100644 l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
create mode 100644 l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
diff --git a/l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py
deleted file mode 100644
index 958bc5055891..000000000000
--- a/l10n_it_fatturapa_in/migrations/12.0.1.19.0/post-migration.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2020 Sergio Corato
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-from openupgradelib import openupgrade
-
-
-def create_withholding_data_lines(env):
- # create ftpa_withholding_ids from ftpa_withholding_type and ftpa_withholding_amount
- openupgrade.logged_query(
- env.cr, """
- INSERT INTO withholding_data_line
- (
- name,
- amount,
- invoice_id,
- create_uid,
- create_date,
- write_date,
- write_uid
- )
- SELECT
- ai.ftpa_withholding_type,
- ai.ftpa_withholding_amount,
- ai.id,
- ai.create_uid,
- ai.create_date,
- ai.write_date,
- ai.write_uid
- FROM account_invoice ai
- WHERE ai.ftpa_withholding_type IS NOT NULL;
- """
- )
-
-
-@openupgrade.migrate()
-def migrate(env, version):
- if not version:
- return
- create_withholding_data_lines(env)
diff --git a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
new file mode 100644
index 000000000000..eef1cd161fdd
--- /dev/null
+++ b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
@@ -0,0 +1,82 @@
+# Copyright 2020 Sergio Corato
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from openupgradelib import openupgrade
+from psycopg2 import sql
+
+
+def create_withholding_data_lines(env):
+ # create ftpa_withholding_ids from ftpa_withholding_type and ftpa_withholding_amount
+ column_name = openupgrade.get_legacy_name('ftpa_withholding_amount')
+ if openupgrade.column_exists(env.cr, 'account_invoice', column_name):
+ openupgrade.logged_query(
+ env.cr, sql.SQL(
+ """
+ INSERT INTO withholding_data_line
+ (
+ name,
+ amount,
+ invoice_id,
+ create_uid,
+ create_date,
+ write_date,
+ write_uid
+ )
+ SELECT
+ ai.{ftpa_withholding_type},
+ ai.{ftpa_withholding_amount},
+ ai.id,
+ ai.create_uid,
+ ai.create_date,
+ ai.write_date,
+ ai.write_uid
+ FROM account_invoice ai
+ WHERE ai.{ftpa_withholding_type} IS NOT NULL;
+ """
+ ).format(
+ ftpa_withholding_type=sql.Identifier(
+ openupgrade.get_legacy_name(
+ 'ftpa_withholding_type')
+ ),
+ ftpa_withholding_amount=sql.Identifier(
+ openupgrade.get_legacy_name(
+ 'ftpa_withholding_amount')
+ ),
+ )
+ )
+ else:
+ openupgrade.logged_query(
+ env.cr, sql.SQL(
+ """
+ INSERT INTO withholding_data_line
+ (
+ name,
+ invoice_id,
+ create_uid,
+ create_date,
+ write_date,
+ write_uid
+ )
+ SELECT
+ ai.{ftpa_withholding_type},
+ ai.id,
+ ai.create_uid,
+ ai.create_date,
+ ai.write_date,
+ ai.write_uid
+ FROM account_invoice ai
+ WHERE ai.{ftpa_withholding_type} IS NOT NULL;
+ """
+ ).format(
+ ftpa_withholding_type=sql.Identifier(
+ openupgrade.get_legacy_name(
+ 'ftpa_withholding_type')
+ ),
+ )
+ )
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ if not version:
+ return
+ create_withholding_data_lines(env)
diff --git a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
new file mode 100644
index 000000000000..365897dc432c
--- /dev/null
+++ b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
@@ -0,0 +1,18 @@
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from openupgradelib import openupgrade
+
+
+@openupgrade.migrate()
+def migrate(env, version):
+ cr = env.cr
+ if openupgrade.column_exists(env.cr, 'account_invoice', 'ftpa_withholding_amount'):
+ openupgrade.copy_columns(cr, {
+ 'account_invoice': [
+ ('ftpa_withholding_amount', None, None),
+ ],
+ })
+ openupgrade.copy_columns(cr, {
+ 'account_invoice': [
+ ('ftpa_withholding_type', None, None),
+ ],
+ })
From e057e5b0679e923a7ca19c4d563bfe04b98e0b5a Mon Sep 17 00:00:00 2001
From: Lara Baggio
Date: Tue, 10 Nov 2020 14:31:13 +0100
Subject: [PATCH 094/155] aggiunto livello importazione basato sul riepilogo, +
test
---
l10n_it_fatturapa_in/models/partner.py | 6 +-
.../tests/data/IT05979361218_ripilogoiva.xml | 226 ++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 18 ++
.../wizard/wizard_import_fatturapa.py | 62 +++--
4 files changed, 294 insertions(+), 18 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_ripilogoiva.xml
diff --git a/l10n_it_fatturapa_in/models/partner.py b/l10n_it_fatturapa_in/models/partner.py
index 1fc804705562..96bbd6c5487b 100644
--- a/l10n_it_fatturapa_in/models/partner.py
+++ b/l10n_it_fatturapa_in/models/partner.py
@@ -14,14 +14,14 @@ class Partner(models.Model):
)
e_invoice_detail_level = fields.Selection([
('0', 'Minimum'),
- # ('1', 'Aliquote'),
+ ('1', 'Tax Rate'),
('2', 'Maximum'),
], string="E-bills Detail Level",
help="Minimum level: Bill is created with no lines; "
"User will have to create them, according to what specified in "
"the electronic bill.\n"
- # "Livello Aliquote: viene creata una riga fattura per ogni "
- # "aliquota presente nella fattura elettronica\n"
+ "Tax rate level: Rate level: an invoice line is created for each "
+ "rate present in the electronic invoice\n"
"Maximum level: every line contained in the electronic bill "
"will create a line in the bill.",
default='2', required=True
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_ripilogoiva.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_ripilogoiva.xml
new file mode 100644
index 000000000000..3374b3294e2d
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_ripilogoiva.xml
@@ -0,0 +1,226 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 00001
+ FPR12
+ 0000000
+
+
+
+
+
+ IT
+ 02780790107
+
+
+ SOCIETA' ALPHA SRL
+
+ RF01
+
+
+ VIALE ROMA 543
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 03533590174
+
+ BETA GAMMA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-10-06
+ GR20-900443E
+ 204.16
+
+
+ 1
+ GR20-900443E
+ 2020-10-06
+
+
+ GR20-900443E
+ 2020-10-06
+
+
+ GR20-900443E
+ 2020-10-06
+
+
+
+
+ 1
+
+ POD
+ IT001E14607435
+
+ Imposte
+ 905.00
+ kWh
+ 2020-09-01
+ 2020-09-30
+ 0.01249724
+ 11.31000000
+ 22.00
+
+ Ind.POD
+ VIA TRIESTE, 47 - 21020 BUGUGGIATE (VA)
+
+
+
+ 2
+
+ POD
+ IT001E14607435
+
+ Spesa per trasporto, gestione contatore e oneri sistema
+ 4.900000
+ kW
+ 2020-09-01
+ 2020-09-30
+ 4.99795918
+ 24.49000000
+ 22.00
+
+ Ind.POD
+ VIA TRIESTE, 47 - 21020 BUGUGGIATE (VA)
+
+
+
+ 3
+
+ POD
+ IT001E14607435
+
+ Spesa per trasporto, gestione contatore e oneri sistema
+ 905.00
+ kWh
+ 2020-09-01
+ 2020-09-30
+ 0.05601105
+ 50.69000000
+ 22.00
+
+ Ind.POD
+ VIA TRIESTE, 47 - 21020 BUGUGGIATE (VA)
+
+
+
+ 4
+
+ POD
+ IT001E14607435
+
+ Spesa per trasporto, gestione contatore e oneri sistema
+ 1.00
+ Mese
+ 2020-09-01
+ 2020-09-30
+ 4.23000000
+ 4.23000000
+ 22.00
+
+ Ind.POD
+ VIA TRIESTE, 47 - 21020 BUGUGGIATE (VA)
+
+
+
+ 5
+
+ POD
+ IT001E14607435
+
+ Spesa per la materia energia
+ 1.00
+ Mese
+ 2020-09-01
+ 2020-09-30
+ 0.01000000
+ 0.01000000
+ 22.00
+
+ Ind.POD
+ VIA TRIESTE, 47 - 21020 BUGUGGIATE (VA)
+
+
+
+ 6
+
+ POD
+ IT001E14607435
+
+ Spesa per la materia energia
+ 905.00
+ kWh
+ 2020-09-01
+ 2020-09-30
+ 0.08146961
+ 73.73000000
+ 22.00
+
+ Ind.POD
+ VIA TRIESTE, 47 - 21020 BUGUGGIATE (VA)
+
+
+
+ 7
+ Altre partite
+ 1.00
+ Nr
+ 2020-09-01
+ 2020-09-30
+ 3.52000000
+ 3.52000000
+ 0.00
+ N1
+
+
+ 22.00
+ 164.46
+ 36.18
+ I
+
+
+ 0.00
+ N1
+ 3.52
+ 0.00
+ Escluso Art.15
+
+
+
+ TP02
+
+ MP05
+ 2020-10-06
+ 30
+ 2020-11-05
+ 204.16
+ Deutsche Bank
+ IT64C0310401600000000770885
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 46386cf49d5c..677e9b3eb907 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -711,6 +711,24 @@ def test_01_xml_zero_quantity_line(self):
self.assertEqual(invoice.invoice_line_ids[0].quantity, 0)
self.assertEqual(invoice.invoice_line_ids[1].quantity, 1)
+ def test_xml_import_summary_tax_rate(self):
+ # Invoice with positive total. Detail Level: '1' -- Tax Rate
+ supplier = self.env['res.partner'].search(
+ [('vat', '=', 'IT02780790107')])[0]
+ # in order to make the system create the invoice lines
+ supplier.e_invoice_detail_level = '1'
+ res = self.run_wizard('test_summary_tax_rate',
+ 'IT05979361218_ripilogoiva.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.amount_total, 204.16)
+ self.assertEqual(len(invoice.invoice_line_ids), 2)
+
+ self.assertEqual(invoice.invoice_line_ids[0].price_unit, 164.46)
+ self.assertEqual(invoice.invoice_line_ids[0].quantity, 1.0)
+ self.assertEqual(invoice.invoice_line_ids[1].price_unit, 3.52)
+ self.assertEqual(invoice.invoice_line_ids[1].quantity, 1.0)
+
class TestFatturaPAEnasarco(FatturapaCommon):
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index c8ae7dcefba0..063ba2041cb6 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1,4 +1,3 @@
-
import logging
from odoo import models, api, fields
from odoo.tools import float_is_zero
@@ -17,14 +16,14 @@ class WizardImportFatturapa(models.TransientModel):
e_invoice_detail_level = fields.Selection([
('0', 'Minimum'),
- # ('1', 'Aliquote'),
+ ('1', 'Tax rate'),
('2', 'Maximum'),
], string="E-bills Detail Level",
help="Minimum level: Bill is created with no lines; "
"User will have to create them, according to what specified in "
"the electronic bill.\n"
- # "Livello Aliquote: viene creata una riga fattura per ogni "
- # "aliquota presente nella fattura elettronica\n"
+ "Tax rate level: Rate level: an invoice line is created for each "
+ "rate present in the electronic invoice\n"
"Maximum level: every line contained in the electronic bill "
"will create a line in the bill.",
required=True
@@ -440,6 +439,21 @@ def adjust_accounting_data(self, product, line_vals):
line_vals['invoice_line_tax_ids'] = [
(6, 0, [new_tax.id])]
+ def _prepareInvoiceLineAliquota(self, credit_account_id, line, nline):
+ retLine = {}
+ account_taxes = self.get_account_taxes(line.AliquotaIVA, line.Natura)
+ if account_taxes:
+ retLine['invoice_line_tax_ids'] = [(6, 0, [account_taxes[0].id])]
+
+ retLine.update({
+ 'name': 'Riepilogo Aliquota {}'.format(line.AliquotaIVA),
+ 'sequence': nline,
+ 'account_id': credit_account_id,
+ 'price_unit': float(line.ImponibileImporto),
+ 'quantity': 1.0
+ })
+ return retLine
+
def _prepareInvoiceLine(self, credit_account_id, line, wt_founds=False):
retLine = self._prepare_generic_line_data(line)
retLine.update({
@@ -1377,24 +1391,42 @@ def set_e_invoice_lines(self, FatturaBody, invoice_data):
if e_invoice_lines:
invoice_data['e_invoice_line_ids'] = [(6, 0, e_invoice_lines.ids)]
+ def _set_invoice_lines(self, product, invoice_line_data, invoice_lines,
+ invoice_line_model):
+
+ if product:
+ invoice_line_data['product_id'] = product.id
+ self.adjust_accounting_data(product, invoice_line_data)
+ invoice_line_id = invoice_line_model.create(
+ invoice_line_data).id
+ invoice_lines.append(invoice_line_id)
+
def set_invoice_line_ids(
self, FatturaBody, credit_account_id, partner, wt_founds,
invoice_data):
- if not self.e_invoice_detail_level == '2':
+
+ if self.e_invoice_detail_level == '0':
return
invoice_lines = []
invoice_line_model = self.env['account.invoice.line']
- for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
- invoice_line_data = self._prepareInvoiceLine(
- credit_account_id, line, wt_founds)
- product = self.get_line_product(line, partner)
- if product:
- invoice_line_data['product_id'] = product.id
- self.adjust_accounting_data(product, invoice_line_data)
- invoice_line_id = invoice_line_model.create(
- invoice_line_data).id
- invoice_lines.append(invoice_line_id)
+ if self.e_invoice_detail_level == '1':
+ for nline, line in enumerate(FatturaBody.DatiBeniServizi.DatiRiepilogo):
+ invoice_line_data = self._prepareInvoiceLineAliquota(
+ credit_account_id, line, nline)
+
+ product = partner.e_invoice_default_product_id
+ self._set_invoice_lines(product, invoice_line_data, invoice_lines,
+ invoice_line_model)
+
+ elif self.e_invoice_detail_level == '2':
+ for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
+ invoice_line_data = self._prepareInvoiceLine(
+ credit_account_id, line, wt_founds)
+ product = self.get_line_product(line, partner)
+ self._set_invoice_lines(product, invoice_line_data, invoice_lines,
+ invoice_line_model)
+
invoice_data['invoice_line_ids'] = [(6, 0, invoice_lines)]
def check_invoice_amount(self, invoice, FatturaElettronicaBody):
From 8146c2892acc3bedf78ed5cbc6ffd18dffd4a378 Mon Sep 17 00:00:00 2001
From: eLBati
Date: Fri, 6 Nov 2020 14:01:39 +0100
Subject: [PATCH 095/155] REF l10n_it_fatturapa_in correctly handling new
Ritenuta codes
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 174 ++++++++++--------
.../i18n/l10n_it_fatturapa_in.pot | 116 ++++++------
l10n_it_fatturapa_in/models/company.py | 4 -
.../tests/data/IT01234567890_FPR13.xml | 113 ++++++++++++
.../tests/data/ITBNCMRA80A01D548T_20001.xml | 132 +++++++++++++
.../tests/data/ITNREGCM80H30D612D_20003.xml | 132 +++++++++++++
.../tests/data/ITNREGCM80H30D612D_20004.xml | 131 +++++++++++++
.../tests/fatturapa_common.py | 1 +
.../tests/test_import_fatturapa_xml.py | 101 ++++++++--
l10n_it_fatturapa_in/views/company_view.xml | 12 --
.../wizard/wizard_import_fatturapa.py | 76 +++-----
12 files changed, 767 insertions(+), 227 deletions(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT01234567890_FPR13.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20001.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20003.xml
create mode 100644 l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20004.xml
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 4b836b30bf09..f8a76f139f02 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.2.0.1',
+ 'version': '12.0.2.1.0',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index e88a66761da5..249c45c5c6ba 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -113,7 +113,7 @@ msgid "Attachments"
msgstr "Allegati"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:727
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:750
#, python-format
msgid ""
"BIC is required and not exist in Xml\n"
@@ -149,7 +149,7 @@ msgstr ""
"Totale imposte: {bill_tax}"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1417
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1419
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr "Il totale fattura %s è diverso dall'importo totale del documento %s"
@@ -201,13 +201,13 @@ msgid "Company"
msgstr "Azienda"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:83
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:91
#, python-format
msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome azienda contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1432
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1434
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr "L'imponibile calcolato %s è diverso da quello dei dati di riepilogo %s"
@@ -223,7 +223,7 @@ msgid "Contact"
msgstr "Contatto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:176
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:184
#, python-format
msgid "Country Code %s not found in system."
msgstr "Codice nazione %s non trovato nel sistema."
@@ -256,7 +256,7 @@ msgid "Creation"
msgstr "Creazione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:286
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:294
#, python-format
msgid ""
"Current invoice is from {} with REA Code {}. Yet it seems that partners {} "
@@ -287,7 +287,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr "Prodotti predefiniti usati nelle fatture elettroniche fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:805
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr "Definire un registro di acquisto per questa azienda: \"%s\" (ID: %d)."
@@ -331,14 +331,7 @@ msgid "Display Name"
msgstr "Nome visualizzato"
#. module: l10n_it_fatturapa_in
-#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
-msgid "Do not block e-bill import in case of missing Enasarco configuration"
-msgstr ""
-"Non blocca l'importazione delle e-fatture in caso di configurazione Enasarco "
-"mancante"
-
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:904
#, python-format
msgid "Document type %s not handled."
msgstr "Tipo documento %s non gestito."
@@ -470,7 +463,7 @@ msgid "Electronic Bill Import"
msgstr "Importazione fattura elettronica"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:45
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:53
#, python-format
msgid "File %s is linked to bills yet."
msgstr "Il file %s è già collegato a delle fatture."
@@ -486,7 +479,7 @@ msgid "File Size"
msgstr "Dimensione file"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1455
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1457
#, python-format
msgid "File is linked to bills yet."
msgstr "Il file è già collegato a delle fatture."
@@ -522,7 +515,7 @@ msgid "General Data"
msgstr "Dati generali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:615
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:638
#, python-format
msgid "Global bill discount from document general data"
msgstr "Sconto globale fattura dai dati generali del documento"
@@ -769,13 +762,11 @@ msgstr "Minimo"
msgid ""
"Minimum level: Bill is created with no lines; User will have to create them, "
"according to what specified in the electronic bill.\n"
+"Tax rate level: Rate level: an invoice line is created for each rate present "
+"in the electronic invoice\n"
"Maximum level: every line contained in the electronic bill will create a "
"line in the bill."
msgstr ""
-"Livello minimo: la fattura viene creata senza righe, che dovranno essere "
-"aggiunte dall'utente in base a quanto indicato nella fattura elettronica.\n"
-"Livello massimo: le righe della fattura verranno generate a partire da tutte "
-"quelle presenti nella fattura elettronica."
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_fatturapa_attachment_in__name
@@ -783,13 +774,13 @@ msgid "Name"
msgstr "Nome"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:91
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:99
#, python-format
msgid "Name field contains '%s'. Your System contains '%s'"
msgstr "Il campo nome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:703
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:726
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr "Impossibile creare la banca con BIC \"%s\", il nome non è impostato."
@@ -800,13 +791,13 @@ msgid "Nature"
msgstr "Natura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:882
#, python-format
msgid "No currency found with code %s."
msgstr "Valuta con codice %s non trovata."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:343
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:351
#, python-format
msgid ""
"No tax with percentage %s and nature %s found. Please configure this tax."
@@ -814,10 +805,12 @@ msgstr ""
"Imposta con aliquota %s e natura %s non trovata, configurare questa imposta."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1219
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1246
#, python-format
-msgid "No withholding tax found with document payment reason %s and rate %s."
-msgstr "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
+msgid ""
+"No withholding tax found with document payment reason %s, rate %s and type "
+"%s."
+msgstr ""
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_einvoice_line_other_data__num_ref
@@ -861,19 +854,19 @@ msgid "Other Administrative Data"
msgstr "Altri dati gestionali"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:645
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:668
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr "Modalità di pagamento %s non definita nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1207
#, python-format
msgid "Payment method code %s is incorrect."
msgstr "Codice modalità di pagamento %s non corretto."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1202
#, python-format
msgid "Payment method code not found in document."
msgstr "Codice modalità di pagamento non trovato nel documento."
@@ -925,7 +918,7 @@ msgid "Progress data"
msgstr "Dati stato avanzamento lavori"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:229
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:237
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr "Provincia ( %s ) non presente nel sistema"
@@ -936,7 +929,7 @@ msgid "Quantity"
msgstr "Quantità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:261
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:269
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr "Codice provincia dell'ufficio REA ( %s ) non presente nel sistema"
@@ -947,7 +940,7 @@ msgid "Received Date"
msgstr "Data ricezione"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:218
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:226
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr "Provincia Albo ( %s ) non presente nel sistema"
@@ -969,12 +962,6 @@ msgstr "Documenti collegati"
msgid "Related E-bill Line"
msgstr "Riga e-fattura collegata"
-#. module: l10n_it_fatturapa_in
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__enasarco_relax_checks
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__enasarco_relax_checks
-msgid "Relax checks for Enasarco"
-msgstr "Rilassare controlli per Enasarco"
-
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
msgid "Remove"
@@ -1019,7 +1006,7 @@ msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:74
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
@@ -1028,7 +1015,7 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:81
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1116
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
@@ -1036,7 +1023,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
#, python-format
msgid "Round up and down tax is not set"
msgstr "L'imposta per l'arrotondamento attivo e passivo non è impostata"
@@ -1049,14 +1036,14 @@ msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:76
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:83
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding up"
msgstr "Arrotondamento attivo"
@@ -1101,13 +1088,18 @@ msgid "Supplier data"
msgstr "Dati fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:100
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:108
#, python-format
msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr "Il campo cognome contiene \"%s\", il sistema contiene \"%s\""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:247
+#: selection:res.partner,e_invoice_detail_level:0
+msgid "Tax Rate"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:255
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr "Regime fiscale %s non presente nel sistema."
@@ -1118,11 +1110,16 @@ msgid "Tax Withholding"
msgstr "Ritenuta d'acconto"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:536
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:559
#, python-format
msgid "Tax kind %s not found"
msgstr "Tipo imposta %s non trovato"
+#. module: l10n_it_fatturapa_in
+#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+msgid "Tax rate"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
@@ -1155,27 +1152,7 @@ msgid "Text Reference"
msgstr "Riferimento testo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1279
-#, python-format
-msgid ""
-"The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is "
-"not found in your system. Please set it."
-msgstr ""
-"La fattura contiene un'imposta cassa previdenziale con tipo %s e imposta %s "
-"ma una tale imposta non è presente nel sistema. Prego impostarla."
-
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1261
-#, python-format
-msgid ""
-"The bill contains Welfare Fund tax with Type %s, but such a tax is not found "
-"in your system. Please set it."
-msgstr ""
-"La fattura contiene un'imposta cassa previdenziale con tipo %s, ma una tale "
-"imposta non è presente nel sistema. Prego impostarla."
-
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1207
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1231
#, python-format
msgid ""
"The bill contains withholding tax with payment reason %s, but such a tax is "
@@ -1221,7 +1198,7 @@ msgid "To Register"
msgstr "Da registrare"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:348
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:356
#, python-format
msgid ""
"Too many taxes with percentage %s and nature %s found. Tax %s with lower "
@@ -1231,7 +1208,7 @@ msgstr ""
"maggiore priorità è stata impostata sulle righe fattura."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:373
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:381
#, python-format
msgid ""
"Too many taxes with percentage equals to '%s'.\n"
@@ -1256,7 +1233,7 @@ msgstr ""
"della fattura elettronica ({e_bill_amount_total})"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:158
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:166
#, python-format
msgid ""
"Two distinct partners with VAT number %s or Fiscal Code %s already present "
@@ -1363,7 +1340,7 @@ msgid "Welfare Fund"
msgstr "Cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:563
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:586
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr "Cassa previdenziale %s non presente nel sistema."
@@ -1380,7 +1357,7 @@ msgid "Welfare Fund Details"
msgstr "Dettagli cassa previdenziale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1306
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1290
#, python-format
msgid ""
"Welfare Fund data %s has withholding tax but no withholding tax was found in "
@@ -1390,13 +1367,13 @@ msgstr ""
"presenti nel sistema."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:568
#, python-format
msgid "Welfare Fund is not defined."
msgstr "Cassa previdenziale non definita."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1282
#, python-format
msgid "Welfare Fund: %s"
msgstr "Cassa previdenziale: %s"
@@ -1417,7 +1394,7 @@ msgid "Wizard"
msgstr "Procedura guidata"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:433
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:441
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
@@ -1425,7 +1402,7 @@ msgstr ""
"quella dell'XML."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:364
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:372
#, python-format
msgid ""
"XML contains tax with percentage '%s' but it does not exist in your system"
@@ -1458,6 +1435,45 @@ msgstr "È possibile selezionare solo un file XML da collegare."
msgid "on"
msgstr "il"
+#~ msgid "Do not block e-bill import in case of missing Enasarco configuration"
+#~ msgstr ""
+#~ "Non blocca l'importazione delle e-fatture in caso di configurazione "
+#~ "Enasarco mancante"
+
+#~ msgid ""
+#~ "No withholding tax found with document payment reason %s and rate %s."
+#~ msgstr ""
+#~ "Ritenuta d'acconto con causale pagamento %s e aliquota %s non trovata."
+
+#~ msgid "Relax checks for Enasarco"
+#~ msgstr "Rilassare controlli per Enasarco"
+
+#~ msgid ""
+#~ "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax "
+#~ "is not found in your system. Please set it."
+#~ msgstr ""
+#~ "La fattura contiene un'imposta cassa previdenziale con tipo %s e imposta "
+#~ "%s ma una tale imposta non è presente nel sistema. Prego impostarla."
+
+#~ msgid ""
+#~ "The bill contains Welfare Fund tax with Type %s, but such a tax is not "
+#~ "found in your system. Please set it."
+#~ msgstr ""
+#~ "La fattura contiene un'imposta cassa previdenziale con tipo %s, ma una "
+#~ "tale imposta non è presente nel sistema. Prego impostarla."
+
+#~ msgid ""
+#~ "Minimum level: Bill is created with no lines; User will have to create "
+#~ "them, according to what specified in the electronic bill.\n"
+#~ "Maximum level: every line contained in the electronic bill will create a "
+#~ "line in the bill."
+#~ msgstr ""
+#~ "Livello minimo: la fattura viene creata senza righe, che dovranno essere "
+#~ "aggiunte dall'utente in base a quanto indicato nella fattura "
+#~ "elettronica.\n"
+#~ "Livello massimo: le righe della fattura verranno generate a partire da "
+#~ "tutte quelle presenti nella fattura elettronica."
+
#~ msgid "Product used to model ScontoMaggiorazione XML element on bills"
#~ msgstr ""
#~ "Prodotto usato come modello per l'elemento XML ScontoMaggiorazione delle "
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 647b0a336ee1..a9d4841c4e07 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -95,7 +95,7 @@ msgid "Attachments"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:727
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:750
#, python-format
msgid "BIC is required and not exist in Xml\n"
"Curr bank data is: \n"
@@ -123,7 +123,7 @@ msgid "Bill number {bill_nbr} of {bill_date}.\n"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1417
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1419
#, python-format
msgid "Bill total %s is different from document total amount %s"
msgstr ""
@@ -175,13 +175,13 @@ msgid "Company"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:83
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:91
#, python-format
msgid "Company Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1432
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1434
#, python-format
msgid "Computed amount untaxed %s is different from summary data %s"
msgstr ""
@@ -197,7 +197,7 @@ msgid "Contact"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:176
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:184
#, python-format
msgid "Country Code %s not found in system."
msgstr ""
@@ -230,7 +230,7 @@ msgid "Creation"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:286
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:294
#, python-format
msgid "Current invoice is from {} with REA Code {}. Yet it seems that partners {} have the same REA Code. This code should be unique; please fix it."
msgstr ""
@@ -256,7 +256,7 @@ msgid "Default products used in electronic supplier invoices"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:782
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:805
#, python-format
msgid "Define a purchase journal for this company: '%s' (id: %d)."
msgstr ""
@@ -300,12 +300,7 @@ msgid "Display Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_account_config_settings_ftpa_in
-msgid "Do not block e-bill import in case of missing Enasarco configuration"
-msgstr ""
-
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:881
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:904
#, python-format
msgid "Document type %s not handled."
msgstr ""
@@ -437,7 +432,7 @@ msgid "Electronic Bill Import"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:45
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:53
#, python-format
msgid "File %s is linked to bills yet."
msgstr ""
@@ -453,7 +448,7 @@ msgid "File Size"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1455
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1457
#, python-format
msgid "File is linked to bills yet."
msgstr ""
@@ -489,7 +484,7 @@ msgid "General Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:615
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:638
#, python-format
msgid "Global bill discount from document general data"
msgstr ""
@@ -725,6 +720,7 @@ msgstr ""
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_users__e_invoice_detail_level
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_wizard_import_fatturapa__e_invoice_detail_level
msgid "Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill.\n"
+"Tax rate level: Rate level: an invoice line is created for each rate present in the electronic invoice\n"
"Maximum level: every line contained in the electronic bill will create a line in the bill."
msgstr ""
@@ -734,13 +730,13 @@ msgid "Name"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:91
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:99
#, python-format
msgid "Name field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:703
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:726
#, python-format
msgid "Name of Bank with BIC '%s' is not set. Can't create bank"
msgstr ""
@@ -751,21 +747,21 @@ msgid "Nature"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:859
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:882
#, python-format
msgid "No currency found with code %s."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:343
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:351
#, python-format
msgid "No tax with percentage %s and nature %s found. Please configure this tax."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1219
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1246
#, python-format
-msgid "No withholding tax found with document payment reason %s and rate %s."
+msgid "No withholding tax found with document payment reason %s, rate %s and type %s."
msgstr ""
#. module: l10n_it_fatturapa_in
@@ -810,19 +806,19 @@ msgid "Other Administrative Data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:645
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:668
#, python-format
msgid "Payment method %s is not defined in your system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1183
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1207
#, python-format
msgid "Payment method code %s is incorrect."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1178
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1202
#, python-format
msgid "Payment method code not found in document."
msgstr ""
@@ -870,7 +866,7 @@ msgid "Progress data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:229
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:237
#, python-format
msgid "Province ( %s ) not present in your system"
msgstr ""
@@ -881,7 +877,7 @@ msgid "Quantity"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:261
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:269
#, python-format
msgid "REA Office Province Code ( %s ) not present in your system"
msgstr ""
@@ -892,7 +888,7 @@ msgid "Received Date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:218
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:226
#, python-format
msgid "Register Province ( %s ) not present in your system"
msgstr ""
@@ -914,12 +910,6 @@ msgstr ""
msgid "Related E-bill Line"
msgstr ""
-#. module: l10n_it_fatturapa_in
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_company__enasarco_relax_checks
-#: model:ir.model.fields,field_description:l10n_it_fatturapa_in.field_res_config_settings__enasarco_relax_checks
-msgid "Relax checks for Enasarco"
-msgstr ""
-
#. module: l10n_it_fatturapa_in
#: model_terms:ir.ui.view,arch_db:l10n_it_fatturapa_in.view_fatturapa_in_attachment_form
msgid "Remove"
@@ -964,20 +954,20 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:74
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1098
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:81
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1092
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1116
#, python-format
msgid "Round up account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1105
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1129
#, python-format
msgid "Round up and down tax is not set"
msgstr ""
@@ -990,14 +980,14 @@ msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:76
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
#: code:addons/l10n_it_fatturapa_in/models/account.py:83
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1119
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding up"
msgstr ""
@@ -1038,13 +1028,18 @@ msgid "Supplier data"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:100
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:108
#, python-format
msgid "Surname field contains '%s'. Your System contains '%s'"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:247
+#: selection:res.partner,e_invoice_detail_level:0
+msgid "Tax Rate"
+msgstr ""
+
+#. module: l10n_it_fatturapa_in
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:255
#, python-format
msgid "Tax Regime %s not present in your system."
msgstr ""
@@ -1055,11 +1050,16 @@ msgid "Tax Withholding"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:536
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:559
#, python-format
msgid "Tax kind %s not found"
msgstr ""
+#. module: l10n_it_fatturapa_in
+#: selection:wizard.import.fatturapa,e_invoice_detail_level:0
+msgid "Tax rate"
+msgstr ""
+
#. module: l10n_it_fatturapa_in
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_company__arrotondamenti_tax_id
#: model:ir.model.fields,help:l10n_it_fatturapa_in.field_res_config_settings__arrotondamenti_tax_id
@@ -1083,19 +1083,7 @@ msgid "Text Reference"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1279
-#, python-format
-msgid "The bill contains Welfare Fund tax with Type %s and Tax %s but such a tax is not found in your system. Please set it."
-msgstr ""
-
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1261
-#, python-format
-msgid "The bill contains Welfare Fund tax with Type %s, but such a tax is not found in your system. Please set it."
-msgstr ""
-
-#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1207
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1231
#, python-format
msgid "The bill contains withholding tax with payment reason %s, but such a tax is not found in your system. Please set it."
msgstr ""
@@ -1137,13 +1125,13 @@ msgid "To Register"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:348
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:356
#, python-format
msgid "Too many taxes with percentage %s and nature %s found. Tax %s with lower priority has been set on invoice lines."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:373
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:381
#, python-format
msgid "Too many taxes with percentage equals to '%s'.\n"
"Fix it if required"
@@ -1161,7 +1149,7 @@ msgid "Total amount ({bill_amount_total}) does not match with e-bill total amoun
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:158
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:166
#, python-format
msgid "Two distinct partners with VAT number %s or Fiscal Code %s already present in db."
msgstr ""
@@ -1251,7 +1239,7 @@ msgid "Welfare Fund"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:563
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:586
#, python-format
msgid "Welfare Fund %s not present in your system."
msgstr ""
@@ -1268,19 +1256,19 @@ msgid "Welfare Fund Details"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1306
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1290
#, python-format
msgid "Welfare Fund data %s has withholding tax but no withholding tax was found in the system."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:545
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:568
#, python-format
msgid "Welfare Fund is not defined."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1298
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1282
#, python-format
msgid "Welfare Fund: %s"
msgstr ""
@@ -1301,13 +1289,13 @@ msgid "Wizard"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:433
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:441
#, python-format
msgid "XML contains tax %s. Product %s has tax %s. Using the XML one"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:364
+#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:372
#, python-format
msgid "XML contains tax with percentage '%s' but it does not exist in your system"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index b1d477f19720..5054eee3075c 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -30,7 +30,6 @@ class ResCompany(models.Model):
domain=[('type_tax_use', '=', 'purchase'), ('amount', '=', 0.0)],
help="Tax used to both round up and down bills amount."
)
- enasarco_relax_checks = fields.Boolean('Relax checks for Enasarco')
in_invoice_registration_date = fields.Selection([
('inv_date', 'Invoice Date'),
('rec_date', 'Received Date'),
@@ -61,9 +60,6 @@ class AccountConfigSettings(models.TransientModel):
related='company_id.arrotondamenti_tax_id',
readonly=False
)
- enasarco_relax_checks = fields.Boolean(
- related='company_id.enasarco_relax_checks', readonly=False
- )
in_invoice_registration_date = fields.Selection(
related='company_id.in_invoice_registration_date', readonly=False
)
diff --git a/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR13.xml b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR13.xml
new file mode 100644
index 000000000000..7ce05fa9997f
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT01234567890_FPR13.xml
@@ -0,0 +1,113 @@
+
+
+
+
+
+ IT
+ 02780790107
+
+ FPR13
+ FPR12
+ 0000000
+
+ 06543534343
+ info@yourcompany.example.com
+
+ test@pec.it
+
+
+
+
+ IT
+ 02780790107
+
+
+ YourCompany
+
+ RF01
+
+
+ Via Milano, 1
+ 00100
+ Roma
+ AK
+ IT
+
+
+ 06543534343
+ info@yourcompany.example.com
+
+
+
+
+
+ IT
+ 07973780013
+
+ 07973780013
+
+ B2B Customer
+
+
+
+ Via Roma, 1
+ 16100
+ Genova
+ AK
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-09-30
+ FPR 16/20
+
+ RT01
+ 3120.00
+ 20.00
+ A
+
+
+ TC22
+ 4.00
+ 600.00
+ 15000.00
+ 22.00
+ SI
+
+ 19032.00
+
+
+
+
+ 1
+ Consulenza attività commerciale e gestione progetti svolta nel periodo 08/2019-08/2020
+ 1.00
+ 15000.00
+ 15000.00
+ 22.00
+ SI
+
+
+ 22.00
+ 15600.00
+ 3432.00
+
+
+
+ TP02
+
+ MP05
+ 2020-09-30
+ 15912.00
+ FINECO BANK
+ IT37F0301503200000005796587
+ UNCRITMMXXX
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20001.xml b/l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20001.xml
new file mode 100644
index 000000000000..986c65bea2b9
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20001.xml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+ IT
+ 01484710387
+
+ 00005
+ FPR12
+ 0000000
+
+ 05543534343
+ info@yourcompany.example.com
+
+ ufficio@pec.bizz.it
+
+
+
+
+
+ IT
+ 01484710387
+
+
+ Mario
+ Bianchi
+ Avvocato
+
+ RF01
+
+
+ Via Voltapaletto 12
+ 44121
+ Ferrara
+ FE
+ IT
+
+
+
+
+
+ 04006460275
+
+ BIZZ SRL
+
+
+
+ VIA TORINO 135
+ 30100
+ Venezia
+ VE
+ IT
+
+
+
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-10-25
+ 001
+
+
+ RT01
+ 23.00
+ 20.00
+ A
+
+
+
+ TC01
+ 4.00
+ 4.60
+ 115.00
+ 22.00
+
+
+ 122.91
+
+
+
+
+
+
+ 1
+ Competenze
+ 100.00
+ 100.00
+ 22.00
+ SI
+
+
+
+ 2
+ Spese generali ( 15% )
+ 15.00
+ 15.00
+ 22.00
+ SI
+
+
+
+ 22.00
+ 119.60
+ 26.31
+ I
+
+
+
+
+
+ TP02
+
+ MP05
+ 2020-09-30
+ 122.91
+ FINECO BANK
+ IT37F0301503200000005796511
+ UNCRITMMXXX
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20003.xml b/l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20003.xml
new file mode 100644
index 000000000000..ded42a8d5653
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20003.xml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+ IT
+ 06948880486
+
+ 00005
+ FPR12
+ 0000000
+
+ 05543534343
+ info@yourcompany.example.com
+
+ ufficio@pec.bizz.it
+
+
+
+
+
+ IT
+ 06948880486
+
+
+ GIACOMO
+ NERI
+
+ RF01
+
+
+ VIA DEI BOTTEGAI
+ 11
+ 50123
+ FIRENZE
+ FI
+ IT
+
+
+
+
+
+ 04006460275
+
+ BIZZ SRL
+
+
+
+ VIA TORINO 135
+ 30100
+ Venezia
+ VE
+ IT
+
+
+
+
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-10-25
+ 003
+
+
+ RT01
+ 1.15
+ 11.50
+ R
+
+
+
+ RT04
+ 0.85
+ 8.50
+ R
+
+
+
+ TC07
+ 8.50
+ 0.85
+ 10.00
+ 22.00
+ SI
+
+
+ 10.20
+
+
+
+
+
+
+ 1
+ PROVVIGIONI
+ 10.00
+ 10.00
+ 22.00
+ SI
+
+
+ 22.00
+ 10.00
+ 2.20
+ I
+
+
+
+
+
+ TP02
+
+ MP05
+ 2020-09-30
+ 10.20
+ FINECO BANK
+ IT37F0301503200000005796533
+ UNCRITMMXXX
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20004.xml b/l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20004.xml
new file mode 100644
index 000000000000..37d2b6d3443d
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/ITNREGCM80H30D612D_20004.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+ IT
+ 06948880486
+
+ 00005
+ FPR12
+ 0000000
+
+ 05543534343
+ info@yourcompany.example.com
+
+ ufficio@pec.bizz.it
+
+
+
+
+
+ IT
+ 06948880486
+
+
+ GIACOMO
+ NERI
+
+ RF01
+
+
+ VIA DEI BOTTEGAI
+ 11
+ 50123
+ FIRENZE
+ FI
+ IT
+
+
+
+
+
+ 04006460275
+
+ BIZZ SRL
+
+
+
+ VIA TORINO 135
+ 30100
+ Venezia
+ VE
+ IT
+
+
+
+
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-10-25
+ 003
+
+
+ RT01
+ 1.15
+ 11.50
+ R
+
+
+
+ RT04
+ 0.85
+ 8.50
+ R
+
+
+
+ TC07
+ 8.50
+ 0.85
+ 10.00
+ 22.00
+ SI
+
+
+ 10.20
+
+
+
+
+
+
+ 1
+ PROVVIGIONI
+ 10.00
+ 10.00
+ 22.00
+
+
+ 22.00
+ 10.00
+ 2.20
+ I
+
+
+
+
+
+ TP02
+
+ MP05
+ 2020-09-30
+ 10.20
+ FINECO BANK
+ IT37F0301503200000005796533
+ UNCRITMMXXX
+
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index cca1089997fc..fccf324eecf1 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -92,6 +92,7 @@ def create_wt_4q(self):
return self.env['withholding.tax'].create({
'name': '4q',
'code': '4q',
+ 'wt_types': 'enasarco',
'account_receivable_id': self.payable_account_id,
'account_payable_id': self.payable_account_id,
'payment_term': self.env.ref('account.account_payment_term').id,
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 677e9b3eb907..54c72095b124 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -27,7 +27,10 @@ class TestFatturaPAXMLValidation(FatturapaCommon):
def setUp(self):
super(TestFatturaPAXMLValidation, self).setUp()
-
+ self.wt = self.create_wt_4q()
+ self.wtq = self.create_wt_27_20q()
+ self.wt4q = self.create_wt_26_40q()
+ self.wt2q = self.create_wt_26_20q()
self.invoice_model = self.env['account.invoice']
def test_00_xml_import(self):
@@ -614,15 +617,7 @@ def test_38_xml_import_dates(self):
self.assertEqual(invoices[0].fatturapa_attachment_in_id.invoices_date,
'18/12/2014 20/12/2014')
- def test_39_xml_import_withholding(self):
- self.wt = self.create_wt_4q()
- with self.assertRaises(UserError):
- self.run_wizard('test39', 'IT01234567890_FPR11.xml')
-
def test_40_xml_import_withholding(self):
- self.wt = self.create_wt_4q()
- self.wt4q = self.create_wt_26_40q()
- self.wt2q = self.create_wt_26_20q()
res = self.run_wizard('test40', 'IT01234567890_FPR11.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
@@ -634,8 +629,6 @@ def test_40_xml_import_withholding(self):
)
def test_41_xml_import_withholding(self):
- self.wt = self.create_wt_4q()
- self.wtq = self.create_wt_27_20q()
res = self.run_wizard('test41', 'IT01234567890_FPR12.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
@@ -644,6 +637,27 @@ def test_41_xml_import_withholding(self):
self.assertAlmostEquals(invoice.withholding_tax_amount, 94.0)
self.assertAlmostEquals(invoice.amount_net_pay, 1126.0)
+ def test_42_xml_import_withholding(self):
+ # cassa previdenziale sulla quale è applicata la ritenuta
+ res = self.run_wizard('test42', 'IT01234567890_FPR13.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.amount_total, 19032.0)
+ self.assertEqual(invoice.withholding_tax_amount, 3120.0)
+ self.assertEqual(invoice.amount_net_pay, 15912.0)
+ self.assertTrue(len(invoice.ftpa_withholding_ids), 1)
+ self.assertTrue(len(invoice.invoice_line_ids) == 2)
+
+ def test_43_xml_import_withholding(self):
+ # Avvocato Mario Bianchi di Ferrara.
+ # Imponibile di 100+15% spese
+ res = self.run_wizard('test43', 'ITBNCMRA80A01D548T_20001.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.withholding_tax_amount, 23.0)
+ self.assertTrue(len(invoice.ftpa_withholding_ids), 1)
+ self.assertTrue(len(invoice.invoice_line_ids) == 3)
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
@@ -737,6 +751,7 @@ def setUp(self):
self.invoice_model = self.env['account.invoice']
+ def test_01_xml_import_enasarco(self):
account_payable = self.env['account.account'].create({
'name': 'Test WH tax',
'code': 'whtaxpay2',
@@ -760,11 +775,29 @@ def setUp(self):
'payment_term': self.env.ref(
'account.account_payment_term_advance').id,
'wt_types': 'enasarco',
+ 'causale_pagamento_id': self.env.ref(
+ 'l10n_it_causali_pagamento.r').id,
'rate_ids': [(0, 0, {
'tax': 1.57,
'base': 1.0,
})]
})
+ self.env['withholding.tax'].create({
+ 'name': 'Enasarco 8,50',
+ 'code': 'TC07',
+ 'account_receivable_id': account_receivable.id,
+ 'account_payable_id': account_payable.id,
+ 'journal_id': misc_journal.id,
+ 'payment_term': self.env.ref(
+ 'account.account_payment_term_advance').id,
+ 'wt_types': 'enasarco',
+ 'causale_pagamento_id': self.env.ref(
+ 'l10n_it_causali_pagamento.r').id,
+ 'rate_ids': [(0, 0, {
+ 'tax': 8.5,
+ 'base': 1.0,
+ })]
+ })
self.env['withholding.tax'].create({
'name': '1040/3',
'code': '1040',
@@ -781,8 +814,24 @@ def setUp(self):
'base': 1.0,
})]
})
-
- def test_01_xml_import_enasarco(self):
+ self.env['withholding.tax'].create({
+ 'name': '1040 R',
+ 'code': '1040R',
+ 'account_receivable_id': account_receivable.id,
+ 'account_payable_id': account_payable.id,
+ 'journal_id': misc_journal.id,
+ 'payment_term': self.env.ref(
+ 'account.account_payment_term_advance').id,
+ 'wt_types': 'ritenuta',
+ 'causale_pagamento_id': self.env.ref(
+ 'l10n_it_causali_pagamento.r').id,
+ 'rate_ids': [(0, 0, {
+ 'tax': 11.50,
+ 'base': 1.0,
+ })]
+ })
+ # case with ENASARCO only in DatiCassaPrevidenziale and not in DatiRitenuta.
+ # This should not happen, but it is valid for SDI
res = self.run_wizard('test01', 'IT05979361218_014.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
@@ -790,7 +839,8 @@ def test_01_xml_import_enasarco(self):
self.assertEqual(invoice.amount_untaxed, 2470.00)
self.assertEqual(invoice.amount_tax, 543.40)
self.assertEqual(invoice.amount_total, 3013.40)
- self.assertEqual(invoice.amount_net_pay, 2690.57)
+ self.assertEqual(invoice.amount_net_pay, 2729.35)
+ self.assertEqual(invoice.withholding_tax_amount, 284.05)
self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, 'N2')
self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
self.assertEqual(
@@ -801,3 +851,26 @@ def test_01_xml_import_enasarco(self):
invoice.e_invoice_line_ids[0].unit_price, 2470.0)
self.assertEqual(
invoice.e_invoice_line_ids[0].total_price, 2470.0)
+
+ def test_02_xml_import_enasarco(self):
+ # Giacomo Neri, agente di commercio di Firenze.
+ # Imponibile 10
+ res = self.run_wizard('test02', 'ITNREGCM80H30D612D_20003.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.amount_untaxed, 10.0)
+ self.assertEqual(invoice.amount_tax, 2.2)
+ self.assertEqual(invoice.amount_total, 12.2)
+ self.assertEqual(invoice.amount_net_pay, 10.2)
+ self.assertTrue(len(invoice.invoice_line_ids) == 1)
+
+ def test_03_xml_import_enasarco(self):
+ # Come sopra, ma senza "SI " in riga fattura
+ res = self.run_wizard('test03', 'ITNREGCM80H30D612D_20004.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertTrue(
+ 'E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found'
+ in invoice.e_invoice_validation_message)
+ self.assertEqual(invoice.amount_total, 12.2)
+ self.assertEqual(invoice.amount_net_pay, 12.2)
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 0e56361c1401..00ca114f4d6e 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -54,18 +54,6 @@
-
-
-
-
-
-
-
- Do not block e-bill import in case of missing Enasarco configuration
-
-
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 063ba2041cb6..4dcfd3717c70 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -9,6 +9,15 @@
_logger = logging.getLogger(__name__)
+WT_CODES_MAPPING = {
+ 'RT01': 'ritenuta',
+ 'RT02': 'ritenuta',
+ 'RT03': 'inps',
+ 'RT04': 'enasarco',
+ 'RT05': 'enpam',
+ 'RT06': 'other',
+}
+
class WizardImportFatturapa(models.TransientModel):
_name = "wizard.import.fatturapa"
@@ -945,6 +954,11 @@ def invoiceCreate(
self.set_e_invoice_lines(FatturaBody, invoice_data)
invoice = invoice_model.create(invoice_data)
+
+ # 2.1.1.7
+ self.set_welfares_fund(
+ FatturaBody, credit_account_id, invoice, wt_founds)
+
invoice._onchange_invoice_line_wt_ids()
invoice._onchange_payment_term_date_invoice()
invoice.write(invoice._convert_to_write(invoice._cache))
@@ -952,10 +966,6 @@ def invoiceCreate(
self.set_vendor_bill_data(FatturaBody, invoice)
- # 2.1.1.7
- self.set_welfares_fund(
- FatturaBody, credit_account_id, invoice, wt_founds)
-
rel_docs_dict = {
# 2.1.2
'order': FatturaBody.DatiGenerali.DatiOrdineAcquisto,
@@ -1226,16 +1236,20 @@ def set_withholding_tax(self, FatturaBody, invoice_data):
) % Withholding.CausalePagamento)
for wt in wts:
- if wt.tax == float(Withholding.AliquotaRitenuta):
+ if (
+ wt.tax == float(Withholding.AliquotaRitenuta) and
+ WT_CODES_MAPPING[Withholding.TipoRitenuta] == wt.wt_types
+ ):
wt_founds.append(wt)
break
else:
raise UserError(_(
"No withholding tax found with "
- "document payment reason %s and rate %s.")
+ "document payment reason %s, rate %s and type %s.")
% (
Withholding.CausalePagamento,
- Withholding.AliquotaRitenuta
+ Withholding.AliquotaRitenuta,
+ WT_CODES_MAPPING[Withholding.TipoRitenuta]
))
invoice_data['ftpa_withholding_ids'].append((
0, 0, {
@@ -1256,55 +1270,11 @@ def set_welfares_fund(
return
WelfareFundLineModel = self.env['welfare.fund.data.line']
-
- wts = False
- enasarco_relax_checks = self.env.user.company_id.enasarco_relax_checks
- if any([welfareLine for welfareLine in Welfares
- if welfareLine.TipoCassa == 'TC07']):
- # Search the matching withholding tax
- wts = self.env['withholding.tax'].search(
- [('wt_types', '=', 'enasarco')])
-
for welfareLine in Welfares:
WalfarLineVals = self._prepareWelfareLine(invoice.id, welfareLine)
WelfareFundLineModel.create(WalfarLineVals)
- # Handle only TC07
if welfareLine.TipoCassa == 'TC07':
- if not wts:
- msg = _(
- "The bill contains Welfare Fund tax with "
- "Type %s, "
- "but such a tax is not found in your system. Please "
- "set it."
- ) % welfareLine.TipoCassa
- if enasarco_relax_checks:
- self.log_inconsistency(msg)
- else:
- raise UserError(msg)
-
- wt_found = False
- for wt in wts:
- if wt.tax == float(welfareLine.AlCassa):
- wt_found = wt
- break
-
- if not wt_found:
- msg = _(
- "The bill contains Welfare Fund tax with "
- "Type %s and Tax %s "
- "but such a tax is not found in your system. Please "
- "set it."
- ) % (welfareLine.TipoCassa, float(welfareLine.AlCassa))
- if enasarco_relax_checks:
- self.log_inconsistency(msg)
- else:
- raise UserError(msg)
-
- for line in invoice.invoice_line_ids:
- line.invoice_line_tax_wt_ids = [(4, wt_found.id)]
- invoice._onchange_invoice_line_wt_ids()
- invoice.write(invoice._convert_to_write(invoice._cache))
continue
line_vals = self._prepare_generic_line_data(welfareLine)
@@ -1316,13 +1286,13 @@ def set_welfares_fund(
'account_id': credit_account_id,
})
if welfareLine.Ritenuta:
- if not wt_found:
+ if not wt_founds:
raise UserError(_(
"Welfare Fund data %s has withholding tax but no "
"withholding tax was found in the system."
) % welfareLine.TipoCassa)
line_vals['invoice_line_tax_wt_ids'] = [
- (6, 0, [wt_found.id])]
+ (6, 0, [wt.id for wt in wt_founds])]
if self.env.user.company_id.cassa_previdenziale_product_id:
cassa_previdenziale_product = self.env.user.company_id \
.cassa_previdenziale_product_id
From 4140bbb17de191a862e8c4f1147ec9890899da6b Mon Sep 17 00:00:00 2001
From: gianmarco
Date: Sat, 28 Nov 2020 21:05:42 +0100
Subject: [PATCH 096/155] [12.0][l10n_it_fatturapa_in] ADD test for xml invoice
with spaces in tag PECDestinatario
---
l10n_it_fatturapa_in/README.rst | 1 +
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst | 1 +
.../static/description/index.html | 1 +
.../tests/data/ITBNCMRA80A01D548T_20005.xml | 132 ++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 6 +
6 files changed, 142 insertions(+), 1 deletion(-)
create mode 100644 l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20005.xml
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index 08bdabc8b4a0..ae20a2f5df03 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -173,6 +173,7 @@ Contributors
* Alessio Gerace
* Sergio Zanchetta
* Giovanni Serra
+* Gianmarco Conte
Maintainers
~~~~~~~~~~~
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index f8a76f139f02..326eca61b8de 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.2.1.0',
+ 'version': '12.0.2.1.1',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
index 1721984a8682..1a84bfecc996 100644
--- a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
+++ b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
@@ -3,3 +3,4 @@
* Alessio Gerace
* Sergio Zanchetta
* Giovanni Serra
+* Gianmarco Conte
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index 108057160c5a..2b75910494fd 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -496,6 +496,7 @@
Alessio Gerace
Sergio Zanchetta <https://github.com/primes2h >
Giovanni Serra <giovanni@gslab.it >
+Gianmarco Conte <gconte@dinamicheaziendali.it >
diff --git a/l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20005.xml b/l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20005.xml
new file mode 100644
index 000000000000..d5a229dab4f5
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/ITBNCMRA80A01D548T_20005.xml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+ IT
+ 01484710387
+
+ 00005
+ FPR12
+ 0000000
+
+ 05543534343
+ info@yourcompany.example.com
+
+ ufficio@pec.bizz.it
+
+
+
+
+
+ IT
+ 01484710387
+
+
+ Mario
+ Bianchi
+ Avvocato
+
+ RF01
+
+
+ Via Voltapaletto 12
+ 44121
+ Ferrara
+ FE
+ IT
+
+
+
+
+
+ 04006460275
+
+ BIZZ SRL
+
+
+
+ VIA TORINO 135
+ 30100
+ Venezia
+ VE
+ IT
+
+
+
+
+
+
+
+
+
+
+ TD01
+ EUR
+ 2020-10-25
+ 001
+
+
+ RT01
+ 23.00
+ 20.00
+ A
+
+
+
+ TC01
+ 4.00
+ 4.60
+ 115.00
+ 22.00
+
+
+ 122.91
+
+
+
+
+
+
+ 1
+ Competenze
+ 100.00
+ 100.00
+ 22.00
+ SI
+
+
+
+ 2
+ Spese generali ( 15% )
+ 15.00
+ 15.00
+ 22.00
+ SI
+
+
+
+ 22.00
+ 119.60
+ 26.31
+ I
+
+
+
+
+
+ TP02
+
+ MP05
+ 2020-09-30
+ 122.91
+ FINECO BANK
+ IT37F0301503200000005796511
+ UNCRITMMXXX
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 54c72095b124..42202e313bc1 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -658,6 +658,12 @@ def test_43_xml_import_withholding(self):
self.assertTrue(len(invoice.ftpa_withholding_ids), 1)
self.assertTrue(len(invoice.invoice_line_ids) == 3)
+ def test_44_xml_import(self):
+ res = self.run_wizard('test44', 'ITBNCMRA80A01D548T_20005.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertTrue(len(invoice.invoice_line_ids) == 3)
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
From 522174479b32a932317a8232298cd787d456aa7a Mon Sep 17 00:00:00 2001
From: tafaRU
Date: Tue, 20 Oct 2020 10:57:10 +0200
Subject: [PATCH 097/155] l10n_it_fatturapa_in: avoid duplication in the code
of post migration script (DRY principle)
---
.../migrations/12.0.2.0.0/post-migration.py | 99 ++++++-------------
1 file changed, 31 insertions(+), 68 deletions(-)
diff --git a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
index eef1cd161fdd..864774d86616 100644
--- a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
+++ b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
@@ -1,78 +1,41 @@
# Copyright 2020 Sergio Corato
+# Copyright 2020 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
from psycopg2 import sql
def create_withholding_data_lines(env):
- # create ftpa_withholding_ids from ftpa_withholding_type and ftpa_withholding_amount
- column_name = openupgrade.get_legacy_name('ftpa_withholding_amount')
- if openupgrade.column_exists(env.cr, 'account_invoice', column_name):
- openupgrade.logged_query(
- env.cr, sql.SQL(
- """
- INSERT INTO withholding_data_line
- (
- name,
- amount,
- invoice_id,
- create_uid,
- create_date,
- write_date,
- write_uid
- )
- SELECT
- ai.{ftpa_withholding_type},
- ai.{ftpa_withholding_amount},
- ai.id,
- ai.create_uid,
- ai.create_date,
- ai.write_date,
- ai.write_uid
- FROM account_invoice ai
- WHERE ai.{ftpa_withholding_type} IS NOT NULL;
- """
- ).format(
- ftpa_withholding_type=sql.Identifier(
- openupgrade.get_legacy_name(
- 'ftpa_withholding_type')
- ),
- ftpa_withholding_amount=sql.Identifier(
- openupgrade.get_legacy_name(
- 'ftpa_withholding_amount')
- ),
- )
- )
- else:
- openupgrade.logged_query(
- env.cr, sql.SQL(
- """
- INSERT INTO withholding_data_line
- (
- name,
- invoice_id,
- create_uid,
- create_date,
- write_date,
- write_uid
- )
- SELECT
- ai.{ftpa_withholding_type},
- ai.id,
- ai.create_uid,
- ai.create_date,
- ai.write_date,
- ai.write_uid
- FROM account_invoice ai
- WHERE ai.{ftpa_withholding_type} IS NOT NULL;
- """
- ).format(
- ftpa_withholding_type=sql.Identifier(
- openupgrade.get_legacy_name(
- 'ftpa_withholding_type')
- ),
- )
- )
+ """
+ Create ftpa_withholding_ids from ftpa_withholding_type
+ and ftpa_withholding_amount
+ """
+ column_wht_amount = openupgrade.get_legacy_name('ftpa_withholding_amount')
+ column_wht_type = openupgrade.get_legacy_name('ftpa_withholding_type')
+ exists = openupgrade.column_exists(env.cr, 'account_invoice', column_wht_amount)
+ mapping = {
+ 'name': 'ai.{ftpa_withholding_type}'.format(
+ ftpa_withholding_type=column_wht_type),
+ 'invoice_id': 'ai.id',
+ 'create_uid': 'ai.create_uid',
+ 'create_date': 'ai.create_date',
+ 'write_date': 'ai.write_date',
+ 'write_uid': 'ai.write_uid',
+ }
+ if exists:
+ mapping.update(
+ {'amount': 'ai.{ftpa_withholding_amount}'.format(
+ ftpa_withholding_amount=column_wht_amount)})
+ query = """
+ INSERT INTO withholding_data_line
+ ({columns})
+ SELECT {values}
+ FROM account_invoice AS ai
+ WHERE ai.{ftpa_withholding_type} IS NOT NULL;""".format(
+ columns=','.join(mapping.keys()),
+ values=','.join(mapping.values()),
+ ftpa_withholding_type=column_wht_type)
+ openupgrade.logged_query(env.cr, sql.SQL(query))
@openupgrade.migrate()
From 717ffe2dfdbb58c6894d11c39cea6e14bf542a2f Mon Sep 17 00:00:00 2001
From: "gborruso@dinamicheaziendali.it"
Date: Thu, 10 Dec 2020 11:57:51 +0100
Subject: [PATCH 098/155] [FIX] Expected singleton per _compute_amount
---
l10n_it_fatturapa_in/__manifest__.py | 2 +-
l10n_it_fatturapa_in/i18n/it.po | 24 ++++++++---------
.../i18n/l10n_it_fatturapa_in.pot | 24 ++++++++---------
l10n_it_fatturapa_in/models/account.py | 27 ++++++++++---------
4 files changed, 40 insertions(+), 37 deletions(-)
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 326eca61b8de..6da283caad91 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,7 +6,7 @@
{
'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.2.1.1',
+ 'version': '12.0.2.1.3',
"development_status": "Beta",
'category': 'Localization/Italy',
'summary': 'Ricezione fatture elettroniche',
diff --git a/l10n_it_fatturapa_in/i18n/it.po b/l10n_it_fatturapa_in/i18n/it.po
index 249c45c5c6ba..91a0bf91e528 100644
--- a/l10n_it_fatturapa_in/i18n/it.po
+++ b/l10n_it_fatturapa_in/i18n/it.po
@@ -397,7 +397,7 @@ msgid "E-bill Inconsistencies"
msgstr "Incongruenze e-fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:165
+#: code:addons/l10n_it_fatturapa_in/models/account.py:168
#, python-format
msgid ""
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. "
@@ -405,7 +405,7 @@ msgid ""
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:174
+#: code:addons/l10n_it_fatturapa_in/models/account.py:177
#, python-format
msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
msgstr ""
@@ -619,7 +619,7 @@ msgid "Invoice Line"
msgstr "Riga fattura"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:222
+#: code:addons/l10n_it_fatturapa_in/models/account.py:225
#, python-format
msgid ""
"Invoice date ({bill_date_invoice}) does not match with e-bill invoice date "
@@ -1005,7 +1005,7 @@ msgid "Round Up Account"
msgstr "Conto arrotondamenti attivi"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:74
+#: code:addons/l10n_it_fatturapa_in/models/account.py:77
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Round down account is not set in Accounting Settings"
@@ -1014,7 +1014,7 @@ msgstr ""
"contabilità"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:81
+#: code:addons/l10n_it_fatturapa_in/models/account.py:84
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1116
#, python-format
msgid "Round up account is not set in Accounting Settings"
@@ -1035,14 +1035,14 @@ msgid "Rounding Tax"
msgstr "Imposta arrotondamento"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:76
+#: code:addons/l10n_it_fatturapa_in/models/account.py:79
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding down"
msgstr "Arrotondamento passivo"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:83
+#: code:addons/l10n_it_fatturapa_in/models/account.py:86
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding up"
@@ -1129,7 +1129,7 @@ msgstr ""
"fatture."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:134
+#: code:addons/l10n_it_fatturapa_in/models/account.py:137
#, python-format
msgid ""
"Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount "
@@ -1167,7 +1167,7 @@ msgid "The database object this attachment will be attached to."
msgstr "L'oggetto del database a cui verrà assegnato questo allegato."
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:102
+#: code:addons/l10n_it_fatturapa_in/models/account.py:105
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr "La fattura '%s' non combacia con la relativa e-fattura"
@@ -1223,7 +1223,7 @@ msgid "Total Price"
msgstr "Prezzo totale"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:151
+#: code:addons/l10n_it_fatturapa_in/models/account.py:154
#, python-format
msgid ""
"Total amount ({bill_amount_total}) does not match with e-bill total amount "
@@ -1268,7 +1268,7 @@ msgid "Unread Messages Counter"
msgstr "Numero messaggi non letti"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:117
+#: code:addons/l10n_it_fatturapa_in/models/account.py:120
#, python-format
msgid ""
"Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed "
@@ -1305,7 +1305,7 @@ msgid "Vendor invoice registration default date"
msgstr "Data predefinita per la registrazione delle fatture fornitore"
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:211
+#: code:addons/l10n_it_fatturapa_in/models/account.py:214
#, python-format
msgid ""
"Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor "
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index a9d4841c4e07..8457069a682d 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -366,14 +366,14 @@ msgid "E-bill Inconsistencies"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:165
+#: code:addons/l10n_it_fatturapa_in/models/account.py:168
#, python-format
msgid "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found. Please manually check Withholding tax Amount\n"
""
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:174
+#: code:addons/l10n_it_fatturapa_in/models/account.py:177
#, python-format
msgid "E-bill contains ImportoRitenuta %s but created invoice has got %s\n"
""
@@ -583,7 +583,7 @@ msgid "Invoice Line"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:222
+#: code:addons/l10n_it_fatturapa_in/models/account.py:225
#, python-format
msgid "Invoice date ({bill_date_invoice}) does not match with e-bill invoice date ({e_bill_date_invoice})"
msgstr ""
@@ -953,14 +953,14 @@ msgid "Round Up Account"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:74
+#: code:addons/l10n_it_fatturapa_in/models/account.py:77
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1122
#, python-format
msgid "Round down account is not set in Accounting Settings"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:81
+#: code:addons/l10n_it_fatturapa_in/models/account.py:84
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1116
#, python-format
msgid "Round up account is not set in Accounting Settings"
@@ -979,14 +979,14 @@ msgid "Rounding Tax"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:76
+#: code:addons/l10n_it_fatturapa_in/models/account.py:79
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding down"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:83
+#: code:addons/l10n_it_fatturapa_in/models/account.py:86
#: code:addons/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py:1143
#, python-format
msgid "Rounding up"
@@ -1067,7 +1067,7 @@ msgid "Tax used to both round up and down bills amount."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:134
+#: code:addons/l10n_it_fatturapa_in/models/account.py:137
#, python-format
msgid "Taxed amount ({bill_amount_tax}) does not match with e-bill taxed amount ({e_bill_amount_tax})"
msgstr ""
@@ -1094,7 +1094,7 @@ msgid "The database object this attachment will be attached to."
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:102
+#: code:addons/l10n_it_fatturapa_in/models/account.py:105
#, python-format
msgid "The invoice '%s' doesn't match the related e-invoice"
msgstr ""
@@ -1143,7 +1143,7 @@ msgid "Total Price"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:151
+#: code:addons/l10n_it_fatturapa_in/models/account.py:154
#, python-format
msgid "Total amount ({bill_amount_total}) does not match with e-bill total amount ({e_bill_amount_total})"
msgstr ""
@@ -1180,7 +1180,7 @@ msgid "Unread Messages Counter"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:117
+#: code:addons/l10n_it_fatturapa_in/models/account.py:120
#, python-format
msgid "Untaxed amount ({bill_amount_untaxed}) does not match with e-bill untaxed amount ({e_bill_amount_untaxed})"
msgstr ""
@@ -1208,7 +1208,7 @@ msgid "Vendor invoice registration default date"
msgstr ""
#. module: l10n_it_fatturapa_in
-#: code:addons/l10n_it_fatturapa_in/models/account.py:211
+#: code:addons/l10n_it_fatturapa_in/models/account.py:214
#, python-format
msgid "Vendor reference ({bill_vendor_ref}) does not match with e-bill vendor reference ({e_bill_vendor_ref})"
msgstr ""
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 60d2b508a6c8..350f92811955 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -43,23 +43,26 @@ class AccountInvoice(models.Model):
e_invoice_received_date = fields.Date(
string='E-Bill Received Date')
+ @api.multi
@api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount',
'tax_line_ids.amount_rounding', 'currency_id', 'company_id',
'date_invoice', 'type', 'efatt_rounding')
def _compute_amount(self):
super(AccountInvoice, self)._compute_amount()
- if self.efatt_rounding != 0:
- self.amount_total += self.efatt_rounding
- amount_total_company_signed = self.amount_total
- if self.currency_id and self.company_id and self.currency_id !=\
- self.company_id.currency_id:
- currency_id = self.currency_id
- amount_total_company_signed = currency_id._convert(
- self.amount_total, self.company_id.currency_id,
- self.company_id, self.date_invoice or fields.Date.today())
- sign = self.type in ['in_refund', 'out_refund'] and -1 or 1
- self.amount_total_company_signed = amount_total_company_signed * sign
- self.amount_total_signed = self.amount_total * sign
+ for inv in self:
+ if inv.efatt_rounding != 0:
+ inv.amount_total += inv.efatt_rounding
+ amount_total_company_signed = inv.amount_total
+ if inv.currency_id and inv.company_id and \
+ inv.currency_id != inv.company_id.currency_id:
+ currency_id = inv.currency_id
+ amount_total_company_signed = currency_id._convert(
+ inv.amount_total, inv.company_id.currency_id,
+ inv.company_id, inv.date_invoice or fields.Date.today())
+ sign = inv.type in ['in_refund', 'out_refund'] and -1 or 1
+ inv.amount_total_company_signed = \
+ amount_total_company_signed * sign
+ inv.amount_total_signed = inv.amount_total * sign
@api.model
def invoice_line_move_line_get(self):
From 62cb85f511b016dda5944ca02c0a6f1928f54971 Mon Sep 17 00:00:00 2001
From: Marco Colombo
Date: Fri, 20 Nov 2020 15:40:11 +0100
Subject: [PATCH 099/155] [ADD] aggiunto test per importi 0.0000000
(propedeutico all'uso di xmlschema)
---
.../tests/data/IT05979361218_016.xml | 98 +++++++++++++++++++
.../tests/test_import_fatturapa_xml.py | 12 +++
2 files changed, 110 insertions(+)
create mode 100644 l10n_it_fatturapa_in/tests/data/IT05979361218_016.xml
diff --git a/l10n_it_fatturapa_in/tests/data/IT05979361218_016.xml b/l10n_it_fatturapa_in/tests/data/IT05979361218_016.xml
new file mode 100644
index 000000000000..aad2d919e601
--- /dev/null
+++ b/l10n_it_fatturapa_in/tests/data/IT05979361218_016.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+ IT
+ 05979361218
+
+ 006
+ FPA12
+ UFPQ1O
+
+
+
+
+ IT
+ 05979361218
+
+
+ SOCIETA' ALPHA BETA SRL
+
+ RF02
+
+
+ VIALE ROMA 543B
+ 07100
+ SASSARI
+ SS
+ IT
+
+
+
+
+ 80213330584
+
+ AMMINISTRAZIONE BETA
+
+
+
+ VIA TORINO 38-B
+ 00145
+ ROMA
+ RM
+ IT
+
+
+
+
+
+
+ TD01
+ EUR
+ 2019-05-11
+ 852S1
+ 18.07
+ Rif ordine 908
+
+
+
+
+ 1
+ USB4
+ 1.00
+ Pz.
+ 18.07
+ 18.07
+ 0.00
+ N4
+
+
+ 2
+ USB
+ 1.00
+ Pz.
+ 16.60
+
+ SC
+ 100.00
+
+ 0.0000000
+ 0.00
+ N4
+
+
+ 0.00
+ N4
+ -0.00
+ 18.07
+ 0.00
+ I
+ Esenzione Art.8 comma 1 DPR 633/72
+
+
+
+
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 42202e313bc1..af9d75b607bc 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -664,6 +664,18 @@ def test_44_xml_import(self):
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(len(invoice.invoice_line_ids) == 3)
+ def test_45_xml_many_zeros(self):
+ res = self.run_wizard('test42', 'IT05979361218_016.xml')
+ invoice_id = res.get('domain')[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.amount_total, 18.07)
+ self.assertEqual(invoice.invoice_line_ids[0].price_unit, 18.07)
+ self.assertEqual(invoice.invoice_line_ids[0].quantity, 1.0)
+ self.assertEqual(invoice.invoice_line_ids[0].price_subtotal, 18.07)
+ self.assertEqual(invoice.invoice_line_ids[1].price_unit, 16.60)
+ self.assertEqual(invoice.invoice_line_ids[1].quantity, 1.0)
+ self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, 0.0)
+
def test_01_xml_link(self):
"""
E-invoice lines are created.
From aafaa2b6e6c34e821e28567267a33469a5620920 Mon Sep 17 00:00:00 2001
From: Marco Colombo
Date: Wed, 26 May 2021 14:11:45 +0200
Subject: [PATCH 100/155] [ADD] passaggio a xmlschema per l'import delle
fatture
---
l10n_it_fatturapa_in/__manifest__.py | 9 +-
l10n_it_fatturapa_in/models/attachment.py | 2 +-
.../tests/test_import_fatturapa_xml.py | 2 +-
l10n_it_fatturapa_in/wizard/efattura.py | 175 ++++++++++++++++++
.../wizard/link_to_existing_invoice.py | 4 +-
.../wizard/wizard_import_fatturapa.py | 18 +-
6 files changed, 198 insertions(+), 12 deletions(-)
create mode 100644 l10n_it_fatturapa_in/wizard/efattura.py
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 6da283caad91..4cb79225af3c 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -28,5 +28,12 @@
'security/ir.model.access.csv',
'security/rules.xml',
],
- "installable": True
+ "installable": True,
+ 'external_dependencies': {
+ 'python': [
+ 'elementpath',
+ 'xmlschema',
+ 'asn1crypto'
+ ],
+ }
}
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 6c0505e45929..2751c788f4ee 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -118,7 +118,7 @@ def extract_attachments(self, AttachmentsData, invoice_id):
name = _("Attachment without name")
else:
name = attach.NomeAttachment
- content = attach.Attachment
+ content = attach.Attachment.encode()
_attach_dict = {
'name': name,
'datas': base64.b64encode(content),
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index af9d75b607bc..86ebbb46f5aa 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -665,7 +665,7 @@ def test_44_xml_import(self):
self.assertTrue(len(invoice.invoice_line_ids) == 3)
def test_45_xml_many_zeros(self):
- res = self.run_wizard('test42', 'IT05979361218_016.xml')
+ res = self.run_wizard('test45', 'IT05979361218_016.xml')
invoice_id = res.get('domain')[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.amount_total, 18.07)
diff --git a/l10n_it_fatturapa_in/wizard/efattura.py b/l10n_it_fatturapa_in/wizard/efattura.py
new file mode 100644
index 000000000000..620912feb2e7
--- /dev/null
+++ b/l10n_it_fatturapa_in/wizard/efattura.py
@@ -0,0 +1,175 @@
+import re
+import logging
+import xmlschema
+from lxml import etree
+from datetime import datetime
+
+from odoo.modules.module import get_module_resource
+
+_logger = logging.getLogger(__name__)
+_logger.setLevel(logging.DEBUG)
+
+XSD_SCHEMA = 'Schema_del_file_xml_FatturaPA_versione_1.2.1.xsd'
+
+_xsd_schema = get_module_resource('l10n_it_fatturapa', 'bindings', 'xsd',
+ XSD_SCHEMA)
+_root = etree.parse(_xsd_schema)
+
+date_types = {}
+datetime_types = {}
+
+
+def get_parent_element(e):
+ for ancestor in e.iterancestors():
+ if 'name' in ancestor.attrib:
+ return ancestor
+
+
+def get_type_query(e):
+ return "//*[@type='%s']" % e.attrib['name']
+
+
+def collect_element(target, element, parent=None):
+ if parent is None:
+ parent = get_parent_element(element)
+
+ path = '//%s/%s' % (parent.attrib['name'], element.attrib['name'])
+ mandatory = element.attrib.get('minOccurs') != '0'
+ if path not in target:
+ target[path] = mandatory
+ else:
+ assert target[path] == mandatory, \
+ 'Element %s is already present with different minOccurs value' % \
+ path
+
+
+def collect_elements_by_type_query(target, query):
+ for element in _root.xpath(query):
+ parent_type = get_parent_element(element)
+ for parent in _root.xpath(get_type_query(parent_type)):
+ collect_element(target, element, parent)
+
+
+def collect_elements_by_type(target, element_type):
+ collect_elements_by_type_query(target, get_type_query(element_type))
+
+
+def collect_types():
+ # simpleType, we look at the base of restriction
+ for element_type in _root.findall('//{*}simpleType'):
+ base = element_type.find('{*}restriction').attrib['base']
+
+ if base == 'xs:date':
+ collect_elements_by_type(date_types, element_type)
+ elif base == 'xs:dateTime':
+ collect_elements_by_type(datetime_types, element_type)
+
+ # complexType containing xs:date children
+ collect_elements_by_type_query(date_types, "//*[@type='xs:date']")
+
+ # complexType containing xs:dateTime children
+ collect_elements_by_type_query(datetime_types, "//*[@type='xs:dateTime']")
+
+
+def parse_datetime(s):
+ m = re.match(r'(.*?)(\+|-)(\d+):(\d+)', s)
+ if m:
+ s = "".join(m.group(1, 2, 3, 4))
+ return datetime.strptime(s, '%Y-%m-%dT%H:%M:%S.%f%z')
+
+
+def _fix_xmlstring(xml_string):
+ """Possono arrivare dallo SdI URL con entity/caratteri aggiuntivi,
+ tronchiamo all'URL corretto.
+
+ Sulla sintassi, il W3.org dice:
+ In general, however, users should assume that the namespace URI is
+ simply a name, not the address of a document on the Web.
+ Tuttavia, in questo caso, non è un namespace name deciso arbitrariamente
+ dall'utente che ha generato l'XML, ma uno specifico URI,
+ http://www.w3.org/2000/09/xmldsig, perché quello è il namespace previsto
+ dalle specifiche, anche se il software dell SdI non fa la verifica
+ dell'URI.
+
+ Il controllo effettuato è che l'URI che arriva inizi per
+ http://www.w3.org/2000/09/xmldsig, e si tronca il resto.
+
+ HACK2: 0.0000000 rappresentato come 0E-7 da decimal.Decimal
+ """
+
+ # xmlns:ds="http://www.w3.org/2000/09/xmldsig#""
+ xml_string = xml_string.decode()
+ # HACK#1 - url invalido
+ xml_string = re.sub(r'xmlns:ds="http://www.w3.org/2000/09/xmldsig([^"]*)"',
+ 'xmlns:ds="http://www.w3.org/2000/09/xmldsig#"', xml_string)
+ xml_string = re.sub(r"xmlns:ds='http://www.w3.org/2000/09/xmldsig([^']*)'",
+ "xmlns:ds='http://www.w3.org/2000/09/xmldsig#'", xml_string)
+ # HACK#2 - in attesa di fix su xmlschema
+ xml_string = re.sub(r">\s*0.0000000+\s*<", ">0.00<", xml_string)
+ return xml_string.encode()
+
+
+def CreateFromDocument(xml_string):
+ # il codice seguente rimpiazza fatturapa.CreateFromDocument(xml_string)
+ class ObjectDict(object):
+ def __getattr__(self, attr):
+ try:
+ return getattr(self.__dict__, attr)
+ except AttributeError:
+ return None
+
+ def __getitem__(self, *attr, **kwattr):
+ return self.__dict__.__getitem__(*attr, **kwattr)
+
+ def __setitem__(self, *attr, **kwattr):
+ return self.__dict__.__setitem__(*attr, **kwattr)
+
+ # TODO: crearlo una tantum?
+ validator = xmlschema.XMLSchema(_xsd_schema)
+
+ xml_string = _fix_xmlstring(xml_string)
+ root = etree.fromstring(xml_string)
+
+ problems = []
+ tree = etree.ElementTree(root)
+
+ # remove timezone from type `xs:date` if any or
+ # pyxb will fail to compare with
+ for path, mandatory in date_types.items():
+ for element in root.xpath(path):
+ result = element.text.strip()
+ if len(result) > 10:
+ msg = 'removed timezone information from date only element ' \
+ '%s: %s' % (tree.getpath(element), element.text)
+ problems.append(msg)
+ element.text = result[:10]
+
+ # remove bogus dates accepted by ADE but not by python
+ for path, mandatory in datetime_types.items():
+ for element in root.xpath(path):
+ try:
+ d = parse_datetime(element.text)
+ if d < parse_datetime('1970-01-01T00:00:00.000+0000'):
+ raise ValueError
+ except Exception as e:
+ element_path = tree.getpath(element)
+ if mandatory:
+ _logger.error('element %s is invalid but is mandatory: '
+ '%s' % (element_path, element.text))
+ else:
+ element.getparent().remove(element)
+ msg = 'removed invalid dateTime element %s: %s (%s)' % (
+ element_path, element.text, e)
+ problems.append(msg)
+ _logger.warn(msg)
+
+ # fix trailing spaces in
+ for pec in root.xpath("//PECDestinatario"):
+ pec.text = pec.text.rstrip()
+
+ validat = validator.to_dict(tree, dict_class=ObjectDict)
+ setattr(validat, '_xmldoctor', problems)
+ return validat
+
+
+collect_types()
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index 9d0b8bbe5ff8..7d1af1aae05f 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -2,12 +2,12 @@
from odoo import models, api, fields
from odoo.tools.translate import _
from odoo.exceptions import UserError
-from odoo.addons.l10n_it_fatturapa.bindings import fatturapa
+from . import efattura
def get_invoice_obj(fatturapa_attachment):
xml_string = fatturapa_attachment.get_xml_string()
- return fatturapa.CreateFromDocument(xml_string)
+ return efattura.CreateFromDocument(xml_string)
class WizardLinkToInvoiceLine(models.TransientModel):
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index 4dcfd3717c70..c5dc49edac83 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1,10 +1,11 @@
import logging
+from datetime import datetime
from odoo import models, api, fields
from odoo.tools import float_is_zero
from odoo.tools.translate import _
from odoo.exceptions import UserError
-from odoo.addons.l10n_it_fatturapa.bindings import fatturapa
+from . import efattura
from odoo.addons.base_iban.models.res_partner_bank import pretty_iban
_logger = logging.getLogger(__name__)
@@ -395,7 +396,7 @@ def get_account_taxes(self, AliquotaIVA, Natura):
def get_line_product(self, line, partner):
product = None
supplier_info = self.env['product.supplierinfo']
- if len(line.CodiceArticolo) == 1:
+ if len(line.CodiceArticolo or []) == 1:
supplier_code = line.CodiceArticolo[0].CodiceValore
supplier_infos = supplier_info.search([
('product_code', '=', supplier_code),
@@ -916,7 +917,9 @@ def invoiceCreate(
e_invoice_received_date.date()
else:
e_invoice_received_date = fatturapa_attachment.create_date.date()
- e_invoice_date = FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data.date()
+
+ e_invoice_date = datetime.strptime(
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data, '%Y-%m-%d').date()
invoice_data = {
'e_invoice_received_date': e_invoice_received_date,
@@ -1027,8 +1030,9 @@ def invoiceCreate(
def set_vendor_bill_data(self, FatturaBody, invoice):
if not invoice.date_invoice:
invoice.update({
- 'date_invoice':
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data.date(),
+ 'date_invoice': datetime.strptime(
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data,
+ '%Y-%m-%d').date(),
})
if not invoice.reference:
invoice.update({
@@ -1176,7 +1180,7 @@ def set_activity_progress(self, FatturaBody, invoice_id):
def _get_last_due_date(self, DatiPagamento):
dates = []
- for PaymentLine in DatiPagamento:
+ for PaymentLine in DatiPagamento or []:
details = PaymentLine.DettaglioPagamento
if details:
for dline in details:
@@ -1438,7 +1442,7 @@ def check_invoice_amount(self, invoice, FatturaElettronicaBody):
def get_invoice_obj(self, fatturapa_attachment):
xml_string = fatturapa_attachment.get_xml_string()
- return fatturapa.CreateFromDocument(xml_string)
+ return efattura.CreateFromDocument(xml_string)
@api.multi
def importFatturaPA(self):
From 8a3598fd86a7f73f1c12785ddd9264b7e548c63d Mon Sep 17 00:00:00 2001
From: Marco Colombo
Date: Thu, 17 Dec 2020 16:19:30 +0100
Subject: [PATCH 101/155] [IMP] l10n_it_fatturapa_in: black, isort, prettier
---
l10n_it_fatturapa_in/__init__.py | 1 -
l10n_it_fatturapa_in/__manifest__.py | 46 +-
.../migrations/12.0.1.15.0/post-migration.py | 4 +-
.../migrations/12.0.2.0.0/post-migration.py | 36 +-
.../migrations/12.0.2.0.0/pre-migration.py | 26 +-
l10n_it_fatturapa_in/models/__init__.py | 1 -
l10n_it_fatturapa_in/models/account.py | 416 +++--
l10n_it_fatturapa_in/models/attachment.py | 118 +-
l10n_it_fatturapa_in/models/company.py | 67 +-
l10n_it_fatturapa_in/models/partner.py | 40 +-
l10n_it_fatturapa_in/readme/CONFIGURE.rst | 2 +-
l10n_it_fatturapa_in/security/rules.xml | 14 +-
l10n_it_fatturapa_in/tests/__init__.py | 1 -
.../tests/fatturapa_common.py | 306 ++--
.../tests/test_import_fatturapa_xml.py | 847 +++++-----
l10n_it_fatturapa_in/views/account_view.xml | 443 +++--
l10n_it_fatturapa_in/views/company_view.xml | 87 +-
l10n_it_fatturapa_in/views/partner_view.xml | 27 +-
l10n_it_fatturapa_in/wizard/__init__.py | 1 -
l10n_it_fatturapa_in/wizard/efattura.py | 75 +-
.../wizard/link_to_existing_invoice.py | 94 +-
.../wizard/link_to_existing_invoice.xml | 27 +-
.../wizard/wizard_import_fatturapa.py | 1447 ++++++++---------
.../wizard/wizard_import_fatturapa_view.xml | 20 +-
24 files changed, 2231 insertions(+), 1915 deletions(-)
diff --git a/l10n_it_fatturapa_in/__init__.py b/l10n_it_fatturapa_in/__init__.py
index 12a86766001a..0182fc47ed18 100644
--- a/l10n_it_fatturapa_in/__init__.py
+++ b/l10n_it_fatturapa_in/__init__.py
@@ -1,4 +1,3 @@
-
from . import models
from . import tests
from . import wizard
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 4cb79225af3c..6f8b249018bd 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -5,35 +5,29 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
- 'name': 'ITA - Fattura elettronica - Ricezione',
- 'version': '12.0.2.1.3',
+ "name": "ITA - Fattura elettronica - Ricezione",
+ "version": "12.0.2.1.3",
"development_status": "Beta",
- 'category': 'Localization/Italy',
- 'summary': 'Ricezione fatture elettroniche',
- 'author': 'Agile Business Group, Innoviu, '
- 'Odoo Community Association (OCA)',
- 'website': 'https://github.com/OCA/l10n-italy/tree/12.0/'
- 'l10n_it_fatturapa_in',
- 'license': 'AGPL-3',
+ "category": "Localization/Italy",
+ "summary": "Ricezione fatture elettroniche",
+ "author": "Agile Business Group, Innoviu, " "Odoo Community Association (OCA)",
+ "website": "https://github.com/OCA/l10n-italy" "l10n_it_fatturapa_in",
+ "license": "AGPL-3",
"depends": [
- 'l10n_it_fatturapa',
- 'l10n_it_withholding_tax_causali',
- ],
+ "l10n_it_fatturapa",
+ "l10n_it_withholding_tax_causali",
+ ],
"data": [
- 'views/account_view.xml',
- 'views/partner_view.xml',
- 'wizard/wizard_import_fatturapa_view.xml',
- 'wizard/link_to_existing_invoice.xml',
- 'views/company_view.xml',
- 'security/ir.model.access.csv',
- 'security/rules.xml',
+ "views/account_view.xml",
+ "views/partner_view.xml",
+ "wizard/wizard_import_fatturapa_view.xml",
+ "wizard/link_to_existing_invoice.xml",
+ "views/company_view.xml",
+ "security/ir.model.access.csv",
+ "security/rules.xml",
],
"installable": True,
- 'external_dependencies': {
- 'python': [
- 'elementpath',
- 'xmlschema',
- 'asn1crypto'
- ],
- }
+ "external_dependencies": {
+ "python": ["elementpath", "xmlschema", "asn1crypto"],
+ },
}
diff --git a/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
index 58573b763ac1..d5df47ab78ed 100644
--- a/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
+++ b/l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
@@ -1,4 +1,4 @@
-from odoo import api, SUPERUSER_ID
+from odoo import SUPERUSER_ID, api
def migrate(cr, version):
@@ -6,7 +6,7 @@ def migrate(cr, version):
return
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
- invoices = env['account.invoice'].search([])
+ invoices = env["account.invoice"].search([])
# in order to prevent error messages in old invoices,
# where ftpa_withholding_amount is 0
for invoice in invoices:
diff --git a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
index 864774d86616..631822f92a7d 100644
--- a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
+++ b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
@@ -10,31 +10,37 @@ def create_withholding_data_lines(env):
Create ftpa_withholding_ids from ftpa_withholding_type
and ftpa_withholding_amount
"""
- column_wht_amount = openupgrade.get_legacy_name('ftpa_withholding_amount')
- column_wht_type = openupgrade.get_legacy_name('ftpa_withholding_type')
- exists = openupgrade.column_exists(env.cr, 'account_invoice', column_wht_amount)
+ column_wht_amount = openupgrade.get_legacy_name("ftpa_withholding_amount")
+ column_wht_type = openupgrade.get_legacy_name("ftpa_withholding_type")
+ exists = openupgrade.column_exists(env.cr, "account_invoice", column_wht_amount)
mapping = {
- 'name': 'ai.{ftpa_withholding_type}'.format(
- ftpa_withholding_type=column_wht_type),
- 'invoice_id': 'ai.id',
- 'create_uid': 'ai.create_uid',
- 'create_date': 'ai.create_date',
- 'write_date': 'ai.write_date',
- 'write_uid': 'ai.write_uid',
+ "name": "ai.{ftpa_withholding_type}".format(
+ ftpa_withholding_type=column_wht_type
+ ),
+ "invoice_id": "ai.id",
+ "create_uid": "ai.create_uid",
+ "create_date": "ai.create_date",
+ "write_date": "ai.write_date",
+ "write_uid": "ai.write_uid",
}
if exists:
mapping.update(
- {'amount': 'ai.{ftpa_withholding_amount}'.format(
- ftpa_withholding_amount=column_wht_amount)})
+ {
+ "amount": "ai.{ftpa_withholding_amount}".format(
+ ftpa_withholding_amount=column_wht_amount
+ )
+ }
+ )
query = """
INSERT INTO withholding_data_line
({columns})
SELECT {values}
FROM account_invoice AS ai
WHERE ai.{ftpa_withholding_type} IS NOT NULL;""".format(
- columns=','.join(mapping.keys()),
- values=','.join(mapping.values()),
- ftpa_withholding_type=column_wht_type)
+ columns=",".join(mapping.keys()),
+ values=",".join(mapping.values()),
+ ftpa_withholding_type=column_wht_type,
+ )
openupgrade.logged_query(env.cr, sql.SQL(query))
diff --git a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
index 365897dc432c..a18e99f45f8a 100644
--- a/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
+++ b/l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
@@ -5,14 +5,20 @@
@openupgrade.migrate()
def migrate(env, version):
cr = env.cr
- if openupgrade.column_exists(env.cr, 'account_invoice', 'ftpa_withholding_amount'):
- openupgrade.copy_columns(cr, {
- 'account_invoice': [
- ('ftpa_withholding_amount', None, None),
+ if openupgrade.column_exists(env.cr, "account_invoice", "ftpa_withholding_amount"):
+ openupgrade.copy_columns(
+ cr,
+ {
+ "account_invoice": [
+ ("ftpa_withholding_amount", None, None),
+ ],
+ },
+ )
+ openupgrade.copy_columns(
+ cr,
+ {
+ "account_invoice": [
+ ("ftpa_withholding_type", None, None),
],
- })
- openupgrade.copy_columns(cr, {
- 'account_invoice': [
- ('ftpa_withholding_type', None, None),
- ],
- })
+ },
+ )
diff --git a/l10n_it_fatturapa_in/models/__init__.py b/l10n_it_fatturapa_in/models/__init__.py
index d9de15be6c73..4eca7ddaf65a 100644
--- a/l10n_it_fatturapa_in/models/__init__.py
+++ b/l10n_it_fatturapa_in/models/__init__.py
@@ -1,4 +1,3 @@
-
from . import attachment
from . import account
from . import partner
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index 350f92811955..e5a97431f61f 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -1,7 +1,7 @@
-
-from odoo import fields, models, api, _
-from odoo.exceptions import ValidationError, UserError
+from odoo import _, api, fields, models
+from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_compare
+
import odoo.addons.decimal_precision as dp
@@ -9,59 +9,70 @@ class AccountInvoice(models.Model):
_inherit = "account.invoice"
fatturapa_attachment_in_id = fields.Many2one(
- 'fatturapa.attachment.in', 'E-bill Import File',
- ondelete='restrict', copy=False)
- inconsistencies = fields.Text('Import Inconsistencies', copy=False)
+ "fatturapa.attachment.in", "E-bill Import File", ondelete="restrict", copy=False
+ )
+ inconsistencies = fields.Text("Import Inconsistencies", copy=False)
e_invoice_line_ids = fields.One2many(
- "einvoice.line", "invoice_id", string="Lines Detail",
- readonly=True, copy=False)
+ "einvoice.line", "invoice_id", string="Lines Detail", readonly=True, copy=False
+ )
e_invoice_amount_untaxed = fields.Monetary(
- string='E-Invoice Untaxed Amount', readonly=True)
- e_invoice_amount_tax = fields.Monetary(string='E-Invoice Tax Amount',
- readonly=True)
- e_invoice_amount_total = fields.Monetary(string='E-Invoice Total Amount',
- readonly=True)
+ string="E-Invoice Untaxed Amount", readonly=True
+ )
+ e_invoice_amount_tax = fields.Monetary(string="E-Invoice Tax Amount", readonly=True)
+ e_invoice_amount_total = fields.Monetary(
+ string="E-Invoice Total Amount", readonly=True
+ )
e_invoice_reference = fields.Char(
- string="E-invoice vendor reference",
- readonly=True)
+ string="E-invoice vendor reference", readonly=True
+ )
- e_invoice_date_invoice = fields.Date(
- string="E-invoice date",
- readonly=True)
+ e_invoice_date_invoice = fields.Date(string="E-invoice date", readonly=True)
e_invoice_validation_error = fields.Boolean(
- compute='_compute_e_invoice_validation_error')
+ compute="_compute_e_invoice_validation_error"
+ )
e_invoice_validation_message = fields.Text(
- compute='_compute_e_invoice_validation_error')
+ compute="_compute_e_invoice_validation_error"
+ )
- e_invoice_force_validation = fields.Boolean(
- string='Force E-Invoice Validation')
+ e_invoice_force_validation = fields.Boolean(string="Force E-Invoice Validation")
- e_invoice_received_date = fields.Date(
- string='E-Bill Received Date')
+ e_invoice_received_date = fields.Date(string="E-Bill Received Date")
@api.multi
- @api.depends('invoice_line_ids.price_subtotal', 'tax_line_ids.amount',
- 'tax_line_ids.amount_rounding', 'currency_id', 'company_id',
- 'date_invoice', 'type', 'efatt_rounding')
+ @api.depends(
+ "invoice_line_ids.price_subtotal",
+ "tax_line_ids.amount",
+ "tax_line_ids.amount_rounding",
+ "currency_id",
+ "company_id",
+ "date_invoice",
+ "type",
+ "efatt_rounding",
+ )
def _compute_amount(self):
super(AccountInvoice, self)._compute_amount()
for inv in self:
if inv.efatt_rounding != 0:
inv.amount_total += inv.efatt_rounding
amount_total_company_signed = inv.amount_total
- if inv.currency_id and inv.company_id and \
- inv.currency_id != inv.company_id.currency_id:
+ if (
+ inv.currency_id
+ and inv.company_id
+ and inv.currency_id != inv.company_id.currency_id
+ ):
currency_id = inv.currency_id
amount_total_company_signed = currency_id._convert(
- inv.amount_total, inv.company_id.currency_id,
- inv.company_id, inv.date_invoice or fields.Date.today())
- sign = inv.type in ['in_refund', 'out_refund'] and -1 or 1
- inv.amount_total_company_signed = \
- amount_total_company_signed * sign
+ inv.amount_total,
+ inv.company_id.currency_id,
+ inv.company_id,
+ inv.date_invoice or fields.Date.today(),
+ )
+ sign = inv.type in ["in_refund", "out_refund"] and -1 or 1
+ inv.amount_total_company_signed = amount_total_company_signed * sign
inv.amount_total_signed = inv.amount_total * sign
@api.model
@@ -71,124 +82,155 @@ def invoice_line_move_line_get(self):
if self.efatt_rounding != 0:
if self.efatt_rounding > 0:
- arrotondamenti_account_id = self.env.user.company_id.\
- arrotondamenti_passivi_account_id
+ arrotondamenti_account_id = (
+ self.env.user.company_id.arrotondamenti_passivi_account_id
+ )
if not arrotondamenti_account_id:
- raise UserError(_("Round down account is not set "
- "in Accounting Settings"))
+ raise UserError(
+ _("Round down account is not set " "in Accounting Settings")
+ )
name = _("Rounding down")
else:
- arrotondamenti_account_id = self.env.user.company_id.\
- arrotondamenti_attivi_account_id
+ arrotondamenti_account_id = (
+ self.env.user.company_id.arrotondamenti_attivi_account_id
+ )
if not arrotondamenti_account_id:
- raise UserError(_("Round up account is not set "
- "in Accounting Settings"))
+ raise UserError(
+ _("Round up account is not set " "in Accounting Settings")
+ )
name = _("Rounding up")
- res.append({
- 'type': 'global_rounding',
- 'name': name,
- 'price_unit': self.efatt_rounding,
- 'quantity': 1,
- 'price': self.efatt_rounding,
- 'account_id': arrotondamenti_account_id.id,
- 'invoice_id': self.id,
- })
+ res.append(
+ {
+ "type": "global_rounding",
+ "name": name,
+ "price_unit": self.efatt_rounding,
+ "quantity": 1,
+ "price": self.efatt_rounding,
+ "account_id": arrotondamenti_account_id.id,
+ "invoice_id": self.id,
+ }
+ )
return res
@api.multi
def invoice_validate(self):
for invoice in self:
- if (invoice.e_invoice_validation_error and
- not invoice.e_invoice_force_validation):
+ if (
+ invoice.e_invoice_validation_error
+ and not invoice.e_invoice_force_validation
+ ):
raise ValidationError(
- _("The invoice '%s' doesn't match the related e-invoice") %
- invoice.display_name)
+ _("The invoice '%s' doesn't match the related e-invoice")
+ % invoice.display_name
+ )
return super(AccountInvoice, self).invoice_validate()
def e_inv_check_amount_untaxed(self):
- error_message = ''
- if (self.e_invoice_amount_untaxed and
- float_compare(self.amount_untaxed,
- # Using abs because odoo invoice total can't be negative,
- # while XML total can.
- # See process_negative_lines method
- abs(self.e_invoice_amount_untaxed),
- precision_rounding=self.currency_id
- .rounding) != 0):
- error_message = (
- _("Untaxed amount ({bill_amount_untaxed}) "
- "does not match with "
- "e-bill untaxed amount ({e_bill_amount_untaxed})")
- .format(
- bill_amount_untaxed=self.amount_untaxed or 0,
- e_bill_amount_untaxed=self.e_invoice_amount_untaxed
- ))
+ error_message = ""
+ if (
+ self.e_invoice_amount_untaxed
+ and float_compare(
+ self.amount_untaxed,
+ # Using abs because odoo invoice total can't be negative,
+ # while XML total can.
+ # See process_negative_lines method
+ abs(self.e_invoice_amount_untaxed),
+ precision_rounding=self.currency_id.rounding,
+ )
+ != 0
+ ):
+ error_message = _(
+ "Untaxed amount ({bill_amount_untaxed}) "
+ "does not match with "
+ "e-bill untaxed amount ({e_bill_amount_untaxed})"
+ ).format(
+ bill_amount_untaxed=self.amount_untaxed or 0,
+ e_bill_amount_untaxed=self.e_invoice_amount_untaxed,
+ )
return error_message
def e_inv_check_amount_tax(self):
- error_message = ''
- if (self.e_invoice_amount_tax and
- float_compare(self.amount_tax,
- abs(self.e_invoice_amount_tax),
- precision_rounding=self.currency_id
- .rounding) != 0):
- error_message = (
- _("Taxed amount ({bill_amount_tax}) "
- "does not match with "
- "e-bill taxed amount ({e_bill_amount_tax})")
- .format(
- bill_amount_tax=self.amount_tax or 0,
- e_bill_amount_tax=self.e_invoice_amount_tax
- ))
+ error_message = ""
+ if (
+ self.e_invoice_amount_tax
+ and float_compare(
+ self.amount_tax,
+ abs(self.e_invoice_amount_tax),
+ precision_rounding=self.currency_id.rounding,
+ )
+ != 0
+ ):
+ error_message = _(
+ "Taxed amount ({bill_amount_tax}) "
+ "does not match with "
+ "e-bill taxed amount ({e_bill_amount_tax})"
+ ).format(
+ bill_amount_tax=self.amount_tax or 0,
+ e_bill_amount_tax=self.e_invoice_amount_tax,
+ )
return error_message
def e_inv_check_amount_total(self):
- error_message = ''
- if (self.e_invoice_amount_total and
- float_compare(self.amount_total,
- abs(self.e_invoice_amount_total),
- precision_rounding=self.currency_id
- .rounding) != 0):
- error_message = (
- _("Total amount ({bill_amount_total}) "
- "does not match with "
- "e-bill total amount ({e_bill_amount_total})")
- .format(
- bill_amount_total=self.amount_total or 0,
- e_bill_amount_total=self.e_invoice_amount_total
- ))
+ error_message = ""
+ if (
+ self.e_invoice_amount_total
+ and float_compare(
+ self.amount_total,
+ abs(self.e_invoice_amount_total),
+ precision_rounding=self.currency_id.rounding,
+ )
+ != 0
+ ):
+ error_message = _(
+ "Total amount ({bill_amount_total}) "
+ "does not match with "
+ "e-bill total amount ({e_bill_amount_total})"
+ ).format(
+ bill_amount_total=self.amount_total or 0,
+ e_bill_amount_total=self.e_invoice_amount_total,
+ )
return error_message
def e_inv_dati_ritenuta(self):
- error_message = ''
+ error_message = ""
# ftpa_withholding_type is set when DatiRitenuta is set,
# withholding_tax is not set if no lines with Ritenuta = SI are found
if self.ftpa_withholding_ids and not self.withholding_tax:
- error_message += (_(
+ error_message += _(
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
"found. Please manually check Withholding tax Amount\n"
- ))
- if sum(self.ftpa_withholding_ids.mapped('amount'))\
- != self.withholding_tax_amount:
- error_message += (_(
+ )
+ if (
+ sum(self.ftpa_withholding_ids.mapped("amount"))
+ != self.withholding_tax_amount
+ ):
+ error_message += _(
"E-bill contains ImportoRitenuta %s but created invoice has got"
- " %s\n" % (
- sum(self.ftpa_withholding_ids.mapped('amount')),
- self.withholding_tax_amount
+ " %s\n"
+ % (
+ sum(self.ftpa_withholding_ids.mapped("amount")),
+ self.withholding_tax_amount,
)
- ))
+ )
return error_message
- @api.depends('type', 'state', 'fatturapa_attachment_in_id',
- 'amount_untaxed', 'amount_tax', 'amount_total',
- 'reference', 'date_invoice')
+ @api.depends(
+ "type",
+ "state",
+ "fatturapa_attachment_in_id",
+ "amount_untaxed",
+ "amount_tax",
+ "amount_total",
+ "reference",
+ "date_invoice",
+ )
def _compute_e_invoice_validation_error(self):
bills_to_check = self.filtered(
- lambda inv:
- inv.type in ['in_invoice', 'in_refund'] and
- inv.state in ['draft', 'open', 'paid'] and
- inv.fatturapa_attachment_in_id)
+ lambda inv: inv.type in ["in_invoice", "in_refund"]
+ and inv.state in ["draft", "open", "paid"]
+ and inv.fatturapa_attachment_in_id
+ )
for bill in bills_to_check:
error_messages = list()
@@ -208,33 +250,37 @@ def _compute_e_invoice_validation_error(self):
if error_message:
error_messages.append(error_message)
- if (bill.e_invoice_reference and
- bill.reference != bill.e_invoice_reference):
+ if bill.e_invoice_reference and bill.reference != bill.e_invoice_reference:
error_messages.append(
- _("Vendor reference ({bill_vendor_ref}) "
- "does not match with "
- "e-bill vendor reference ({e_bill_vendor_ref})")
- .format(
+ _(
+ "Vendor reference ({bill_vendor_ref}) "
+ "does not match with "
+ "e-bill vendor reference ({e_bill_vendor_ref})"
+ ).format(
bill_vendor_ref=bill.reference or "",
- e_bill_vendor_ref=bill.e_invoice_reference
- ))
+ e_bill_vendor_ref=bill.e_invoice_reference,
+ )
+ )
- if (bill.e_invoice_date_invoice and
- bill.e_invoice_date_invoice != bill.date_invoice):
+ if (
+ bill.e_invoice_date_invoice
+ and bill.e_invoice_date_invoice != bill.date_invoice
+ ):
error_messages.append(
- _("Invoice date ({bill_date_invoice}) "
- "does not match with "
- "e-bill invoice date ({e_bill_date_invoice})")
- .format(
+ _(
+ "Invoice date ({bill_date_invoice}) "
+ "does not match with "
+ "e-bill invoice date ({e_bill_date_invoice})"
+ ).format(
bill_date_invoice=bill.date_invoice or "",
- e_bill_date_invoice=bill.e_invoice_date_invoice
- ))
+ e_bill_date_invoice=bill.e_invoice_date_invoice,
+ )
+ )
if not error_messages:
continue
bill.e_invoice_validation_error = True
- bill.e_invoice_validation_message = \
- ",\n".join(error_messages) + "."
+ bill.e_invoice_validation_message = ",\n".join(error_messages) + "."
@api.multi
def name_get(self):
@@ -242,14 +288,15 @@ def name_get(self):
res = []
for tup in result:
invoice = self.browse(tup[0])
- if invoice.type in ('in_invoice', 'in_refund'):
- name = "%s, %s" % (tup[1], invoice.partner_id.name)
+ if invoice.type in ("in_invoice", "in_refund"):
+ name = "{}, {}".format(tup[1], invoice.partner_id.name)
if invoice.amount_total_signed:
- name += ', %s %s' % (
- invoice.amount_total_signed, invoice.currency_id.symbol
+ name += ", {} {}".format(
+ invoice.amount_total_signed,
+ invoice.currency_id.symbol,
)
if invoice.origin:
- name += ', %s' % invoice.origin
+ name += ", %s" % invoice.origin
res.append((invoice.id, name))
else:
res.append(tup)
@@ -259,7 +306,7 @@ def name_get(self):
def remove_attachment_link(self):
self.ensure_one()
self.fatturapa_attachment_in_id = False
- return {'type': 'ir.actions.client', 'tag': 'reload'}
+ return {"type": "ir.actions.client", "tag": "reload"}
@api.model
def compute_xml_amount_untaxed(self, FatturaBody):
@@ -271,8 +318,8 @@ def compute_xml_amount_untaxed(self, FatturaBody):
@api.model
def compute_xml_amount_total(self, FatturaBody, amount_untaxed, amount_tax):
rounding = float(
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento
- or 0.0)
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento or 0.0
+ )
return amount_untaxed + amount_tax + rounding
@api.model
@@ -285,21 +332,24 @@ def compute_xml_amount_tax(self, DatiRiepilogo):
def set_einvoice_data(self, fattura):
self.ensure_one()
amount_untaxed = self.compute_xml_amount_untaxed(fattura)
- amount_tax = self.compute_xml_amount_tax(
- fattura.DatiBeniServizi.DatiRiepilogo)
+ amount_tax = self.compute_xml_amount_tax(fattura.DatiBeniServizi.DatiRiepilogo)
amount_total = self.compute_xml_amount_total(
- fattura, amount_untaxed, amount_tax)
+ fattura, amount_untaxed, amount_tax
+ )
reference = fattura.DatiGenerali.DatiGeneraliDocumento.Numero
date_invoice = fields.Date.from_string(
- fattura.DatiGenerali.DatiGeneraliDocumento.Data)
-
- self.update({
- 'e_invoice_amount_untaxed': amount_untaxed,
- 'e_invoice_amount_tax': amount_tax,
- 'e_invoice_amount_total': amount_total,
- 'e_invoice_reference': reference,
- 'e_invoice_date_invoice': date_invoice,
- })
+ fattura.DatiGenerali.DatiGeneraliDocumento.Data
+ )
+
+ self.update(
+ {
+ "e_invoice_amount_untaxed": amount_untaxed,
+ "e_invoice_amount_tax": amount_tax,
+ "e_invoice_amount_total": amount_total,
+ "e_invoice_reference": reference,
+ "e_invoice_date_invoice": date_invoice,
+ }
+ )
def process_negative_lines(self):
self.ensure_one()
@@ -315,12 +365,12 @@ def process_negative_lines(self):
class FatturapaArticleCode(models.Model):
# _position = ['2.2.1.3']
_name = "fatturapa.article.code"
- _description = 'E-bill Article Code'
+ _description = "E-bill Article Code"
- name = fields.Char('Code Type')
- code_val = fields.Char('Code Value')
+ name = fields.Char("Code Type")
+ code_val = fields.Char("Code Value")
e_invoice_line_id = fields.Many2one(
- 'einvoice.line', 'Related E-bill Line', readonly=True
+ "einvoice.line", "Related E-bill Line", readonly=True
)
@@ -332,43 +382,46 @@ class AccountInvoiceLine(models.Model):
_inherit = "account.invoice.line"
fatturapa_attachment_in_id = fields.Many2one(
- 'fatturapa.attachment.in', 'E-bill Import File',
- readonly=True, related='invoice_id.fatturapa_attachment_in_id')
+ "fatturapa.attachment.in",
+ "E-bill Import File",
+ readonly=True,
+ related="invoice_id.fatturapa_attachment_in_id",
+ )
class DiscountRisePrice(models.Model):
_inherit = "discount.rise.price"
e_invoice_line_id = fields.Many2one(
- 'einvoice.line', 'Related E-bill Line', readonly=True
+ "einvoice.line", "Related E-bill Line", readonly=True
)
class EInvoiceLine(models.Model):
- _name = 'einvoice.line'
- _description = 'E-invoice line'
+ _name = "einvoice.line"
+ _description = "E-invoice line"
invoice_id = fields.Many2one(
- "account.invoice", "Bill", readonly=True, ondelete='cascade')
- line_number = fields.Integer('Line Number', readonly=True)
- service_type = fields.Char('Sale Provision Type', readonly=True)
+ "account.invoice", "Bill", readonly=True, ondelete="cascade"
+ )
+ line_number = fields.Integer("Line Number", readonly=True)
+ service_type = fields.Char("Sale Provision Type", readonly=True)
cod_article_ids = fields.One2many(
- 'fatturapa.article.code', 'e_invoice_line_id',
- 'Articles Code', readonly=True
+ "fatturapa.article.code", "e_invoice_line_id", "Articles Code", readonly=True
)
name = fields.Char("Description", readonly=True)
qty = fields.Float(
- "Quantity", readonly=True,
- digits=dp.get_precision('Product Unit of Measure')
+ "Quantity", readonly=True, digits=dp.get_precision("Product Unit of Measure")
)
uom = fields.Char("Unit of measure", readonly=True)
period_start_date = fields.Date("Period Start Date", readonly=True)
period_end_date = fields.Date("Period End Date", readonly=True)
unit_price = fields.Float(
- "Unit Price", readonly=True,
- digits=dp.get_precision('Product Price')
+ "Unit Price", readonly=True, digits=dp.get_precision("Product Price")
)
discount_rise_price_ids = fields.One2many(
- 'discount.rise.price', 'e_invoice_line_id',
- 'Discount and Supplement Details', readonly=True
+ "discount.rise.price",
+ "e_invoice_line_id",
+ "Discount and Supplement Details",
+ readonly=True,
)
total_price = fields.Float("Total Price", readonly=True)
tax_amount = fields.Float("VAT Rate", readonly=True)
@@ -376,16 +429,19 @@ class EInvoiceLine(models.Model):
tax_kind = fields.Char("Nature", readonly=True)
admin_ref = fields.Char("Administration Reference", readonly=True)
other_data_ids = fields.One2many(
- "einvoice.line.other.data", "e_invoice_line_id",
- string="Other Administrative Data", readonly=True)
+ "einvoice.line.other.data",
+ "e_invoice_line_id",
+ string="Other Administrative Data",
+ readonly=True,
+ )
class EInvoiceLineOtherData(models.Model):
- _name = 'einvoice.line.other.data'
- _description = 'E-invoice line other data'
+ _name = "einvoice.line.other.data"
+ _description = "E-invoice line other data"
e_invoice_line_id = fields.Many2one(
- 'einvoice.line', 'Related E-bill Line', readonly=True
+ "einvoice.line", "Related E-bill Line", readonly=True
)
name = fields.Char("Data Type", readonly=True)
text_ref = fields.Char("Text Reference", readonly=True)
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 2751c788f4ee..0125d3bf6f18 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -1,54 +1,65 @@
-
import base64
-from odoo import fields, models, api, _
+
+from odoo import _, api, fields, models
from odoo.tools import format_date
class FatturaPAAttachmentIn(models.Model):
_name = "fatturapa.attachment.in"
_description = "E-bill import file"
- _inherits = {'ir.attachment': 'ir_attachment_id'}
- _inherit = ['mail.thread']
- _order = 'id desc'
+ _inherits = {"ir.attachment": "ir_attachment_id"}
+ _inherit = ["mail.thread"]
+ _order = "id desc"
ir_attachment_id = fields.Many2one(
- 'ir.attachment', 'Attachment', required=True, ondelete="cascade")
+ "ir.attachment", "Attachment", required=True, ondelete="cascade"
+ )
att_name = fields.Char(
- string="E-bill file name",
- related='ir_attachment_id.name',
- store=True)
+ string="E-bill file name", related="ir_attachment_id.name", store=True
+ )
in_invoice_ids = fields.One2many(
- 'account.invoice', 'fatturapa_attachment_in_id',
- string="In Bills", readonly=True)
+ "account.invoice",
+ "fatturapa_attachment_in_id",
+ string="In Bills",
+ readonly=True,
+ )
xml_supplier_id = fields.Many2one(
- "res.partner", string="Supplier", compute="_compute_xml_data",
- store=True)
+ "res.partner", string="Supplier", compute="_compute_xml_data", store=True
+ )
invoices_number = fields.Integer(
- "Bills Number", compute="_compute_xml_data", store=True)
+ "Bills Number", compute="_compute_xml_data", store=True
+ )
invoices_total = fields.Float(
- "Bills Total", compute="_compute_xml_data", store=True,
+ "Bills Total",
+ compute="_compute_xml_data",
+ store=True,
help="If specified by supplier, total amount of the document net of "
- "any discount and including tax charged to the buyer/ordered"
+ "any discount and including tax charged to the buyer/ordered",
)
invoices_date = fields.Char(
- string="Invoices date", compute="_compute_xml_data", store=True)
- registered = fields.Boolean(
- "Registered", compute="_compute_registered", store=True)
+ string="Invoices date", compute="_compute_xml_data", store=True
+ )
+ registered = fields.Boolean("Registered", compute="_compute_registered", store=True)
- e_invoice_received_date = fields.Datetime(string='E-Bill Received Date')
+ e_invoice_received_date = fields.Datetime(string="E-Bill Received Date")
e_invoice_validation_error = fields.Boolean(
- compute='_compute_e_invoice_validation_error')
+ compute="_compute_e_invoice_validation_error"
+ )
e_invoice_validation_message = fields.Text(
- compute='_compute_e_invoice_validation_error')
+ compute="_compute_e_invoice_validation_error"
+ )
- _sql_constraints = [(
- 'ftpa_attachment_in_name_uniq',
- 'unique(att_name)',
- 'The name of the e-bill file must be unique!')]
+ _sql_constraints = [
+ (
+ "ftpa_attachment_in_name_uniq",
+ "unique(att_name)",
+ "The name of the e-bill file must be unique!",
+ )
+ ]
- @api.depends('in_invoice_ids.e_invoice_validation_error')
+ @api.depends("in_invoice_ids.e_invoice_validation_error")
def _compute_e_invoice_validation_error(self):
for att in self:
bills_with_error = att.in_invoice_ids.filtered(
@@ -62,11 +73,12 @@ def _compute_e_invoice_validation_error(self):
for bill in bills_with_error:
error_messages.append(
errors_message_template.format(
- bill=bill.display_name,
- errors=bill.e_invoice_validation_message))
+ bill=bill.display_name, errors=bill.e_invoice_validation_message
+ )
+ )
att.e_invoice_validation_message = "\n\n".join(error_messages)
- @api.onchange('datas_fname')
+ @api.onchange("datas_fname")
def onchagne_datas_fname(self):
self.name = self.datas_fname
@@ -74,11 +86,12 @@ def get_xml_string(self):
return self.ir_attachment_id.get_xml_string()
@api.multi
- @api.depends('ir_attachment_id.datas')
+ @api.depends("ir_attachment_id.datas")
def _compute_xml_data(self):
for att in self:
- wiz_obj = self.env['wizard.import.fatturapa'] \
- .with_context(from_attachment=att)
+ wiz_obj = self.env["wizard.import.fatturapa"].with_context(
+ from_attachment=att
+ )
fatt = wiz_obj.get_invoice_obj(att)
cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
partner_id = wiz_obj.getCedPrest(cedentePrestatore)
@@ -87,32 +100,29 @@ def _compute_xml_data(self):
att.invoices_total = 0
invoices_date = []
for invoice_body in fatt.FatturaElettronicaBody:
- att.invoices_total += float(
- invoice_body.DatiGenerali.DatiGeneraliDocumento.
- ImportoTotaleDocumento or 0
- )
+ dgd = invoice_body.DatiGenerali.DatiGeneraliDocumento
+ att.invoices_total += float(dgd.ImportoTotaleDocumento or 0)
invoice_date = format_date(
- att.with_context(
- lang=att.env.user.lang).env, fields.Date.from_string(
- invoice_body.DatiGenerali.DatiGeneraliDocumento.Data))
+ att.with_context(lang=att.env.user.lang).env,
+ fields.Date.from_string(
+ dgd.DatiGenerali.DatiGeneraliDocumento.Data
+ ),
+ )
if invoice_date not in invoices_date:
invoices_date.append(invoice_date)
- att.invoices_date = ' '.join(invoices_date)
+ att.invoices_date = " ".join(invoices_date)
@api.multi
- @api.depends('in_invoice_ids')
+ @api.depends("in_invoice_ids")
def _compute_registered(self):
for att in self:
- if (
- att.in_invoice_ids and
- len(att.in_invoice_ids) == att.invoices_number
- ):
+ if att.in_invoice_ids and len(att.in_invoice_ids) == att.invoices_number:
att.registered = True
else:
att.registered = False
def extract_attachments(self, AttachmentsData, invoice_id):
- AttachModel = self.env['fatturapa.attachments']
+ AttachModel = self.env["fatturapa.attachments"]
for attach in AttachmentsData:
if not attach.NomeAttachment:
name = _("Attachment without name")
@@ -120,12 +130,12 @@ def extract_attachments(self, AttachmentsData, invoice_id):
name = attach.NomeAttachment
content = attach.Attachment.encode()
_attach_dict = {
- 'name': name,
- 'datas': base64.b64encode(content),
- 'datas_fname': name,
- 'description': attach.DescrizioneAttachment or '',
- 'compression': attach.AlgoritmoCompressione or '',
- 'format': attach.FormatoAttachment or '',
- 'invoice_id': invoice_id,
+ "name": name,
+ "datas": base64.b64encode(content),
+ "datas_fname": name,
+ "description": attach.DescrizioneAttachment or "",
+ "compression": attach.AlgoritmoCompressione or "",
+ "format": attach.FormatoAttachment or "",
+ "invoice_id": invoice_id,
}
AttachModel.create(_attach_dict)
diff --git a/l10n_it_fatturapa_in/models/company.py b/l10n_it_fatturapa_in/models/company.py
index 5054eee3075c..a25218af7459 100644
--- a/l10n_it_fatturapa_in/models/company.py
+++ b/l10n_it_fatturapa_in/models/company.py
@@ -1,65 +1,66 @@
-
from odoo import fields, models
class ResCompany(models.Model):
- _inherit = 'res.company'
+ _inherit = "res.company"
cassa_previdenziale_product_id = fields.Many2one(
- 'product.product', 'Welfare Fund Data Product',
- help="Product used to model DatiCassaPrevidenziale XML element "
- "on bills."
+ "product.product",
+ "Welfare Fund Data Product",
+ help="Product used to model DatiCassaPrevidenziale XML element " "on bills.",
)
sconto_maggiorazione_product_id = fields.Many2one(
- 'product.product', 'Discount Supplement Product',
- help="Product used to model ScontoMaggiorazione XML element on bills."
+ "product.product",
+ "Discount Supplement Product",
+ help="Product used to model ScontoMaggiorazione XML element on bills.",
)
arrotondamenti_attivi_account_id = fields.Many2one(
- 'account.account', 'Round Up Account',
- domain=[('deprecated', '=', False)],
- help="Account used to round up bills amount."
+ "account.account",
+ "Round Up Account",
+ domain=[("deprecated", "=", False)],
+ help="Account used to round up bills amount.",
)
arrotondamenti_passivi_account_id = fields.Many2one(
- 'account.account', 'Round Down Account',
- domain=[('deprecated', '=', False)],
- help="Account used to round down bills amount."
+ "account.account",
+ "Round Down Account",
+ domain=[("deprecated", "=", False)],
+ help="Account used to round down bills amount.",
)
arrotondamenti_tax_id = fields.Many2one(
- 'account.tax', 'Rounding Tax',
- domain=[('type_tax_use', '=', 'purchase'), ('amount', '=', 0.0)],
- help="Tax used to both round up and down bills amount."
+ "account.tax",
+ "Rounding Tax",
+ domain=[("type_tax_use", "=", "purchase"), ("amount", "=", 0.0)],
+ help="Tax used to both round up and down bills amount.",
+ )
+ in_invoice_registration_date = fields.Selection(
+ [
+ ("inv_date", "Invoice Date"),
+ ("rec_date", "Received Date"),
+ ],
+ string="Vendor invoice registration default date",
+ default="inv_date",
)
- in_invoice_registration_date = fields.Selection([
- ('inv_date', 'Invoice Date'),
- ('rec_date', 'Received Date'),
- ], string='Vendor invoice registration default date',
- default='inv_date')
class AccountConfigSettings(models.TransientModel):
- _inherit = 'res.config.settings'
+ _inherit = "res.config.settings"
cassa_previdenziale_product_id = fields.Many2one(
- related='company_id.cassa_previdenziale_product_id',
- readonly=False
+ related="company_id.cassa_previdenziale_product_id", readonly=False
)
sconto_maggiorazione_product_id = fields.Many2one(
- related='company_id.sconto_maggiorazione_product_id',
- readonly=False
+ related="company_id.sconto_maggiorazione_product_id", readonly=False
)
arrotondamenti_attivi_account_id = fields.Many2one(
- related='company_id.arrotondamenti_attivi_account_id',
- readonly=False
+ related="company_id.arrotondamenti_attivi_account_id", readonly=False
)
arrotondamenti_passivi_account_id = fields.Many2one(
- related='company_id.arrotondamenti_passivi_account_id',
- readonly=False
+ related="company_id.arrotondamenti_passivi_account_id", readonly=False
)
arrotondamenti_tax_id = fields.Many2one(
- related='company_id.arrotondamenti_tax_id',
- readonly=False
+ related="company_id.arrotondamenti_tax_id", readonly=False
)
in_invoice_registration_date = fields.Selection(
- related='company_id.in_invoice_registration_date', readonly=False
+ related="company_id.in_invoice_registration_date", readonly=False
)
diff --git a/l10n_it_fatturapa_in/models/partner.py b/l10n_it_fatturapa_in/models/partner.py
index 96bbd6c5487b..a5912f0ec657 100644
--- a/l10n_it_fatturapa_in/models/partner.py
+++ b/l10n_it_fatturapa_in/models/partner.py
@@ -1,28 +1,30 @@
-
-from odoo import models, fields
+from odoo import fields, models
class Partner(models.Model):
- _inherit = 'res.partner'
+ _inherit = "res.partner"
e_invoice_default_product_id = fields.Many2one(
- comodel_name='product.product',
- string='E-bill Default Product',
+ comodel_name="product.product",
+ string="E-bill Default Product",
help="Used by electronic invoice XML import. "
- "If filled in, generated bill lines will use this product when "
- "no other possible product is found."
+ "If filled in, generated bill lines will use this product when "
+ "no other possible product is found.",
)
- e_invoice_detail_level = fields.Selection([
- ('0', 'Minimum'),
- ('1', 'Tax Rate'),
- ('2', 'Maximum'),
- ], string="E-bills Detail Level",
+ e_invoice_detail_level = fields.Selection(
+ [
+ ("0", "Minimum"),
+ ("1", "Tax Rate"),
+ ("2", "Maximum"),
+ ],
+ string="E-bills Detail Level",
help="Minimum level: Bill is created with no lines; "
- "User will have to create them, according to what specified in "
- "the electronic bill.\n"
- "Tax rate level: Rate level: an invoice line is created for each "
- "rate present in the electronic invoice\n"
- "Maximum level: every line contained in the electronic bill "
- "will create a line in the bill.",
- default='2', required=True
+ "User will have to create them, according to what specified in "
+ "the electronic bill.\n"
+ "Tax rate level: Rate level: an invoice line is created for each "
+ "rate present in the electronic invoice\n"
+ "Maximum level: every line contained in the electronic bill "
+ "will create a line in the bill.",
+ default="2",
+ required=True,
)
diff --git a/l10n_it_fatturapa_in/readme/CONFIGURE.rst b/l10n_it_fatturapa_in/readme/CONFIGURE.rst
index 0aa2fce20989..2b412e5a29de 100644
--- a/l10n_it_fatturapa_in/readme/CONFIGURE.rst
+++ b/l10n_it_fatturapa_in/readme/CONFIGURE.rst
@@ -21,7 +21,7 @@ See also the README file of l10n_it_fatturapa module.
For every supplier, it is possible to set the 'E-bills Detail Level':
- - Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill
+ - Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill
- Maximum level: Every line contained in electronic bill will create a line in bill
Moreover, in supplier form you can set the 'E-bill Default Product': this product will be used, during generation of bills, when no other possible product is found. Tax and account of bill line will be set according to what configured in the product.
diff --git a/l10n_it_fatturapa_in/security/rules.xml b/l10n_it_fatturapa_in/security/rules.xml
index d4ee92bb4934..6d4bc882d501 100644
--- a/l10n_it_fatturapa_in/security/rules.xml
+++ b/l10n_it_fatturapa_in/security/rules.xml
@@ -1,11 +1,15 @@
-
+
- Fatturapa in fatturapa_in_multi_company_rule multi company rule
-
-
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+ Fatturapa in fatturapa_in_multi_company_rule multi company rule
+
+
+ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
diff --git a/l10n_it_fatturapa_in/tests/__init__.py b/l10n_it_fatturapa_in/tests/__init__.py
index 3c7d2e8e2e7a..04aa630c98ef 100644
--- a/l10n_it_fatturapa_in/tests/__init__.py
+++ b/l10n_it_fatturapa_in/tests/__init__.py
@@ -1,3 +1,2 @@
-
from . import fatturapa_common
from . import test_import_fatturapa_xml
diff --git a/l10n_it_fatturapa_in/tests/fatturapa_common.py b/l10n_it_fatturapa_in/tests/fatturapa_common.py
index fccf324eecf1..74a5a2a5bf08 100644
--- a/l10n_it_fatturapa_in/tests/fatturapa_common.py
+++ b/l10n_it_fatturapa_in/tests/fatturapa_common.py
@@ -1,179 +1,231 @@
import base64
import tempfile
+
from odoo.modules import get_module_resource
from odoo.tests.common import SingleTransactionCase
class FatturapaCommon(SingleTransactionCase):
-
def getFile(self, filename, module_name=None):
if module_name is None:
- module_name = 'l10n_it_fatturapa_in'
- path = get_module_resource(module_name, 'tests', 'data', filename)
- with open(path, 'rb') as test_data:
+ module_name = "l10n_it_fatturapa_in"
+ path = get_module_resource(module_name, "tests", "data", filename)
+ with open(path, "rb") as test_data:
with tempfile.TemporaryFile() as out:
base64.encode(test_data, out)
out.seek(0)
return path, out.read()
def create_wt(self):
- return self.env['withholding.tax'].create({
- 'name': '1040',
- 'code': '1040',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 20.0})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.a').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "1040",
+ "code": "1040",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 20.0})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.a").id,
+ }
+ )
def create_wt_23_20(self):
- return self.env['withholding.tax'].create({
- 'name': '2320',
- 'code': '2320',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 23.0, 'base': 0.2})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.a').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "2320",
+ "code": "2320",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 23.0, "base": 0.2})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.a").id,
+ }
+ )
def create_wt_23_50(self):
- return self.env['withholding.tax'].create({
- 'name': '2320',
- 'code': '2320',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 23.0, 'base': 0.5})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.a').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "2320",
+ "code": "2320",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 23.0, "base": 0.5})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.a").id,
+ }
+ )
def create_wt_26_20q(self):
- return self.env['withholding.tax'].create({
- 'name': '2620q',
- 'code': '2620q',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 26.0, 'base': 0.2})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.q').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "2620q",
+ "code": "2620q",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 26.0, "base": 0.2})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.q").id,
+ }
+ )
def create_wt_26_40q(self):
- return self.env['withholding.tax'].create({
- 'name': '2640q',
- 'code': '2640q',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 26.0, 'base': 0.4})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.q').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "2640q",
+ "code": "2640q",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 26.0, "base": 0.4})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.q").id,
+ }
+ )
def create_wt_27_20q(self):
- return self.env['withholding.tax'].create({
- 'name': '2720q',
- 'code': '2720q',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 27.0, 'base': 0.2})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.q').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "2720q",
+ "code": "2720q",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 27.0, "base": 0.2})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.q").id,
+ }
+ )
def create_wt_4q(self):
- return self.env['withholding.tax'].create({
- 'name': '4q',
- 'code': '4q',
- 'wt_types': 'enasarco',
- 'account_receivable_id': self.payable_account_id,
- 'account_payable_id': self.payable_account_id,
- 'payment_term': self.env.ref('account.account_payment_term').id,
- 'rate_ids': [(0, 0, {'tax': 4.0, 'base': 1.0})],
- 'causale_pagamento_id':
- self.env.ref('l10n_it_causali_pagamento.q').id,
- })
+ return self.env["withholding.tax"].create(
+ {
+ "name": "4q",
+ "code": "4q",
+ "wt_types": "enasarco",
+ "account_receivable_id": self.payable_account_id,
+ "account_payable_id": self.payable_account_id,
+ "payment_term": self.env.ref("account.account_payment_term").id,
+ "rate_ids": [(0, 0, {"tax": 4.0, "base": 1.0})],
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.q").id,
+ }
+ )
def create_res_bank(self):
- return self.env['res.bank'].create({
- 'name': 'Banca generica',
- 'bic': 'BCITITMM',
- })
+ return self.env["res.bank"].create(
+ {
+ "name": "Banca generica",
+ "bic": "BCITITMM",
+ }
+ )
- def run_wizard(self, name, file_name, datas_fname=None,
- mode='import', wiz_values=None, module_name=None):
+ def run_wizard(
+ self,
+ name,
+ file_name,
+ datas_fname=None,
+ mode="import",
+ wiz_values=None,
+ module_name=None,
+ ):
if module_name is None:
- module_name = 'l10n_it_fatturapa_in'
+ module_name = "l10n_it_fatturapa_in"
if datas_fname is None:
datas_fname = file_name
attach_id = self.attach_model.create(
{
- 'name': name,
- 'datas': self.getFile(file_name, module_name=module_name)[1],
- 'datas_fname': datas_fname
- }).id
- if mode == 'import':
+ "name": name,
+ "datas": self.getFile(file_name, module_name=module_name)[1],
+ "datas_fname": datas_fname,
+ }
+ ).id
+ if mode == "import":
wizard = self.wizard_model.with_context(
- active_ids=[attach_id], active_model='fatturapa.attachment.in'
+ active_ids=[attach_id], active_model="fatturapa.attachment.in"
).create(wiz_values or {})
return wizard.importFatturaPA()
- if mode == 'link':
+ if mode == "link":
wizard = self.wizard_link_model.with_context(
- active_ids=[attach_id], active_model='fatturapa.attachment.in'
+ active_ids=[attach_id], active_model="fatturapa.attachment.in"
).create(wiz_values or {})
return wizard.link()
def run_wizard_multi(self, file_name_list, module_name=None):
if module_name is None:
- module_name = 'l10n_it_fatturapa_in'
+ module_name = "l10n_it_fatturapa_in"
active_ids = []
for file_name in file_name_list:
- active_ids.append(self.attach_model.create(
- {
- 'name': file_name,
- 'datas': self.getFile(file_name, module_name)[1],
- 'datas_fname': file_name
- }).id)
- wizard = self.wizard_model.with_context(
- active_ids=active_ids).create({})
+ active_ids.append(
+ self.attach_model.create(
+ {
+ "name": file_name,
+ "datas": self.getFile(file_name, module_name)[1],
+ "datas_fname": file_name,
+ }
+ ).id
+ )
+ wizard = self.wizard_model.with_context(active_ids=active_ids).create({})
return wizard.importFatturaPA()
def setUp(self):
super(FatturapaCommon, self).setUp()
- self.wizard_model = self.env['wizard.import.fatturapa']
- self.wizard_link_model = self.env['wizard.link.to.invoice']
- self.data_model = self.env['ir.model.data']
- self.attach_model = self.env['fatturapa.attachment.in']
- self.invoice_model = self.env['account.invoice']
- self.payable_account_id = self.env['account.account'].search([
- ('user_type_id', '=', self.env.ref(
- 'account.data_account_type_payable').id)
- ], limit=1).id
- self.headphones = self.env.ref(
- 'product.product_product_7_product_template')
- self.imac = self.env.ref(
- 'product.product_product_8_product_template')
- self.service = self.env.ref('product.product_product_1')
- arrotondamenti_attivi_account_id = self.env['account.account'].\
- search([('user_type_id', '=', self.env.ref(
- 'account.data_account_type_other_income').id)], limit=1).id
- arrotondamenti_passivi_account_id = self.env['account.account'].\
- search([('user_type_id', '=', self.env.ref(
- 'account.data_account_type_direct_costs').id)], limit=1).id
- arrotondamenti_tax_id = self.env['account.tax'].search(
- [('type_tax_use', '=', 'purchase'),
- ('amount', '=', 0.0)], order='sequence', limit=1)
+ self.wizard_model = self.env["wizard.import.fatturapa"]
+ self.wizard_link_model = self.env["wizard.link.to.invoice"]
+ self.data_model = self.env["ir.model.data"]
+ self.attach_model = self.env["fatturapa.attachment.in"]
+ self.invoice_model = self.env["account.invoice"]
+ self.payable_account_id = (
+ self.env["account.account"]
+ .search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_payable").id,
+ )
+ ],
+ limit=1,
+ )
+ .id
+ )
+ self.headphones = self.env.ref("product.product_product_7_product_template")
+ self.imac = self.env.ref("product.product_product_8_product_template")
+ self.service = self.env.ref("product.product_product_1")
+ arrotondamenti_attivi_account_id = (
+ self.env["account.account"]
+ .search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_other_income").id,
+ )
+ ],
+ limit=1,
+ )
+ .id
+ )
+ arrotondamenti_passivi_account_id = (
+ self.env["account.account"]
+ .search(
+ [
+ (
+ "user_type_id",
+ "=",
+ self.env.ref("account.data_account_type_direct_costs").id,
+ )
+ ],
+ limit=1,
+ )
+ .id
+ )
+ arrotondamenti_tax_id = self.env["account.tax"].search(
+ [("type_tax_use", "=", "purchase"), ("amount", "=", 0.0)],
+ order="sequence",
+ limit=1,
+ )
self.env.user.company_id.arrotondamenti_attivi_account_id = (
- arrotondamenti_attivi_account_id)
+ arrotondamenti_attivi_account_id
+ )
self.env.user.company_id.arrotondamenti_passivi_account_id = (
- arrotondamenti_passivi_account_id)
- self.env.user.company_id.arrotondamenti_tax_id = (
- arrotondamenti_tax_id)
- self.env['res.lang'].load_lang('it_IT')
+ arrotondamenti_passivi_account_id
+ )
+ self.env.user.company_id.arrotondamenti_tax_id = arrotondamenti_tax_id
+ self.env["res.lang"].load_lang("it_IT")
diff --git a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
index 86ebbb46f5aa..d0815e773aa8 100644
--- a/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
+++ b/l10n_it_fatturapa_in/tests/test_import_fatturapa_xml.py
@@ -1,14 +1,14 @@
-from psycopg2 import IntegrityError
-
from datetime import date
+from psycopg2 import IntegrityError
+
+from odoo.exceptions import UserError
from odoo.tools import mute_logger
+
from .fatturapa_common import FatturapaCommon
-from odoo.exceptions import UserError
class TestDuplicatedAttachment(FatturapaCommon):
-
def test_duplicated_attachment(self):
"""Attachment name must be unique"""
# This test breaks the current transaction
@@ -16,37 +16,34 @@ def test_duplicated_attachment(self):
# same transaction would fail.
# Note that all the tests in TestFatturaPAXMLValidation
# are executed in the same transaction.
- self.run_wizard('test_duplicated', 'IT02780790107_11005.xml')
+ self.run_wizard("test_duplicated", "IT02780790107_11005.xml")
with self.assertRaises(IntegrityError) as ie:
- with mute_logger('odoo.sql_db'):
- self.run_wizard('test_duplicated', 'IT02780790107_11005.xml')
- self.assertEqual(ie.exception.pgcode, '23505')
+ with mute_logger("odoo.sql_db"):
+ self.run_wizard("test_duplicated", "IT02780790107_11005.xml")
+ self.assertEqual(ie.exception.pgcode, "23505")
class TestFatturaPAXMLValidation(FatturapaCommon):
-
def setUp(self):
super(TestFatturaPAXMLValidation, self).setUp()
self.wt = self.create_wt_4q()
self.wtq = self.create_wt_27_20q()
self.wt4q = self.create_wt_26_40q()
self.wt2q = self.create_wt_26_20q()
- self.invoice_model = self.env['account.invoice']
+ self.invoice_model = self.env["account.invoice"]
def test_00_xml_import(self):
- self.env.user.company_id.cassa_previdenziale_product_id = (
- self.service.id)
- res = self.run_wizard('test0', 'IT05979361218_001.xml')
- invoice_id = res.get('domain')[0][2][0]
+ self.env.user.company_id.cassa_previdenziale_product_id = self.service.id
+ res = self.run_wizard("test0", "IT05979361218_001.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.partner_id.register_code, 'TO1258B')
- self.assertEqual(
- invoice.partner_id.register_fiscalpos.code, 'RF02')
- self.assertEqual(invoice.reference, 'FT/2015/0006')
+ self.assertEqual(invoice.partner_id.register_code, "TO1258B")
+ self.assertEqual(invoice.partner_id.register_fiscalpos.code, "RF02")
+ self.assertEqual(invoice.reference, "FT/2015/0006")
self.assertEqual(invoice.amount_total, 57.00)
self.assertEqual(invoice.gross_weight, 0.00)
self.assertEqual(invoice.net_weight, 0.00)
- self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, 'N4')
+ self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, "N4")
self.assertFalse(invoice.art73)
welfare_found = False
for line in invoice.invoice_line_ids:
@@ -56,115 +53,99 @@ def test_00_xml_import(self):
self.assertTrue(welfare_found)
self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
self.assertEqual(
- invoice.e_invoice_line_ids[0].name, 'Prodotto di test al giorno')
- self.assertEqual(
- invoice.e_invoice_line_ids[0].qty, 15)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].uom, 'Giorno(i)')
- self.assertEqual(
- invoice.e_invoice_line_ids[0].unit_price, 3.6)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].total_price, 54)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].tax_amount, 0)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].tax_kind, 'N4')
+ invoice.e_invoice_line_ids[0].name, "Prodotto di test al giorno"
+ )
+ self.assertEqual(invoice.e_invoice_line_ids[0].qty, 15)
+ self.assertEqual(invoice.e_invoice_line_ids[0].uom, "Giorno(i)")
+ self.assertEqual(invoice.e_invoice_line_ids[0].unit_price, 3.6)
+ self.assertEqual(invoice.e_invoice_line_ids[0].total_price, 54)
+ self.assertEqual(invoice.e_invoice_line_ids[0].tax_amount, 0)
+ self.assertEqual(invoice.e_invoice_line_ids[0].tax_kind, "N4")
self.assertTrue(len(invoice.e_invoice_line_ids[0].other_data_ids) == 2)
self.assertEqual(
- invoice.e_invoice_line_ids[0].other_data_ids[0].text_ref,
- 'Riferimento')
+ invoice.e_invoice_line_ids[0].other_data_ids[0].text_ref, "Riferimento"
+ )
def test_01_xml_import(self):
- res = self.run_wizard('test1', 'IT02780790107_11004.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test1", "IT02780790107_11004.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, '123')
+ self.assertEqual(invoice.reference, "123")
self.assertEqual(invoice.amount_untaxed, 34.00)
self.assertEqual(invoice.amount_tax, 7.48)
+ self.assertEqual(len(invoice.invoice_line_ids[0].invoice_line_tax_ids), 1)
self.assertEqual(
- len(invoice.invoice_line_ids[0].invoice_line_tax_ids), 1)
- self.assertEqual(
- invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name,
- '22% e-bill')
- self.assertEqual(
- invoice.fatturapa_summary_ids[0].amount_untaxed, 34.00)
- self.assertEqual(
- invoice.fatturapa_summary_ids[0].amount_tax, 7.48)
- self.assertEqual(
- invoice.fatturapa_summary_ids[0].payability, 'D')
+ invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name, "22% e-bill"
+ )
+ self.assertEqual(invoice.fatturapa_summary_ids[0].amount_untaxed, 34.00)
+ self.assertEqual(invoice.fatturapa_summary_ids[0].amount_tax, 7.48)
+ self.assertEqual(invoice.fatturapa_summary_ids[0].payability, "D")
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
self.assertEqual(invoice.partner_id.street, "VIALE ROMA 543")
self.assertEqual(invoice.partner_id.state_id.code, "SS")
self.assertEqual(invoice.partner_id.country_id.code, "IT")
- self.assertEqual(
- invoice.tax_representative_id.name, "Rappresentante fiscale")
+ self.assertEqual(invoice.tax_representative_id.name, "Rappresentante fiscale")
self.assertEqual(invoice.welfare_fund_ids[0].welfare_rate_tax, 0.04)
order_related_doc = invoice.related_documents.filtered(
- lambda rd: rd.type == 'order'
+ lambda rd: rd.type == "order"
)
self.assertTrue(order_related_doc)
- self.assertEqual(order_related_doc.cig, '456def')
- self.assertEqual(order_related_doc.cup, '123abc')
- self.assertEqual(
- invoice.welfare_fund_ids[0].welfare_amount_tax, 9)
+ self.assertEqual(order_related_doc.cig, "456def")
+ self.assertEqual(order_related_doc.cup, "123abc")
+ self.assertEqual(invoice.welfare_fund_ids[0].welfare_amount_tax, 9)
self.assertFalse(invoice.welfare_fund_ids[0].welfare_taxable)
- self.assertEqual(invoice.unit_weight, 'KGM')
- self.assertEqual(invoice.ftpa_incoterms, 'DAP')
- self.assertEqual(invoice.fiscal_document_type_id.code, 'TD01')
+ self.assertEqual(invoice.unit_weight, "KGM")
+ self.assertEqual(invoice.ftpa_incoterms, "DAP")
+ self.assertEqual(invoice.fiscal_document_type_id.code, "TD01")
self.assertTrue(invoice.art73)
def test_02_xml_import(self):
- res = self.run_wizard('test02', 'IT05979361218_011.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test02", "IT05979361218_011.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.intermediary.vat, 'IT03339130126')
+ self.assertEqual(invoice.intermediary.vat, "IT03339130126")
def test_04_xml_import(self):
- res = self.run_wizard('test4', 'IT02780790107_11005.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test4", "IT02780790107_11005.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, '124')
+ self.assertEqual(invoice.reference, "124")
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
self.assertEqual(
- invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name,
- '22% e-bill')
- self.assertEqual(
- invoice.invoice_line_ids[1].invoice_line_tax_ids[0].name,
- '22% e-bill')
- self.assertEqual(
- invoice.invoice_line_ids[0].invoice_line_tax_ids[0].amount, 22)
- self.assertEqual(
- invoice.invoice_line_ids[1].invoice_line_tax_ids[0].amount, 22)
+ invoice.invoice_line_ids[0].invoice_line_tax_ids[0].name, "22% e-bill"
+ )
self.assertEqual(
- invoice.invoice_line_ids[1].price_unit, 2)
+ invoice.invoice_line_ids[1].invoice_line_tax_ids[0].name, "22% e-bill"
+ )
+ self.assertEqual(invoice.invoice_line_ids[0].invoice_line_tax_ids[0].amount, 22)
+ self.assertEqual(invoice.invoice_line_ids[1].invoice_line_tax_ids[0].amount, 22)
+ self.assertEqual(invoice.invoice_line_ids[1].price_unit, 2)
self.assertTrue(len(invoice.e_invoice_line_ids) == 2)
for e_line in invoice.e_invoice_line_ids:
self.assertTrue(e_line.line_number in (1, 2))
if e_line.line_number == 1:
- self.assertEqual(
- e_line.cod_article_ids[0].name, 'EAN')
- self.assertEqual(
- e_line.cod_article_ids[0].code_val, '12345')
+ self.assertEqual(e_line.cod_article_ids[0].name, "EAN")
+ self.assertEqual(e_line.cod_article_ids[0].code_val, "12345")
self.assertEqual(
invoice.inconsistencies,
- u"Company Name field contains 'Societa\' "
- u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n")
+ u"Company Name field contains 'Societa' "
+ u"Alpha SRL'. Your System contains 'SOCIETA' ALPHA SRL'\n\n",
+ )
def test_05_xml_import(self):
- res = self.run_wizard('test5', 'IT05979361218_003.xml')
- invoice_id = res.get('domain')[0][2][0]
- invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, 'FT/2015/0008')
- self.assertEqual(invoice.sender, 'TZ')
- self.assertEqual(invoice.intermediary.name, 'MARIO ROSSI')
- self.assertEqual(invoice.intermediary.firstname, 'MARIO')
- self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
+ res = self.run_wizard("test5", "IT05979361218_003.xml")
+ invoice_id = res.get("domain")[0][2][0]
+ invoice = self.invoice_model.browse(invoice_id)
+ self.assertEqual(invoice.reference, "FT/2015/0008")
+ self.assertEqual(invoice.sender, "TZ")
+ self.assertEqual(invoice.intermediary.name, "MARIO ROSSI")
+ self.assertEqual(invoice.intermediary.firstname, "MARIO")
+ self.assertEqual(invoice.intermediary.lastname, "ROSSI")
self.assertEqual(
- invoice.e_invoice_line_ids[0].discount_rise_price_ids[0].name,
- 'SC')
+ invoice.e_invoice_line_ids[0].discount_rise_price_ids[0].name, "SC"
+ )
self.assertEqual(
- invoice.e_invoice_line_ids[0].discount_rise_price_ids[0].
- percentage, 10
+ invoice.e_invoice_line_ids[0].discount_rise_price_ids[0].percentage, 10
)
self.assertEqual(invoice.amount_untaxed, 9)
self.assertEqual(invoice.amount_tax, 0)
@@ -172,38 +153,43 @@ def test_05_xml_import(self):
def test_06_import_except(self):
# File not exist Exception
- self.assertRaises(
- Exception, self.run_wizard, 'test6_Exception', '')
+ self.assertRaises(Exception, self.run_wizard, "test6_Exception", "")
# fake Signed file is passed , generate orm_exception
self.assertRaises(
- UserError, self.run_wizard, 'test6_orm_exception',
- 'IT05979361218_fake.xml.p7m'
+ UserError,
+ self.run_wizard,
+ "test6_orm_exception",
+ "IT05979361218_fake.xml.p7m",
)
def test_07_xml_import(self):
# 2 lines with quantity != 1 and discounts
- res = self.run_wizard('test7', 'IT05979361218_004.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test7", "IT05979361218_004.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, 'FT/2015/0009')
+ self.assertEqual(invoice.reference, "FT/2015/0009")
self.assertAlmostEqual(invoice.amount_untaxed, 1173.60)
self.assertEqual(invoice.amount_tax, 258.19)
self.assertEqual(invoice.amount_total, 1431.79)
self.assertAlmostEqual(
- invoice.e_invoice_amount_untaxed, invoice.amount_untaxed,
- places=invoice.currency_id.decimal_places)
+ invoice.e_invoice_amount_untaxed,
+ invoice.amount_untaxed,
+ places=invoice.currency_id.decimal_places,
+ )
self.assertAlmostEqual(
- invoice.e_invoice_amount_tax, invoice.amount_tax,
- places=invoice.currency_id.decimal_places)
+ invoice.e_invoice_amount_tax,
+ invoice.amount_tax,
+ places=invoice.currency_id.decimal_places,
+ )
self.assertEqual(invoice.e_invoice_validation_error, False)
- self.assertEqual(invoice.invoice_line_ids[0].admin_ref, 'D122353')
+ self.assertEqual(invoice.invoice_line_ids[0].admin_ref, "D122353")
def test_08_xml_import(self):
# using ImportoTotaleDocumento
- res = self.run_wizard('test8', 'IT05979361218_005.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test8", "IT05979361218_005.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, 'FT/2015/0010')
+ self.assertEqual(invoice.reference, "FT/2015/0010")
self.assertAlmostEqual(invoice.amount_total, 1288.61)
self.assertFalse(invoice.inconsistencies)
@@ -211,101 +197,100 @@ def test_09_xml_import(self):
# using DatiGeneraliDocumento.ScontoMaggiorazione without
# ImportoTotaleDocumento
# add test file name case sensitive
- res = self.run_wizard('test9', 'IT05979361218_006.XML')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test9", "IT05979361218_006.XML")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, 'FT/2015/0011')
+ self.assertEqual(invoice.reference, "FT/2015/0011")
self.assertAlmostEqual(invoice.amount_total, 1288.61)
self.assertEqual(
invoice.inconsistencies,
- 'Computed amount untaxed 1030.42 is different from'
- ' summary data 1173.6')
+ "Computed amount untaxed 1030.42 is different from" " summary data 1173.6",
+ )
def test_10_xml_import(self):
# Fix Date format
- res = self.run_wizard('test6', 'IT05979361218_007.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test6", "IT05979361218_007.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, 'FT/2015/0009')
- self.assertEqual(
- invoice.date_invoice, date(2015, 3, 16))
+ self.assertEqual(invoice.reference, "FT/2015/0009")
+ self.assertEqual(invoice.date_invoice, date(2015, 3, 16))
self.assertEqual(
invoice.fatturapa_payments[0].payment_methods[0].payment_due_date,
- date(2015, 6, 3)
+ date(2015, 6, 3),
)
self.assertEqual(
- invoice.fatturapa_payments[0].payment_methods[0].
- fatturapa_pm_id.code,
- 'MP18'
+ invoice.fatturapa_payments[0].payment_methods[0].fatturapa_pm_id.code,
+ "MP18",
)
def test_11_xml_import(self):
# DatiOrdineAcquisto with RiferimentoNumeroLinea referring to
# not existing invoice line
- res = self.run_wizard('test11', 'IT02780790107_11006.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test11", "IT02780790107_11006.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(
- len(invoice.invoice_line_ids[0].related_documents), 0)
- self.assertEqual(
- invoice.invoice_line_ids[0].sequence, 1)
- self.assertEqual(
- invoice.related_documents[0].type, "order")
- self.assertEqual(
- invoice.related_documents[0].lineRef, 60)
+ self.assertEqual(len(invoice.invoice_line_ids[0].related_documents), 0)
+ self.assertEqual(invoice.invoice_line_ids[0].sequence, 1)
+ self.assertEqual(invoice.related_documents[0].type, "order")
+ self.assertEqual(invoice.related_documents[0].lineRef, 60)
def test_12_xml_import(self):
- res = self.run_wizard('test12', 'IT05979361218_008.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test12", "IT05979361218_008.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, 'FT/2015/0012')
- self.assertEqual(invoice.sender, 'TZ')
- self.assertEqual(invoice.intermediary.name, 'MARIO ROSSI')
- self.assertEqual(invoice.intermediary.firstname, 'MARIO')
- self.assertEqual(invoice.intermediary.lastname, 'ROSSI')
+ self.assertEqual(invoice.reference, "FT/2015/0012")
+ self.assertEqual(invoice.sender, "TZ")
+ self.assertEqual(invoice.intermediary.name, "MARIO ROSSI")
+ self.assertEqual(invoice.intermediary.firstname, "MARIO")
+ self.assertEqual(invoice.intermediary.lastname, "ROSSI")
def test_13_xml_import(self):
# inconsistencies must not be duplicated
- res = self.run_wizard_multi([
- 'IT02780790107_11005.xml',
- 'IT02780790107_11006.xml',
- ])
- invoice1_id = res.get('domain')[0][2][0]
- invoice2_id = res.get('domain')[0][2][1]
+ res = self.run_wizard_multi(
+ [
+ "IT02780790107_11005.xml",
+ "IT02780790107_11006.xml",
+ ]
+ )
+ invoice1_id = res.get("domain")[0][2][0]
+ invoice2_id = res.get("domain")[0][2][1]
invoice1 = self.invoice_model.browse(invoice1_id)
invoice2 = self.invoice_model.browse(invoice2_id)
self.assertEqual(
invoice1.inconsistencies,
- u"Company Name field contains 'Societa\' "
- u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n")
+ u"Company Name field contains 'Societa' "
+ u"Alpha SRL'. Your System contains 'SOCIETA' ALPHA SRL'\n\n",
+ )
self.assertEqual(
invoice2.inconsistencies,
- u"Company Name field contains 'Societa\' "
- u"Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n")
+ u"Company Name field contains 'Societa' "
+ u"Alpha SRL'. Your System contains 'SOCIETA' ALPHA SRL'\n\n",
+ )
def test_14_xml_import(self):
# check: no tax code found , write inconsisteance and anyway
# create draft
- res = self.run_wizard('test14', 'IT02780790107_11007.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test14", "IT02780790107_11007.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.reference, '136')
- self.assertEqual(invoice.partner_id.name, 'SOCIETA\' ALPHA SRL')
+ self.assertEqual(invoice.reference, "136")
+ self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
self.assertEqual(invoice.amount_untaxed, 25.00)
self.assertEqual(invoice.amount_tax, 0.0)
self.assertEqual(
invoice.inconsistencies,
- u"Company Name field contains 'Societa\' "
- "Alpha SRL'. Your System contains 'SOCIETA\' ALPHA SRL'\n\n"
+ u"Company Name field contains 'Societa' "
+ "Alpha SRL'. Your System contains 'SOCIETA' ALPHA SRL'\n\n"
u"XML contains tax with percentage '15.55'"
" but it does not exist in your system\n"
"XML contains tax with percentage '15.55'"
- " but it does not exist in your system")
+ " but it does not exist in your system",
+ )
def test_15_xml_import(self):
self.wt = self.create_wt()
- res = self.run_wizard('test15', 'IT05979361218_009.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test15", "IT05979361218_009.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertAlmostEquals(invoice.withholding_tax_amount, 1)
self.assertAlmostEquals(invoice.amount_total, 6.1)
@@ -314,55 +299,55 @@ def test_15_xml_import(self):
def test_16_xml_import(self):
# file B2B downloaded from
# http://www.fatturapa.gov.it/export/fatturazione/it/a-3.htm
- res = self.run_wizard('test16a', 'IT01234567890_FPR03.xml')
- invoice_ids = res.get('domain')[0][2]
+ res = self.run_wizard("test16a", "IT01234567890_FPR03.xml")
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
for invoice in invoices:
- self.assertEqual(invoice.inconsistencies, '')
+ self.assertEqual(invoice.inconsistencies, "")
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
- self.assertTrue(invoice.reference in ('456', '123'))
- if invoice.reference == '123':
+ self.assertTrue(invoice.reference in ("456", "123"))
+ if invoice.reference == "123":
self.assertTrue(len(invoice.invoice_line_ids) == 2)
for line in invoice.invoice_line_ids:
self.assertFalse(line.product_id)
self.assertEqual(invoice.date_due, date(2015, 1, 30))
- if invoice.reference == '456':
+ if invoice.reference == "456":
self.assertTrue(len(invoice.invoice_line_ids) == 1)
for line in invoice.invoice_line_ids:
self.assertFalse(line.product_id)
self.assertEqual(invoice.date_due, date(2015, 1, 28))
partner = invoice.partner_id
- partner.e_invoice_default_product_id = (
- self.imac.product_variant_ids[0].id)
+ partner.e_invoice_default_product_id = self.imac.product_variant_ids[0].id
# I create a supplier code to be matched in XML
- self.env['product.supplierinfo'].create({
- 'name': partner.id,
- 'product_tmpl_id': self.headphones.id,
- 'product_code': 'ART123',
- })
- res = self.run_wizard('test16b', 'IT01234567890_FPR03.xml')
- invoice_ids = res.get('domain')[0][2]
+ self.env["product.supplierinfo"].create(
+ {
+ "name": partner.id,
+ "product_tmpl_id": self.headphones.id,
+ "product_code": "ART123",
+ }
+ )
+ res = self.run_wizard("test16b", "IT01234567890_FPR03.xml")
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
for invoice in invoices:
- self.assertTrue(invoice.reference in ('456', '123'))
- if invoice.reference == '123':
+ self.assertTrue(invoice.reference in ("456", "123"))
+ if invoice.reference == "123":
self.assertEqual(
invoice.invoice_line_ids[0].product_id.id,
- self.headphones.product_variant_ids[0].id
+ self.headphones.product_variant_ids[0].id,
)
else:
for line in invoice.invoice_line_ids:
self.assertEqual(
- line.product_id.id,
- self.imac.product_variant_ids[0].id
+ line.product_id.id, self.imac.product_variant_ids[0].id
)
# change Livello di dettaglio Fatture elettroniche to Minimo
- partner.e_invoice_detail_level = '0'
- res = self.run_wizard('test16c', 'IT01234567890_FPR03.xml')
- invoice_ids = res.get('domain')[0][2]
+ partner.e_invoice_detail_level = "0"
+ res = self.run_wizard("test16c", "IT01234567890_FPR03.xml")
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertTrue(len(invoices) == 2)
for invoice in invoices:
@@ -370,120 +355,127 @@ def test_16_xml_import(self):
def test_03_xml_import(self):
# Testing CAdES signature
- res = self.run_wizard('test18', 'IT01234567890_FPR03.xml.p7m')
- invoice_ids = res.get('domain')[0][2]
+ res = self.run_wizard("test18", "IT01234567890_FPR03.xml.p7m")
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
for invoice in invoices:
- self.assertEqual(invoice.inconsistencies, '')
+ self.assertEqual(invoice.inconsistencies, "")
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
- self.assertTrue(invoice.reference in ('456', '123'))
- if invoice.reference == '123':
+ self.assertTrue(invoice.reference in ("456", "123"))
+ if invoice.reference == "123":
self.assertTrue(len(invoice.invoice_line_ids) == 2)
- if invoice.reference == '456':
+ if invoice.reference == "456":
self.assertTrue(len(invoice.invoice_line_ids) == 1)
def test_17_xml_import(self):
- res = self.run_wizard('test17', 'IT05979361218_010.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test17", "IT05979361218_010.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(
- invoice.related_documents[0].type, "invoice")
+ self.assertEqual(invoice.related_documents[0].type, "invoice")
def test_19_xml_import(self):
# Testing CAdES signature, base64 encoded
res = self.run_wizard(
- 'test19', 'IT01234567890_FPR03.base64.xml.p7m',
- 'IT01234567890_FPR03.xml.p7m')
- invoice_ids = res.get('domain')[0][2]
+ "test19",
+ "IT01234567890_FPR03.base64.xml.p7m",
+ "IT01234567890_FPR03.xml.p7m",
+ )
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
for invoice in invoices:
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
- self.assertEqual(invoice.partner_id.e_invoice_detail_level, '0')
- self.assertTrue(invoice.reference in ('456', '123'))
- if invoice.reference == '123':
+ self.assertEqual(invoice.partner_id.e_invoice_detail_level, "0")
+ self.assertTrue(invoice.reference in ("456", "123"))
+ if invoice.reference == "123":
self.assertEqual(
invoice.inconsistencies,
- 'Computed amount untaxed 0.0 is different from summary '
- 'data 25.0')
- if invoice.reference == '456':
+ "Computed amount untaxed 0.0 is different from summary "
+ "data 25.0",
+ )
+ if invoice.reference == "456":
self.assertEqual(
invoice.inconsistencies,
- 'Computed amount untaxed 0.0 is different from summary '
- 'data 2000.0')
+ "Computed amount untaxed 0.0 is different from summary "
+ "data 2000.0",
+ )
def test_20_xml_import(self):
# Testing xml without xml declaration (sent by Amazon)
- res = self.run_wizard('test20', 'IT05979361218_no_decl.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test20", "IT05979361218_no_decl.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
def test_21_xml_import(self):
- supplier = self.env['res.partner'].search(
- [('vat', '=', 'IT02780790107')])[0]
+ supplier = self.env["res.partner"].search([("vat", "=", "IT02780790107")])[0]
# in order to make the system create the invoice lines
- supplier.e_invoice_detail_level = '2'
- res = self.run_wizard('test21', 'IT01234567890_FPR04.xml')
- invoice_id = res.get('domain')[0][2][0]
+ supplier.e_invoice_detail_level = "2"
+ res = self.run_wizard("test21", "IT01234567890_FPR04.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.inconsistencies, '')
+ self.assertEqual(invoice.inconsistencies, "")
self.assertEqual(invoice.invoice_line_ids[2].price_unit, 0.0)
self.assertEqual(invoice.invoice_line_ids[2].discount, 0.0)
def test_22_xml_import(self):
- res = self.run_wizard('test22', 'IT02780790107_11004_xml_doctor.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test22", "IT02780790107_11004_xml_doctor.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
- self.assertIn('removed timezone information', invoice.inconsistencies)
+ self.assertIn("removed timezone information", invoice.inconsistencies)
# DatiGeneraliDocumento/Causale
- self.assertIn(' ', invoice.comment)
+ self.assertIn(" ", invoice.comment)
# DatiGeneraliDocumento/Data
self.assertEqual(invoice.date_invoice, date(2014, 12, 18))
# DatiTrasporto/IndirizzoResa/NumeroCivico
- self.assertEqual(invoice.delivery_address,
- 'strada dei test, \n12042 - Bra\nCN IT')
+ self.assertEqual(
+ invoice.delivery_address, "strada dei test, \n12042 - Bra\nCN IT"
+ )
# DatiTrasporto/DataOraConsegna
self.assertFalse(invoice.delivery_datetime)
# DatiBeniServizi/DettaglioLinee/Descrizione
- self.assertEqual(invoice.invoice_line_ids[0].name, ' ')
+ self.assertEqual(invoice.invoice_line_ids[0].name, " ")
# DatiPagamento/DettaglioPagamento/DataDecorrenzaPenale
- payment_data = self.env['fatturapa.payment.data'].search(
- [('invoice_id', '=', invoice.id)])
- self.assertEqual(payment_data[0].payment_methods[0].penalty_date,
- date(2015, 5, 1))
+ payment_data = self.env["fatturapa.payment.data"].search(
+ [("invoice_id", "=", invoice.id)]
+ )
+ self.assertEqual(
+ payment_data[0].payment_methods[0].penalty_date, date(2015, 5, 1)
+ )
def test_23_xml_import(self):
# Testing CAdES signature, base64 encoded with newlines
res = self.run_wizard(
- 'test23', 'IT01234567890_FPR04.base64.xml.p7m',
- 'IT01234567890_FPR04.xml.p7m')
- invoice_ids = res.get('domain')[0][2]
+ "test23",
+ "IT01234567890_FPR04.base64.xml.p7m",
+ "IT01234567890_FPR04.xml.p7m",
+ )
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
def test_24_xml_import(self):
- res = self.run_wizard('test24', 'IT05979361218_012.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test24", "IT05979361218_012.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(
invoice.inconsistencies,
- 'Computed amount untaxed 34.32 is different from'
- ' summary data 34.67')
+ "Computed amount untaxed 34.32 is different from" " summary data 34.67",
+ )
def test_25_xml_import(self):
- res = self.run_wizard('test25', 'IT05979361218_013.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test25", "IT05979361218_013.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.67)
self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
@@ -492,39 +484,42 @@ def test_25_xml_import(self):
invoice.action_invoice_open()
move_line = False
for line in invoice.move_id.line_ids:
- if line.account_id.id == self.env.user.\
- company_id.arrotondamenti_attivi_account_id.id:
+ if (
+ line.account_id.id
+ == self.env.user.company_id.arrotondamenti_attivi_account_id.id
+ ):
move_line = True
self.assertTrue(move_line)
def test_26_xml_import(self):
- res = self.run_wizard('test26', 'IT05979361218_015.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test26", "IT05979361218_015.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertAlmostEqual(invoice.e_invoice_amount_untaxed, 34.32)
self.assertEqual(invoice.e_invoice_amount_tax, 0.0)
self.assertEqual(invoice.e_invoice_amount_total, 34.32)
def test_30_xml_import(self):
- self.env.user.company_id.cassa_previdenziale_product_id = (
- self.service.id)
- res = self.run_wizard('test30', 'IT05979361218_001.xml')
- invoice_id = res.get('domain')[0][2][0]
+ self.env.user.company_id.cassa_previdenziale_product_id = self.service.id
+ res = self.run_wizard("test30", "IT05979361218_001.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
partner_id = invoice.partner_id
- partner_id.write({
- 'street': 'Viale Repubblica, 34',
- 'electronic_invoice_no_contact_update': True,
- })
- res = self.run_wizard('test30a', 'IT05979361218_002.xml')
- invoice_id = res.get('domain')[0][2][0]
+ partner_id.write(
+ {
+ "street": "Viale Repubblica, 34",
+ "electronic_invoice_no_contact_update": True,
+ }
+ )
+ res = self.run_wizard("test30a", "IT05979361218_002.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id.id, partner_id.id)
- self.assertEqual(invoice.partner_id.street, 'Viale Repubblica, 34')
+ self.assertEqual(invoice.partner_id.street, "Viale Repubblica, 34")
def test_31_xml_import(self):
- res = self.run_wizard('test31', 'IT01234567890_FPR05.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test31", "IT01234567890_FPR05.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.invoice_line_ids[1].discount, 100)
self.assertEqual(invoice.invoice_line_ids[1].price_subtotal, 0)
@@ -532,10 +527,10 @@ def test_31_xml_import(self):
def test_32_xml_import(self):
# Refund with positive total
- res = self.run_wizard('test32', 'IT01234567890_FPR06.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test32", "IT01234567890_FPR06.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.type, 'in_refund')
+ self.assertEqual(invoice.type, "in_refund")
self.assertEqual(invoice.amount_total, 18.3)
self.assertEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 10.0)
@@ -546,10 +541,10 @@ def test_32_xml_import(self):
def test_33_xml_import(self):
# Refund with negative total
- res = self.run_wizard('test33', 'IT01234567890_FPR07.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test33", "IT01234567890_FPR07.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.type, 'in_refund')
+ self.assertEqual(invoice.type, "in_refund")
self.assertEqual(invoice.amount_total, 24.4)
self.assertEqual(invoice.invoice_line_ids[0].price_unit, 2.0)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 10.0)
@@ -559,15 +554,15 @@ def test_33_xml_import(self):
def test_34_xml_import(self):
# No Ritenuta lines set
- res = self.run_wizard('test34', 'IT01234567890_FPR08.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test34", "IT01234567890_FPR08.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(invoice.e_invoice_validation_error)
self.assertEqual(
invoice.e_invoice_validation_message,
"E-bill contains DatiRitenuta but no lines subjected to Ritenuta was "
"found. Please manually check Withholding tax Amount\nE-bill contains "
- "ImportoRitenuta 360.0 but created invoice has got 0.0\n."
+ "ImportoRitenuta 360.0 but created invoice has got 0.0\n.",
)
def test_35_xml_import(self):
@@ -575,62 +570,65 @@ def test_35_xml_import(self):
# contains 2320: error message must appear
self.create_wt_23_50()
self.create_wt_23_20()
- res = self.run_wizard('test35', 'IT01234567890_FPR09.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test35", "IT01234567890_FPR09.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(invoice.e_invoice_validation_error)
self.assertEqual(
invoice.e_invoice_validation_message,
"E-bill contains ImportoRitenuta 30.16 but created invoice has got "
- "75.41\n."
+ "75.41\n.",
)
def test_36_xml_import(self):
# creating a res.bank and importing an XML without "IstitutoFinanziario"
self.create_res_bank()
- res = self.run_wizard('test36', 'IT01234567890_FPR10.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test36", "IT01234567890_FPR10.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(
invoice.fatturapa_payments[0].payment_methods[0].payment_bank.bank_id.bic,
- 'BCITITMM')
+ "BCITITMM",
+ )
self.assertEqual(
invoice.fatturapa_payments[0].payment_methods[0].payment_bank.bank_id.name,
- 'Banca generica')
+ "Banca generica",
+ )
def test_37_xml_import_dates(self):
- self.env.user.lang = 'it_IT'
- res = self.run_wizard('test37', 'IT02780790107_11004.xml')
- invoice_id = res.get('domain')[0][2][0]
+ self.env.user.lang = "it_IT"
+ res = self.run_wizard("test37", "IT02780790107_11004.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
- self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date,
- '18/12/2014')
+ self.assertEqual(invoice.fatturapa_attachment_in_id.invoices_date, "18/12/2014")
def test_38_xml_import_dates(self):
# file B2B downloaded from
# http://www.fatturapa.gov.it/export/fatturazione/it/a-3.htm
- self.env.user.lang = 'it_IT'
- res = self.run_wizard('test38', 'IT01234567890_FPR03.xml')
- invoice_ids = res.get('domain')[0][2]
+ self.env.user.lang = "it_IT"
+ res = self.run_wizard("test38", "IT01234567890_FPR03.xml")
+ invoice_ids = res.get("domain")[0][2]
invoices = self.invoice_model.browse(invoice_ids)
self.assertEqual(len(invoices), 2)
- self.assertEqual(invoices[0].fatturapa_attachment_in_id.invoices_date,
- '18/12/2014 20/12/2014')
+ self.assertEqual(
+ invoices[0].fatturapa_attachment_in_id.invoices_date,
+ "18/12/2014 20/12/2014",
+ )
def test_40_xml_import_withholding(self):
- res = self.run_wizard('test40', 'IT01234567890_FPR11.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test40", "IT01234567890_FPR11.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(invoice.e_invoice_validation_error)
self.assertEqual(
invoice.e_invoice_validation_message,
"E-bill contains ImportoRitenuta 92.0 but created invoice has got "
- "144.0\n."
+ "144.0\n.",
)
def test_41_xml_import_withholding(self):
- res = self.run_wizard('test41', 'IT01234567890_FPR12.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test41", "IT01234567890_FPR12.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(len(invoice.ftpa_withholding_ids), 2)
self.assertAlmostEquals(invoice.amount_total, 1220.0)
@@ -639,8 +637,8 @@ def test_41_xml_import_withholding(self):
def test_42_xml_import_withholding(self):
# cassa previdenziale sulla quale è applicata la ritenuta
- res = self.run_wizard('test42', 'IT01234567890_FPR13.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test42", "IT01234567890_FPR13.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.amount_total, 19032.0)
self.assertEqual(invoice.withholding_tax_amount, 3120.0)
@@ -651,22 +649,22 @@ def test_42_xml_import_withholding(self):
def test_43_xml_import_withholding(self):
# Avvocato Mario Bianchi di Ferrara.
# Imponibile di 100+15% spese
- res = self.run_wizard('test43', 'ITBNCMRA80A01D548T_20001.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test43", "ITBNCMRA80A01D548T_20001.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.withholding_tax_amount, 23.0)
self.assertTrue(len(invoice.ftpa_withholding_ids), 1)
self.assertTrue(len(invoice.invoice_line_ids) == 3)
def test_44_xml_import(self):
- res = self.run_wizard('test44', 'ITBNCMRA80A01D548T_20005.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test44", "ITBNCMRA80A01D548T_20005.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(len(invoice.invoice_line_ids) == 3)
def test_45_xml_many_zeros(self):
- res = self.run_wizard('test45', 'IT05979361218_016.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test45", "IT05979361218_016.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.amount_total, 18.07)
self.assertEqual(invoice.invoice_line_ids[0].price_unit, 18.07)
@@ -682,31 +680,34 @@ def test_01_xml_link(self):
Vendor Reference and Invoice Date are kept.
"""
- supplier = self.env['res.partner'].search(
- [('vat', '=', 'IT02780790107')], limit=1)
+ supplier = self.env["res.partner"].search(
+ [("vat", "=", "IT02780790107")], limit=1
+ )
invoice_values = {
- 'partner_id': supplier.id,
- 'type': 'in_invoice',
- 'reference': 'original_ref',
- 'date_invoice': date(2020, 1, 1),
+ "partner_id": supplier.id,
+ "type": "in_invoice",
+ "reference": "original_ref",
+ "date_invoice": date(2020, 1, 1),
}
orig_invoice = self.invoice_model.create(invoice_values)
wiz_values = {
- 'line_ids': [(0, 0, {
- 'invoice_id': orig_invoice.id
- })],
+ "line_ids": [(0, 0, {"invoice_id": orig_invoice.id})],
}
- self.run_wizard('test_link_01', 'IT01234567890_FPR04.xml',
- mode='link', wiz_values=wiz_values)
+ self.run_wizard(
+ "test_link_01",
+ "IT01234567890_FPR04.xml",
+ mode="link",
+ wiz_values=wiz_values,
+ )
self.assertTrue(orig_invoice.e_invoice_line_ids)
self.assertFalse(orig_invoice.invoice_line_ids)
self.assertTrue(orig_invoice.e_invoice_validation_error)
self.assertEqual(
- invoice_values['reference'],
+ invoice_values["reference"],
orig_invoice.reference,
)
self.assertEqual(
- invoice_values['date_invoice'],
+ invoice_values["date_invoice"],
orig_invoice.date_invoice,
)
@@ -716,20 +717,23 @@ def test_02_xml_link(self):
Vendor Reference and Invoice Date are fetched from the XML.
"""
- supplier = self.env['res.partner'].search(
- [('vat', '=', 'IT02780790107')], limit=1)
+ supplier = self.env["res.partner"].search(
+ [("vat", "=", "IT02780790107")], limit=1
+ )
invoice_values = {
- 'partner_id': supplier.id,
- 'type': 'in_invoice',
+ "partner_id": supplier.id,
+ "type": "in_invoice",
}
orig_invoice = self.invoice_model.create(invoice_values)
wiz_values = {
- 'line_ids': [(0, 0, {
- 'invoice_id': orig_invoice.id
- })],
+ "line_ids": [(0, 0, {"invoice_id": orig_invoice.id})],
}
- self.run_wizard('test_link_02', 'IT02780790107_11004.xml',
- mode='link', wiz_values=wiz_values)
+ self.run_wizard(
+ "test_link_02",
+ "IT02780790107_11004.xml",
+ mode="link",
+ wiz_values=wiz_values,
+ )
self.assertTrue(orig_invoice.e_invoice_line_ids)
self.assertFalse(orig_invoice.invoice_line_ids)
self.assertTrue(orig_invoice.e_invoice_validation_error)
@@ -737,21 +741,19 @@ def test_02_xml_link(self):
self.assertTrue(orig_invoice.date_invoice)
def test_01_xml_zero_quantity_line(self):
- res = self.run_wizard('test_zeroq_01', 'IT05979361218_q0.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test_zeroq_01", "IT05979361218_q0.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.invoice_line_ids[0].quantity, 0)
self.assertEqual(invoice.invoice_line_ids[1].quantity, 1)
def test_xml_import_summary_tax_rate(self):
# Invoice with positive total. Detail Level: '1' -- Tax Rate
- supplier = self.env['res.partner'].search(
- [('vat', '=', 'IT02780790107')])[0]
+ supplier = self.env["res.partner"].search([("vat", "=", "IT02780790107")])[0]
# in order to make the system create the invoice lines
- supplier.e_invoice_detail_level = '1'
- res = self.run_wizard('test_summary_tax_rate',
- 'IT05979361218_ripilogoiva.xml')
- invoice_id = res.get('domain')[0][2][0]
+ supplier.e_invoice_detail_level = "1"
+ res = self.run_wizard("test_summary_tax_rate", "IT05979361218_ripilogoiva.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.amount_total, 204.16)
self.assertEqual(len(invoice.invoice_line_ids), 2)
@@ -763,95 +765,121 @@ def test_xml_import_summary_tax_rate(self):
class TestFatturaPAEnasarco(FatturapaCommon):
-
def setUp(self):
super(TestFatturaPAEnasarco, self).setUp()
- self.invoice_model = self.env['account.invoice']
+ self.invoice_model = self.env["account.invoice"]
def test_01_xml_import_enasarco(self):
- account_payable = self.env['account.account'].create({
- 'name': 'Test WH tax',
- 'code': 'whtaxpay2',
- 'user_type_id': self.env.ref(
- 'account.data_account_type_payable').id,
- 'reconcile': True})
- account_receivable = self.env['account.account'].create({
- 'name': 'Test WH tax',
- 'code': 'whtaxrec2',
- 'user_type_id': self.env.ref(
- 'account.data_account_type_receivable').id,
- 'reconcile': True})
- misc_journal = self.env['account.journal']. \
- search([("code", "=", "MISC")])
- self.env['withholding.tax'].create({
- 'name': 'Enasarco',
- 'code': 'TC07',
- 'account_receivable_id': account_receivable.id,
- 'account_payable_id': account_payable.id,
- 'journal_id': misc_journal.id,
- 'payment_term': self.env.ref(
- 'account.account_payment_term_advance').id,
- 'wt_types': 'enasarco',
- 'causale_pagamento_id': self.env.ref(
- 'l10n_it_causali_pagamento.r').id,
- 'rate_ids': [(0, 0, {
- 'tax': 1.57,
- 'base': 1.0,
- })]
- })
- self.env['withholding.tax'].create({
- 'name': 'Enasarco 8,50',
- 'code': 'TC07',
- 'account_receivable_id': account_receivable.id,
- 'account_payable_id': account_payable.id,
- 'journal_id': misc_journal.id,
- 'payment_term': self.env.ref(
- 'account.account_payment_term_advance').id,
- 'wt_types': 'enasarco',
- 'causale_pagamento_id': self.env.ref(
- 'l10n_it_causali_pagamento.r').id,
- 'rate_ids': [(0, 0, {
- 'tax': 8.5,
- 'base': 1.0,
- })]
- })
- self.env['withholding.tax'].create({
- 'name': '1040/3',
- 'code': '1040',
- 'account_receivable_id': account_receivable.id,
- 'account_payable_id': account_payable.id,
- 'journal_id': misc_journal.id,
- 'payment_term': self.env.ref(
- 'account.account_payment_term_advance').id,
- 'wt_types': 'ritenuta',
- 'causale_pagamento_id': self.env.ref(
- 'l10n_it_causali_pagamento.a').id,
- 'rate_ids': [(0, 0, {
- 'tax': 11.50,
- 'base': 1.0,
- })]
- })
- self.env['withholding.tax'].create({
- 'name': '1040 R',
- 'code': '1040R',
- 'account_receivable_id': account_receivable.id,
- 'account_payable_id': account_payable.id,
- 'journal_id': misc_journal.id,
- 'payment_term': self.env.ref(
- 'account.account_payment_term_advance').id,
- 'wt_types': 'ritenuta',
- 'causale_pagamento_id': self.env.ref(
- 'l10n_it_causali_pagamento.r').id,
- 'rate_ids': [(0, 0, {
- 'tax': 11.50,
- 'base': 1.0,
- })]
- })
+ account_payable = self.env["account.account"].create(
+ {
+ "name": "Test WH tax",
+ "code": "whtaxpay2",
+ "user_type_id": self.env.ref("account.data_account_type_payable").id,
+ "reconcile": True,
+ }
+ )
+ account_receivable = self.env["account.account"].create(
+ {
+ "name": "Test WH tax",
+ "code": "whtaxrec2",
+ "user_type_id": self.env.ref("account.data_account_type_receivable").id,
+ "reconcile": True,
+ }
+ )
+ misc_journal = self.env["account.journal"].search([("code", "=", "MISC")])
+ self.env["withholding.tax"].create(
+ {
+ "name": "Enasarco",
+ "code": "TC07",
+ "account_receivable_id": account_receivable.id,
+ "account_payable_id": account_payable.id,
+ "journal_id": misc_journal.id,
+ "payment_term": self.env.ref("account.account_payment_term_advance").id,
+ "wt_types": "enasarco",
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.r").id,
+ "rate_ids": [
+ (
+ 0,
+ 0,
+ {
+ "tax": 1.57,
+ "base": 1.0,
+ },
+ )
+ ],
+ }
+ )
+ self.env["withholding.tax"].create(
+ {
+ "name": "Enasarco 8,50",
+ "code": "TC07",
+ "account_receivable_id": account_receivable.id,
+ "account_payable_id": account_payable.id,
+ "journal_id": misc_journal.id,
+ "payment_term": self.env.ref("account.account_payment_term_advance").id,
+ "wt_types": "enasarco",
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.r").id,
+ "rate_ids": [
+ (
+ 0,
+ 0,
+ {
+ "tax": 8.5,
+ "base": 1.0,
+ },
+ )
+ ],
+ }
+ )
+ self.env["withholding.tax"].create(
+ {
+ "name": "1040/3",
+ "code": "1040",
+ "account_receivable_id": account_receivable.id,
+ "account_payable_id": account_payable.id,
+ "journal_id": misc_journal.id,
+ "payment_term": self.env.ref("account.account_payment_term_advance").id,
+ "wt_types": "ritenuta",
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.a").id,
+ "rate_ids": [
+ (
+ 0,
+ 0,
+ {
+ "tax": 11.50,
+ "base": 1.0,
+ },
+ )
+ ],
+ }
+ )
+ self.env["withholding.tax"].create(
+ {
+ "name": "1040 R",
+ "code": "1040R",
+ "account_receivable_id": account_receivable.id,
+ "account_payable_id": account_payable.id,
+ "journal_id": misc_journal.id,
+ "payment_term": self.env.ref("account.account_payment_term_advance").id,
+ "wt_types": "ritenuta",
+ "causale_pagamento_id": self.env.ref("l10n_it_causali_pagamento.r").id,
+ "rate_ids": [
+ (
+ 0,
+ 0,
+ {
+ "tax": 11.50,
+ "base": 1.0,
+ },
+ )
+ ],
+ }
+ )
# case with ENASARCO only in DatiCassaPrevidenziale and not in DatiRitenuta.
# This should not happen, but it is valid for SDI
- res = self.run_wizard('test01', 'IT05979361218_014.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test01", "IT05979361218_014.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.partner_id.name, "SOCIETA' ALPHA SRL")
self.assertEqual(invoice.amount_untaxed, 2470.00)
@@ -859,22 +887,18 @@ def test_01_xml_import_enasarco(self):
self.assertEqual(invoice.amount_total, 3013.40)
self.assertEqual(invoice.amount_net_pay, 2729.35)
self.assertEqual(invoice.withholding_tax_amount, 284.05)
- self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, 'N2')
+ self.assertEqual(invoice.welfare_fund_ids[0].kind_id.code, "N2")
self.assertTrue(len(invoice.e_invoice_line_ids) == 1)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].name, 'ACCONTO PROVVIGIONI')
- self.assertEqual(
- invoice.e_invoice_line_ids[0].qty, 1.0)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].unit_price, 2470.0)
- self.assertEqual(
- invoice.e_invoice_line_ids[0].total_price, 2470.0)
+ self.assertEqual(invoice.e_invoice_line_ids[0].name, "ACCONTO PROVVIGIONI")
+ self.assertEqual(invoice.e_invoice_line_ids[0].qty, 1.0)
+ self.assertEqual(invoice.e_invoice_line_ids[0].unit_price, 2470.0)
+ self.assertEqual(invoice.e_invoice_line_ids[0].total_price, 2470.0)
def test_02_xml_import_enasarco(self):
# Giacomo Neri, agente di commercio di Firenze.
# Imponibile 10
- res = self.run_wizard('test02', 'ITNREGCM80H30D612D_20003.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test02", "ITNREGCM80H30D612D_20003.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertEqual(invoice.amount_untaxed, 10.0)
self.assertEqual(invoice.amount_tax, 2.2)
@@ -884,11 +908,12 @@ def test_02_xml_import_enasarco(self):
def test_03_xml_import_enasarco(self):
# Come sopra, ma senza "SI " in riga fattura
- res = self.run_wizard('test03', 'ITNREGCM80H30D612D_20004.xml')
- invoice_id = res.get('domain')[0][2][0]
+ res = self.run_wizard("test03", "ITNREGCM80H30D612D_20004.xml")
+ invoice_id = res.get("domain")[0][2][0]
invoice = self.invoice_model.browse(invoice_id)
self.assertTrue(
- 'E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found'
- in invoice.e_invoice_validation_message)
+ "E-bill contains DatiRitenuta but no lines subjected to Ritenuta was found"
+ in invoice.e_invoice_validation_message
+ )
self.assertEqual(invoice.amount_total, 12.2)
self.assertEqual(invoice.amount_net_pay, 12.2)
diff --git a/l10n_it_fatturapa_in/views/account_view.xml b/l10n_it_fatturapa_in/views/account_view.xml
index e5453e1f1f98..9e7e2cdd5a34 100644
--- a/l10n_it_fatturapa_in/views/account_view.xml
+++ b/l10n_it_fatturapa_in/views/account_view.xml
@@ -1,4 +1,4 @@
-
+
@@ -6,61 +6,93 @@
fatturapa.attachment.in
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
- on
-
+ on
+
-
-
+
+
@@ -70,13 +102,13 @@
fatturapa.attachment.in
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -85,9 +117,13 @@
fatturapa.attachment.in
-
-
-
+
+
+
@@ -97,18 +133,24 @@
form
tree,form
{'search_default_to_register': True}
-
+
-
+
account.invoice.line.fatturapa.in
account.invoice.line
-
+
-
+
@@ -116,86 +158,143 @@
account.invoice.fatturapa_in
account.invoice
-
+
-
-
+
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -204,51 +303,55 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
@@ -257,83 +360,95 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
@@ -342,8 +457,8 @@
fatturapa.article.code
-
-
+
+
@@ -352,9 +467,9 @@
discount.rise.price
-
-
-
+
+
+
@@ -363,10 +478,10 @@
einvoice.line.other.data
-
-
-
-
+
+
+
+
diff --git a/l10n_it_fatturapa_in/views/company_view.xml b/l10n_it_fatturapa_in/views/company_view.xml
index 00ca114f4d6e..7f7af6ed331d 100644
--- a/l10n_it_fatturapa_in/views/company_view.xml
+++ b/l10n_it_fatturapa_in/views/company_view.xml
@@ -1,57 +1,98 @@
-
+
view_account_config_settings_ftpa_in
res.config.settings
-
+
-
+
-
+
Supplier Invoices
-
+
Default products used in electronic supplier invoices
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
Set default date used to register vendor invoices: date of invoice or received date.
-
+
diff --git a/l10n_it_fatturapa_in/views/partner_view.xml b/l10n_it_fatturapa_in/views/partner_view.xml
index 1c2d36818b5d..b10fdf7c920b 100644
--- a/l10n_it_fatturapa_in/views/partner_view.xml
+++ b/l10n_it_fatturapa_in/views/partner_view.xml
@@ -1,22 +1,27 @@
-
+
partner.form.fatturapa.in
res.partner
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/l10n_it_fatturapa_in/wizard/__init__.py b/l10n_it_fatturapa_in/wizard/__init__.py
index 5c51653af645..9fd3975db539 100644
--- a/l10n_it_fatturapa_in/wizard/__init__.py
+++ b/l10n_it_fatturapa_in/wizard/__init__.py
@@ -1,3 +1,2 @@
-
from . import wizard_import_fatturapa
from . import link_to_existing_invoice
diff --git a/l10n_it_fatturapa_in/wizard/efattura.py b/l10n_it_fatturapa_in/wizard/efattura.py
index 620912feb2e7..9c559c1c9d58 100644
--- a/l10n_it_fatturapa_in/wizard/efattura.py
+++ b/l10n_it_fatturapa_in/wizard/efattura.py
@@ -1,18 +1,18 @@
-import re
import logging
+import re
+from datetime import datetime
+
import xmlschema
from lxml import etree
-from datetime import datetime
from odoo.modules.module import get_module_resource
_logger = logging.getLogger(__name__)
_logger.setLevel(logging.DEBUG)
-XSD_SCHEMA = 'Schema_del_file_xml_FatturaPA_versione_1.2.1.xsd'
+XSD_SCHEMA = "Schema_del_file_xml_FatturaPA_versione_1.2.1.xsd"
-_xsd_schema = get_module_resource('l10n_it_fatturapa', 'bindings', 'xsd',
- XSD_SCHEMA)
+_xsd_schema = get_module_resource("l10n_it_fatturapa", "bindings", "xsd", XSD_SCHEMA)
_root = etree.parse(_xsd_schema)
date_types = {}
@@ -21,26 +21,26 @@
def get_parent_element(e):
for ancestor in e.iterancestors():
- if 'name' in ancestor.attrib:
+ if "name" in ancestor.attrib:
return ancestor
def get_type_query(e):
- return "//*[@type='%s']" % e.attrib['name']
+ return "//*[@type='%s']" % e.attrib["name"]
def collect_element(target, element, parent=None):
if parent is None:
parent = get_parent_element(element)
- path = '//%s/%s' % (parent.attrib['name'], element.attrib['name'])
- mandatory = element.attrib.get('minOccurs') != '0'
+ path = "//{}/{}".format(parent.attrib["name"], element.attrib["name"])
+ mandatory = element.attrib.get("minOccurs") != "0"
if path not in target:
target[path] = mandatory
else:
- assert target[path] == mandatory, \
- 'Element %s is already present with different minOccurs value' % \
- path
+ assert target[path] == mandatory, (
+ "Element %s is already present with different minOccurs value" % path
+ )
def collect_elements_by_type_query(target, query):
@@ -56,12 +56,12 @@ def collect_elements_by_type(target, element_type):
def collect_types():
# simpleType, we look at the base of restriction
- for element_type in _root.findall('//{*}simpleType'):
- base = element_type.find('{*}restriction').attrib['base']
+ for element_type in _root.findall("//{*}simpleType"):
+ base = element_type.find("{*}restriction").attrib["base"]
- if base == 'xs:date':
+ if base == "xs:date":
collect_elements_by_type(date_types, element_type)
- elif base == 'xs:dateTime':
+ elif base == "xs:dateTime":
collect_elements_by_type(datetime_types, element_type)
# complexType containing xs:date children
@@ -72,10 +72,10 @@ def collect_types():
def parse_datetime(s):
- m = re.match(r'(.*?)(\+|-)(\d+):(\d+)', s)
+ m = re.match(r"(.*?)(\+|-)(\d+):(\d+)", s)
if m:
s = "".join(m.group(1, 2, 3, 4))
- return datetime.strptime(s, '%Y-%m-%dT%H:%M:%S.%f%z')
+ return datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%f%z")
def _fix_xmlstring(xml_string):
@@ -100,10 +100,16 @@ def _fix_xmlstring(xml_string):
# xmlns:ds="http://www.w3.org/2000/09/xmldsig#""
xml_string = xml_string.decode()
# HACK#1 - url invalido
- xml_string = re.sub(r'xmlns:ds="http://www.w3.org/2000/09/xmldsig([^"]*)"',
- 'xmlns:ds="http://www.w3.org/2000/09/xmldsig#"', xml_string)
- xml_string = re.sub(r"xmlns:ds='http://www.w3.org/2000/09/xmldsig([^']*)'",
- "xmlns:ds='http://www.w3.org/2000/09/xmldsig#'", xml_string)
+ xml_string = re.sub(
+ r'xmlns:ds="http://www.w3.org/2000/09/xmldsig([^"]*)"',
+ 'xmlns:ds="http://www.w3.org/2000/09/xmldsig#"',
+ xml_string,
+ )
+ xml_string = re.sub(
+ r"xmlns:ds='http://www.w3.org/2000/09/xmldsig([^']*)'",
+ "xmlns:ds='http://www.w3.org/2000/09/xmldsig#'",
+ xml_string,
+ )
# HACK#2 - in attesa di fix su xmlschema
xml_string = re.sub(r">\s*0.0000000+\s*<", ">0.00<", xml_string)
return xml_string.encode()
@@ -135,12 +141,14 @@ def __setitem__(self, *attr, **kwattr):
# remove timezone from type `xs:date` if any or
# pyxb will fail to compare with
- for path, mandatory in date_types.items():
+ for path, _mandatory in date_types.items():
for element in root.xpath(path):
result = element.text.strip()
if len(result) > 10:
- msg = 'removed timezone information from date only element ' \
- '%s: %s' % (tree.getpath(element), element.text)
+ msg = (
+ "removed timezone information from date only element "
+ "%s: %s" % (tree.getpath(element), element.text)
+ )
problems.append(msg)
element.text = result[:10]
@@ -149,17 +157,22 @@ def __setitem__(self, *attr, **kwattr):
for element in root.xpath(path):
try:
d = parse_datetime(element.text)
- if d < parse_datetime('1970-01-01T00:00:00.000+0000'):
+ if d < parse_datetime("1970-01-01T00:00:00.000+0000"):
raise ValueError
except Exception as e:
element_path = tree.getpath(element)
if mandatory:
- _logger.error('element %s is invalid but is mandatory: '
- '%s' % (element_path, element.text))
+ _logger.error(
+ "element %s is invalid but is mandatory: "
+ "%s" % (element_path, element.text)
+ )
else:
element.getparent().remove(element)
- msg = 'removed invalid dateTime element %s: %s (%s)' % (
- element_path, element.text, e)
+ msg = "removed invalid dateTime element {}: {} ({})".format(
+ element_path,
+ element.text,
+ e,
+ )
problems.append(msg)
_logger.warn(msg)
@@ -168,7 +181,7 @@ def __setitem__(self, *attr, **kwattr):
pec.text = pec.text.rstrip()
validat = validator.to_dict(tree, dict_class=ObjectDict)
- setattr(validat, '_xmldoctor', problems)
+ validat._xmldoctor = problems
return validat
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
index 7d1af1aae05f..b07dbe57450f 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.py
@@ -1,7 +1,7 @@
-
-from odoo import models, api, fields
-from odoo.tools.translate import _
+from odoo import api, fields, models
from odoo.exceptions import UserError
+from odoo.tools.translate import _
+
from . import efattura
@@ -11,11 +11,11 @@ def get_invoice_obj(fatturapa_attachment):
class WizardLinkToInvoiceLine(models.TransientModel):
- _name = 'wizard.link.to.invoice.line'
+ _name = "wizard.link.to.invoice.line"
_description = "Link e-bill to bill"
wizard_id = fields.Many2one(
- comodel_name='wizard.link.to.invoice',
+ comodel_name="wizard.link.to.invoice",
)
e_invoice_nbr = fields.Integer(
string="Bill number in XML",
@@ -26,7 +26,7 @@ class WizardLinkToInvoiceLine(models.TransientModel):
readonly=True,
)
invoice_id = fields.Many2one(
- comodel_name='account.invoice',
+ comodel_name="account.invoice",
)
@api.multi
@@ -35,13 +35,18 @@ def link(self):
if not self.invoice_id:
return True
fatturapa_attachment = self.wizard_id.attachment_id
- import_wiz = self.env['wizard.import.fatturapa'] \
+ import_wiz = (
+ self.env["wizard.import.fatturapa"]
.with_context(
- active_ids=fatturapa_attachment.ids,
- linked_invoice=self.invoice_id,) \
- .new({
- 'e_invoice_detail_level': '2',
- })
+ active_ids=fatturapa_attachment.ids,
+ linked_invoice=self.invoice_id,
+ )
+ .new(
+ {
+ "e_invoice_detail_level": "2",
+ }
+ )
+ )
fatt = get_invoice_obj(fatturapa_attachment)
FatturaBody = fatt.FatturaElettronicaBody[self.e_invoice_nbr]
cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
@@ -59,12 +64,12 @@ def link(self):
import_wiz.set_delivery_data(FatturaBody, self.invoice_id)
import_wiz.set_payments_data(
- FatturaBody, self.invoice_id.id, self.invoice_id.partner_id.id)
+ FatturaBody, self.invoice_id.id, self.invoice_id.partner_id.id
+ )
import_wiz.set_activity_progress(FatturaBody, self.invoice_id.id)
- import_wiz.set_StabileOrganizzazione(
- cedentePrestatore, self.invoice_id)
+ import_wiz.set_StabileOrganizzazione(cedentePrestatore, self.invoice_id)
import_wiz.set_efatt_rounding(FatturaBody, self.invoice_id)
@@ -80,43 +85,47 @@ class WizardLinkToInvoice(models.TransientModel):
_description = "Link to Bill"
attachment_id = fields.Many2one(
- comodel_name='fatturapa.attachment.in',
+ comodel_name="fatturapa.attachment.in",
)
line_ids = fields.One2many(
- comodel_name='wizard.link.to.invoice.line',
- inverse_name='wizard_id',)
+ comodel_name="wizard.link.to.invoice.line",
+ inverse_name="wizard_id",
+ )
@api.model
def _get_default_lines_vals(self, attachment):
fatt = get_invoice_obj(attachment)
- invoice_model = self.env['account.invoice']
+ invoice_model = self.env["account.invoice"]
line_vals = list()
- descr_template = _("Bill number {bill_nbr} of {bill_date}.\n"
- "Total no tax: {bill_no_tax}\n"
- "Total tax: {bill_tax}")
+ descr_template = _(
+ "Bill number {bill_nbr} of {bill_date}.\n"
+ "Total no tax: {bill_no_tax}\n"
+ "Total tax: {bill_tax}"
+ )
for nbr, FatturaBody in enumerate(fatt.FatturaElettronicaBody):
- dati_generali_documento = \
- FatturaBody.DatiGenerali.DatiGeneraliDocumento
+ dati_generali_documento = FatturaBody.DatiGenerali.DatiGeneraliDocumento
dati_riepilogo = FatturaBody.DatiBeniServizi.DatiRiepilogo
- line_vals.append({
- 'e_invoice_nbr': nbr,
- 'e_invoice_descr': descr_template.format(
- bill_nbr=dati_generali_documento.Numero,
- bill_date=dati_generali_documento.Data,
- bill_no_tax=invoice_model.compute_xml_amount_untaxed(
- FatturaBody),
- bill_tax=invoice_model.compute_xml_amount_tax(
- dati_riepilogo)
- ),
- })
+ line_vals.append(
+ {
+ "e_invoice_nbr": nbr,
+ "e_invoice_descr": descr_template.format(
+ bill_nbr=dati_generali_documento.Numero,
+ bill_date=dati_generali_documento.Data,
+ bill_no_tax=invoice_model.compute_xml_amount_untaxed(
+ FatturaBody
+ ),
+ bill_tax=invoice_model.compute_xml_amount_tax(dati_riepilogo),
+ ),
+ }
+ )
return line_vals
@api.model
def _get_default_attachment(self):
- fatturapa_attachment_id = self.env.context.get('active_ids', [])
+ fatturapa_attachment_id = self.env.context.get("active_ids", [])
if len(fatturapa_attachment_id) != 1:
raise UserError(_("You can select only one XML file to link."))
- fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
+ fatturapa_attachment_obj = self.env["fatturapa.attachment.in"]
attachment = fatturapa_attachment_obj.browse(fatturapa_attachment_id)
return attachment
@@ -125,11 +134,12 @@ def default_get(self, fields_list):
res = super(WizardLinkToInvoice, self).default_get(fields_list)
attachment = self._get_default_attachment()
lines_vals = self._get_default_lines_vals(attachment)
- res.update({
- 'attachment_id': attachment.id,
- 'line_ids': [(0, 0, line_vals)
- for line_vals in lines_vals],
- })
+ res.update(
+ {
+ "attachment_id": attachment.id,
+ "line_ids": [(0, 0, line_vals) for line_vals in lines_vals],
+ }
+ )
return res
@api.multi
diff --git a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
index 5654074d74d4..107843080193 100644
--- a/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
+++ b/l10n_it_fatturapa_in/wizard/link_to_existing_invoice.xml
@@ -1,46 +1,49 @@
-
+
wizard_link_supplier_invoice
wizard.link.to.invoice
-
+
-
-
-
+
+
-
+ view_id="wizard_link_supplier_invoice"
+ />
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
index c5dc49edac83..880128914a32 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa.py
@@ -1,22 +1,24 @@
import logging
from datetime import datetime
-from odoo import models, api, fields
+
+from odoo import api, fields, models
+from odoo.exceptions import UserError
from odoo.tools import float_is_zero
from odoo.tools.translate import _
-from odoo.exceptions import UserError
-from . import efattura
from odoo.addons.base_iban.models.res_partner_bank import pretty_iban
+from . import efattura
+
_logger = logging.getLogger(__name__)
WT_CODES_MAPPING = {
- 'RT01': 'ritenuta',
- 'RT02': 'ritenuta',
- 'RT03': 'inps',
- 'RT04': 'enasarco',
- 'RT05': 'enpam',
- 'RT06': 'other',
+ "RT01": "ritenuta",
+ "RT02": "ritenuta",
+ "RT03": "inps",
+ "RT04": "enasarco",
+ "RT05": "enpam",
+ "RT06": "other",
}
@@ -24,56 +26,57 @@ class WizardImportFatturapa(models.TransientModel):
_name = "wizard.import.fatturapa"
_description = "Import E-bill"
- e_invoice_detail_level = fields.Selection([
- ('0', 'Minimum'),
- ('1', 'Tax rate'),
- ('2', 'Maximum'),
- ], string="E-bills Detail Level",
+ e_invoice_detail_level = fields.Selection(
+ [
+ ("0", "Minimum"),
+ ("1", "Tax rate"),
+ ("2", "Maximum"),
+ ],
+ string="E-bills Detail Level",
help="Minimum level: Bill is created with no lines; "
- "User will have to create them, according to what specified in "
- "the electronic bill.\n"
- "Tax rate level: Rate level: an invoice line is created for each "
- "rate present in the electronic invoice\n"
- "Maximum level: every line contained in the electronic bill "
- "will create a line in the bill.",
- required=True
+ "User will have to create them, according to what specified in "
+ "the electronic bill.\n"
+ "Tax rate level: Rate level: an invoice line is created for each "
+ "rate present in the electronic invoice\n"
+ "Maximum level: every line contained in the electronic bill "
+ "will create a line in the bill.",
+ required=True,
)
@api.model
def default_get(self, fields):
res = super(WizardImportFatturapa, self).default_get(fields)
- res['e_invoice_detail_level'] = '2'
- fatturapa_attachment_ids = self.env.context.get('active_ids', False)
- fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
- partners = self.env['res.partner']
+ res["e_invoice_detail_level"] = "2"
+ fatturapa_attachment_ids = self.env.context.get("active_ids", False)
+ fatturapa_attachment_obj = self.env["fatturapa.attachment.in"]
+ partners = self.env["res.partner"]
for fatturapa_attachment_id in fatturapa_attachment_ids:
fatturapa_attachment = fatturapa_attachment_obj.browse(
- fatturapa_attachment_id)
+ fatturapa_attachment_id
+ )
if fatturapa_attachment.in_invoice_ids:
raise UserError(
- _("File %s is linked to bills yet.")
- % fatturapa_attachment.name)
+ _("File %s is linked to bills yet.") % fatturapa_attachment.name
+ )
partners |= fatturapa_attachment.xml_supplier_id
if len(partners) == 1:
- res['e_invoice_detail_level'] = (
- partners[0].e_invoice_detail_level)
+ res["e_invoice_detail_level"] = partners[0].e_invoice_detail_level
return res
def CountryByCode(self, CountryCode):
- country_model = self.env['res.country']
- return country_model.search([('code', '=', CountryCode)])
+ country_model = self.env["res.country"]
+ return country_model.search([("code", "=", CountryCode)])
def ProvinceByCode(self, provinceCode):
- province_model = self.env['res.country.state']
- return province_model.search([
- ('code', '=', provinceCode),
- ('country_id.code', '=', 'IT')
- ])
+ province_model = self.env["res.country.state"]
+ return province_model.search(
+ [("code", "=", provinceCode), ("country_id.code", "=", "IT")]
+ )
def log_inconsistency(self, message):
- inconsistencies = self.env.context.get('inconsistencies', '')
+ inconsistencies = self.env.context.get("inconsistencies", "")
if inconsistencies:
- inconsistencies += '\n'
+ inconsistencies += "\n"
inconsistencies += message
# we can't set
# self = self.with_context(inconsistencies=inconsistencies)
@@ -84,88 +87,90 @@ def log_inconsistency(self, message):
)
def check_partner_base_data(self, partner_id, DatiAnagrafici):
- partner = self.env['res.partner'].browse(partner_id)
+ partner = self.env["res.partner"].browse(partner_id)
if (
- DatiAnagrafici.Anagrafica.Denominazione and
- partner.name != DatiAnagrafici.Anagrafica.Denominazione
+ DatiAnagrafici.Anagrafica.Denominazione
+ and partner.name != DatiAnagrafici.Anagrafica.Denominazione
):
- self.log_inconsistency(_(
- "Company Name field contains '%s'."
- " Your System contains '%s'"
- ) % (DatiAnagrafici.Anagrafica.Denominazione, partner.name))
+ self.log_inconsistency(
+ _("Company Name field contains '%s'." " Your System contains '%s'")
+ % (DatiAnagrafici.Anagrafica.Denominazione, partner.name)
+ )
if (
- DatiAnagrafici.Anagrafica.Nome and
- partner.firstname != DatiAnagrafici.Anagrafica.Nome
+ DatiAnagrafici.Anagrafica.Nome
+ and partner.firstname != DatiAnagrafici.Anagrafica.Nome
):
- self.log_inconsistency(_(
- "Name field contains '%s'."
- " Your System contains '%s'"
- ) % (DatiAnagrafici.Anagrafica.Nome, partner.firstname))
+ self.log_inconsistency(
+ _("Name field contains '%s'." " Your System contains '%s'")
+ % (DatiAnagrafici.Anagrafica.Nome, partner.firstname)
+ )
if (
- DatiAnagrafici.Anagrafica.Cognome and
- partner.lastname != DatiAnagrafici.Anagrafica.Cognome
+ DatiAnagrafici.Anagrafica.Cognome
+ and partner.lastname != DatiAnagrafici.Anagrafica.Cognome
):
self.log_inconsistency(
- _(
- "Surname field contains '%s'."
- " Your System contains '%s'"
- )
+ _("Surname field contains '%s'." " Your System contains '%s'")
% (DatiAnagrafici.Anagrafica.Cognome, partner.lastname)
)
- def getPartnerBase(self, DatiAnagrafici, supplier=True):
+ def getPartnerBase(self, DatiAnagrafici, supplier=True): # noqa: C901
if not DatiAnagrafici:
return False
- partner_model = self.env['res.partner']
+ partner_model = self.env["res.partner"]
cf = DatiAnagrafici.CodiceFiscale or False
vat = False
if DatiAnagrafici.IdFiscaleIVA:
# Format Italian VAT ID to always have 11 char
# to avoid validation error when creating the given partner
- if DatiAnagrafici.IdFiscaleIVA.IdPaese.upper() == 'IT':
- vat = "%s%s" % (
+ if DatiAnagrafici.IdFiscaleIVA.IdPaese.upper() == "IT":
+ vat = "{}{}".format(
DatiAnagrafici.IdFiscaleIVA.IdPaese,
- DatiAnagrafici.IdFiscaleIVA.IdCodice.rjust(11, '0')
+ DatiAnagrafici.IdFiscaleIVA.IdCodice.rjust(11, "0"),
)
else:
- vat = "%s%s" % (
+ vat = "{}{}".format(
DatiAnagrafici.IdFiscaleIVA.IdPaese,
- DatiAnagrafici.IdFiscaleIVA.IdCodice
+ DatiAnagrafici.IdFiscaleIVA.IdCodice,
)
partners = partner_model
if vat:
- domain = [('vat', '=', vat)]
- if self.env.context.get('from_attachment'):
- att = self.env.context.get('from_attachment')
- domain.extend([
- '|',
- ('company_id', 'child_of', att.company_id.id),
- ('company_id', '=', False)
- ])
+ domain = [("vat", "=", vat)]
+ if self.env.context.get("from_attachment"):
+ att = self.env.context.get("from_attachment")
+ domain.extend(
+ [
+ "|",
+ ("company_id", "child_of", att.company_id.id),
+ ("company_id", "=", False),
+ ]
+ )
partners = partner_model.search(domain)
if not partners and cf:
- domain = [('fiscalcode', '=', cf)]
- if self.env.context.get('from_attachment'):
- att = self.env.context.get('from_attachment')
- domain.extend([
- '|',
- ('company_id', 'child_of', att.company_id.id),
- ('company_id', '=', False)
- ])
+ domain = [("fiscalcode", "=", cf)]
+ if self.env.context.get("from_attachment"):
+ att = self.env.context.get("from_attachment")
+ domain.extend(
+ [
+ "|",
+ ("company_id", "child_of", att.company_id.id),
+ ("company_id", "=", False),
+ ]
+ )
partners = partner_model.search(domain)
commercial_partner_id = False
if len(partners) > 1:
for partner in partners:
if (
- commercial_partner_id and
- partner.commercial_partner_id.id != commercial_partner_id
+ commercial_partner_id
+ and partner.commercial_partner_id.id != commercial_partner_id
):
raise UserError(
- _("Two distinct partners with "
- "VAT number %s or Fiscal Code %s already "
- "present in db." %
- (vat, cf))
+ _(
+ "Two distinct partners with "
+ "VAT number %s or Fiscal Code %s already "
+ "present in db." % (vat, cf)
)
+ )
commercial_partner_id = partner.commercial_partner_id.id
if partners:
if not commercial_partner_id:
@@ -185,79 +190,74 @@ def getPartnerBase(self, DatiAnagrafici, supplier=True):
_("Country Code %s not found in system.") % CountryCode
)
vals = {
- 'vat': vat,
- 'fiscalcode': cf,
- 'customer': False,
- 'supplier': supplier,
- 'is_company': (
- DatiAnagrafici.Anagrafica.Denominazione and True or False),
- 'eori_code': DatiAnagrafici.Anagrafica.CodEORI or '',
- 'country_id': country_id,
+ "vat": vat,
+ "fiscalcode": cf,
+ "customer": False,
+ "supplier": supplier,
+ "is_company": (
+ DatiAnagrafici.Anagrafica.Denominazione and True or False
+ ),
+ "eori_code": DatiAnagrafici.Anagrafica.CodEORI or "",
+ "country_id": country_id,
}
if DatiAnagrafici.Anagrafica.Nome:
- vals['firstname'] = DatiAnagrafici.Anagrafica.Nome
+ vals["firstname"] = DatiAnagrafici.Anagrafica.Nome
if DatiAnagrafici.Anagrafica.Cognome:
- vals['lastname'] = DatiAnagrafici.Anagrafica.Cognome
+ vals["lastname"] = DatiAnagrafici.Anagrafica.Cognome
if DatiAnagrafici.Anagrafica.Denominazione:
- vals['name'] = DatiAnagrafici.Anagrafica.Denominazione
+ vals["name"] = DatiAnagrafici.Anagrafica.Denominazione
return partner_model.create(vals).id
def getCedPrest(self, cedPrest):
- partner_model = self.env['res.partner']
+ partner_model = self.env["res.partner"]
partner_id = self.getPartnerBase(cedPrest.DatiAnagrafici)
no_contact_update = False
if partner_id:
- no_contact_update = partner_model.browse(partner_id).\
- electronic_invoice_no_contact_update
- fiscalPosModel = self.env['fatturapa.fiscal_position']
+ no_contact_update = partner_model.browse(
+ partner_id
+ ).electronic_invoice_no_contact_update
+ fiscalPosModel = self.env["fatturapa.fiscal_position"]
if partner_id and not no_contact_update:
partner_company_id = partner_model.browse(partner_id).company_id.id
vals = {
- 'street': cedPrest.Sede.Indirizzo,
- 'zip': cedPrest.Sede.CAP,
- 'city': cedPrest.Sede.Comune,
- 'register': cedPrest.DatiAnagrafici.AlboProfessionale or ''
+ "street": cedPrest.Sede.Indirizzo,
+ "zip": cedPrest.Sede.CAP,
+ "city": cedPrest.Sede.Comune,
+ "register": cedPrest.DatiAnagrafici.AlboProfessionale or "",
}
if cedPrest.DatiAnagrafici.ProvinciaAlbo:
ProvinciaAlbo = cedPrest.DatiAnagrafici.ProvinciaAlbo
prov = self.ProvinceByCode(ProvinciaAlbo)
if not prov:
self.log_inconsistency(
- _('Register Province ( %s ) not present '
- 'in your system')
+ _("Register Province ( %s ) not present " "in your system")
% ProvinciaAlbo
)
else:
- vals['register_province'] = prov[0].id
+ vals["register_province"] = prov[0].id
if cedPrest.Sede.Provincia:
Provincia = cedPrest.Sede.Provincia
prov_sede = self.ProvinceByCode(Provincia)
if not prov_sede:
self.log_inconsistency(
- _('Province ( %s ) not present in your system')
- % Provincia
+ _("Province ( %s ) not present in your system") % Provincia
)
else:
- vals['state_id'] = prov_sede[0].id
+ vals["state_id"] = prov_sede[0].id
- vals['register_code'] = (
- cedPrest.DatiAnagrafici.NumeroIscrizioneAlbo)
- vals['register_regdate'] = (
- cedPrest.DatiAnagrafici.DataIscrizioneAlbo)
+ vals["register_code"] = cedPrest.DatiAnagrafici.NumeroIscrizioneAlbo
+ vals["register_regdate"] = cedPrest.DatiAnagrafici.DataIscrizioneAlbo
if cedPrest.DatiAnagrafici.RegimeFiscale:
rfPos = cedPrest.DatiAnagrafici.RegimeFiscale
- FiscalPos = fiscalPosModel.search(
- [('code', '=', rfPos)]
- )
+ FiscalPos = fiscalPosModel.search([("code", "=", rfPos)])
if not FiscalPos:
raise UserError(
- _('Tax Regime %s not present in your system.')
- % rfPos
+ _("Tax Regime %s not present in your system.") % rfPos
)
else:
- vals['register_fiscalpos'] = FiscalPos[0].id
+ vals["register_fiscalpos"] = FiscalPos[0].id
if cedPrest.IscrizioneREA:
REA = cedPrest.IscrizioneREA
@@ -268,56 +268,59 @@ def getCedPrest(self, cedPrest):
office_id = False
self.log_inconsistency(
_(
- 'REA Office Province Code ( %s ) not present in '
- 'your system'
- ) % REA.Ufficio
+ "REA Office Province Code ( %s ) not present in "
+ "your system"
+ )
+ % REA.Ufficio
)
else:
office_id = offices[0].id
- vals['rea_office'] = office_id
+ vals["rea_office"] = office_id
rea_domain = [
- ('rea_code', '=', rea_nr),
- ('company_id', '=', partner_company_id),
- ('id', '!=', partner_id)
+ ("rea_code", "=", rea_nr),
+ ("company_id", "=", partner_company_id),
+ ("id", "!=", partner_id),
]
if office_id:
- rea_domain.append(('rea_office', '=', office_id))
+ rea_domain.append(("rea_office", "=", office_id))
rea_partners = partner_model.search(rea_domain)
if rea_partners:
- rea_names = ", ".join(rea_partners.mapped('name'))
+ rea_names = ", ".join(rea_partners.mapped("name"))
p_name = partner_model.browse(partner_id).name
self.log_inconsistency(
- _("Current invoice is from {} with REA Code"
- " {}. Yet it seems that partners {} have the same"
- " REA Code. This code should be unique; please fix"
- " it."
- .format(p_name, rea_nr, rea_names))
+ _(
+ "Current invoice is from {} with REA Code"
+ " {}. Yet it seems that partners {} have the same"
+ " REA Code. This code should be unique; please fix"
+ " it.".format(p_name, rea_nr, rea_names)
+ )
)
else:
- vals['rea_code'] = REA.NumeroREA
+ vals["rea_code"] = REA.NumeroREA
- vals['rea_capital'] = REA.CapitaleSociale or 0.0
- vals['rea_member_type'] = REA.SocioUnico or False
- vals['rea_liquidation_state'] = REA.StatoLiquidazione or False
+ vals["rea_capital"] = REA.CapitaleSociale or 0.0
+ vals["rea_member_type"] = REA.SocioUnico or False
+ vals["rea_liquidation_state"] = REA.StatoLiquidazione or False
if cedPrest.Contatti:
- vals['phone'] = cedPrest.Contatti.Telefono
- vals['email'] = cedPrest.Contatti.Email
+ vals["phone"] = cedPrest.Contatti.Telefono
+ vals["email"] = cedPrest.Contatti.Email
partner_model.browse(partner_id).write(vals)
return partner_id
def getCarrirerPartner(self, Carrier):
- partner_model = self.env['res.partner']
+ partner_model = self.env["res.partner"]
partner_id = self.getPartnerBase(Carrier.DatiAnagraficiVettore)
no_contact_update = False
if partner_id:
- no_contact_update = partner_model.browse(partner_id).\
- electronic_invoice_no_contact_update
+ no_contact_update = partner_model.browse(
+ partner_id
+ ).electronic_invoice_no_contact_update
if partner_id and not no_contact_update:
vals = {
- 'license_number':
- Carrier.DatiAnagraficiVettore.NumeroLicenzaGuida or '',
+ "license_number": Carrier.DatiAnagraficiVettore.NumeroLicenzaGuida
+ or "",
}
partner_model.browse(partner_id).write(vals)
return partner_id
@@ -326,88 +329,99 @@ def _prepare_generic_line_data(self, line):
retLine = {}
account_taxes = self.get_account_taxes(line.AliquotaIVA, line.Natura)
if account_taxes:
- retLine['invoice_line_tax_ids'] = [(6, 0, [account_taxes[0].id])]
+ retLine["invoice_line_tax_ids"] = [(6, 0, [account_taxes[0].id])]
return retLine
def get_account_taxes(self, AliquotaIVA, Natura):
- account_tax_model = self.env['account.tax']
+ account_tax_model = self.env["account.tax"]
# check if a default tax exists and generate def_purchase_tax object
- ir_values = self.env['ir.default']
- company_id = self.env['res.company']._company_default_get(
- 'account.invoice.line').id
+ ir_values = self.env["ir.default"]
+ company_id = (
+ self.env["res.company"]._company_default_get("account.invoice.line").id
+ )
supplier_taxes_ids = ir_values.get(
- 'product.product', 'supplier_taxes_id', company_id=company_id)
+ "product.product", "supplier_taxes_id", company_id=company_id
+ )
def_purchase_tax = False
if supplier_taxes_ids:
def_purchase_tax = account_tax_model.browse(supplier_taxes_ids)[0]
if float(AliquotaIVA) == 0.0 and Natura:
account_taxes = account_tax_model.search(
[
- ('type_tax_use', '=', 'purchase'),
- ('kind_id.code', '=', Natura),
- ('amount', '=', 0.0),
- ], order='sequence')
+ ("type_tax_use", "=", "purchase"),
+ ("kind_id.code", "=", Natura),
+ ("amount", "=", 0.0),
+ ],
+ order="sequence",
+ )
if not account_taxes:
self.log_inconsistency(
- _('No tax with percentage '
- '%s and nature %s found. Please configure this tax.')
- % (AliquotaIVA, Natura))
+ _(
+ "No tax with percentage "
+ "%s and nature %s found. Please configure this tax."
+ )
+ % (AliquotaIVA, Natura)
+ )
if len(account_taxes) > 1:
self.log_inconsistency(
- _('Too many taxes with percentage '
- '%s and nature %s found. Tax %s with lower priority has '
- 'been set on invoice lines.')
- % (AliquotaIVA, Natura,
- account_taxes[0].description))
+ _(
+ "Too many taxes with percentage "
+ "%s and nature %s found. Tax %s with lower priority has "
+ "been set on invoice lines."
+ )
+ % (AliquotaIVA, Natura, account_taxes[0].description)
+ )
else:
account_taxes = account_tax_model.search(
[
- ('type_tax_use', '=', 'purchase'),
- ('amount', '=', float(AliquotaIVA)),
- ('price_include', '=', False),
+ ("type_tax_use", "=", "purchase"),
+ ("amount", "=", float(AliquotaIVA)),
+ ("price_include", "=", False),
# partially deductible VAT must be set by user
- ('children_tax_ids', '=', False),
- ], order='sequence')
+ ("children_tax_ids", "=", False),
+ ],
+ order="sequence",
+ )
if not account_taxes:
self.log_inconsistency(
_(
"XML contains tax with percentage '%s' "
"but it does not exist in your system"
- ) % AliquotaIVA
+ )
+ % AliquotaIVA
)
# check if there are multiple taxes with
# same percentage
if len(account_taxes) > 1:
# just logging because this is an usual case: see split payment
- _logger.warning(_(
- "Too many taxes with percentage equals "
- "to '%s'.\nFix it if required"
- ) % AliquotaIVA)
+ _logger.warning(
+ _(
+ "Too many taxes with percentage equals "
+ "to '%s'.\nFix it if required"
+ )
+ % AliquotaIVA
+ )
# if there are multiple taxes with same percentage
# and there is a default tax with this percentage,
# set taxes list equal to supplier_taxes_id, loaded before
- if (
- def_purchase_tax and
- def_purchase_tax.amount == (float(AliquotaIVA))
- ):
+ if def_purchase_tax and def_purchase_tax.amount == (float(AliquotaIVA)):
account_taxes = def_purchase_tax
return account_taxes
def get_line_product(self, line, partner):
product = None
- supplier_info = self.env['product.supplierinfo']
+ supplier_info = self.env["product.supplierinfo"]
if len(line.CodiceArticolo or []) == 1:
supplier_code = line.CodiceArticolo[0].CodiceValore
- supplier_infos = supplier_info.search([
- ('product_code', '=', supplier_code),
- ('name', '=', partner.id)
- ])
+ supplier_infos = supplier_info.search(
+ [("product_code", "=", supplier_code), ("name", "=", partner.id)]
+ )
if supplier_infos:
- products = supplier_infos.mapped('product_id')
+ products = supplier_infos.mapped("product_id")
if len(products) == 1:
product = products[0]
else:
- templates = supplier_infos.mapped('product_tmpl_id')
+ templates = supplier_infos.mapped("product_tmpl_id")
if len(templates) == 1:
product = templates.product_variant_ids[0]
if not product and partner.e_invoice_default_product_id:
@@ -416,16 +430,14 @@ def get_line_product(self, line, partner):
def adjust_accounting_data(self, product, line_vals):
if product.product_tmpl_id.property_account_expense_id:
- line_vals['account_id'] = (
- product.product_tmpl_id.property_account_expense_id.id)
- elif (
- product.product_tmpl_id.categ_id.property_account_expense_categ_id
- ):
- line_vals['account_id'] = (
- product.product_tmpl_id.categ_id.
- property_account_expense_categ_id.id
- )
- account = self.env['account.account'].browse(line_vals['account_id'])
+ line_vals[
+ "account_id"
+ ] = product.product_tmpl_id.property_account_expense_id.id
+ elif product.product_tmpl_id.categ_id.property_account_expense_categ_id:
+ line_vals[
+ "account_id"
+ ] = product.product_tmpl_id.categ_id.property_account_expense_categ_id.id
+ account = self.env["account.account"].browse(line_vals["account_id"])
new_tax = None
if len(product.product_tmpl_id.supplier_taxes_id) == 1:
new_tax = product.product_tmpl_id.supplier_taxes_id[0]
@@ -433,160 +445,159 @@ def adjust_accounting_data(self, product, line_vals):
new_tax = account.tax_ids[0]
if new_tax:
line_tax_id = (
- line_vals.get('invoice_line_tax_ids') and
- line_vals['invoice_line_tax_ids'][0][2][0]
+ line_vals.get("invoice_line_tax_ids")
+ and line_vals["invoice_line_tax_ids"][0][2][0]
)
- line_tax = self.env['account.tax'].browse(line_tax_id)
+ line_tax = self.env["account.tax"].browse(line_tax_id)
if new_tax.id != line_tax_id:
if new_tax._get_tax_amount() != line_tax._get_tax_amount():
- self.log_inconsistency(_(
- "XML contains tax %s. Product %s has tax %s. Using "
- "the XML one"
- ) % (line_tax.name, product.name, new_tax.name))
+ self.log_inconsistency(
+ _(
+ "XML contains tax %s. Product %s has tax %s. Using "
+ "the XML one"
+ )
+ % (line_tax.name, product.name, new_tax.name)
+ )
else:
# If product has the same amount of the one in XML,
# I use it. Typical case: 22% det 50%
- line_vals['invoice_line_tax_ids'] = [
- (6, 0, [new_tax.id])]
+ line_vals["invoice_line_tax_ids"] = [(6, 0, [new_tax.id])]
def _prepareInvoiceLineAliquota(self, credit_account_id, line, nline):
retLine = {}
account_taxes = self.get_account_taxes(line.AliquotaIVA, line.Natura)
if account_taxes:
- retLine['invoice_line_tax_ids'] = [(6, 0, [account_taxes[0].id])]
-
- retLine.update({
- 'name': 'Riepilogo Aliquota {}'.format(line.AliquotaIVA),
- 'sequence': nline,
- 'account_id': credit_account_id,
- 'price_unit': float(line.ImponibileImporto),
- 'quantity': 1.0
- })
+ retLine["invoice_line_tax_ids"] = [(6, 0, [account_taxes[0].id])]
+
+ retLine.update(
+ {
+ "name": "Riepilogo Aliquota {}".format(line.AliquotaIVA),
+ "sequence": nline,
+ "account_id": credit_account_id,
+ "price_unit": float(line.ImponibileImporto),
+ "quantity": 1.0,
+ }
+ )
return retLine
def _prepareInvoiceLine(self, credit_account_id, line, wt_founds=False):
retLine = self._prepare_generic_line_data(line)
- retLine.update({
- 'name': line.Descrizione,
- 'sequence': int(line.NumeroLinea),
- 'account_id': credit_account_id,
- 'price_unit': float(line.PrezzoUnitario),
- })
+ retLine.update(
+ {
+ "name": line.Descrizione,
+ "sequence": int(line.NumeroLinea),
+ "account_id": credit_account_id,
+ "price_unit": float(line.PrezzoUnitario),
+ }
+ )
if line.Quantita is None:
- retLine['quantity'] = 1.0
+ retLine["quantity"] = 1.0
else:
- retLine['quantity'] = float(line.Quantita)
+ retLine["quantity"] = float(line.Quantita)
if (
- float(line.PrezzoUnitario) and
- line.Quantita and float(line.Quantita) and # Quantita not required
- line.ScontoMaggiorazione
+ float(line.PrezzoUnitario)
+ and line.Quantita
+ and float(line.Quantita)
+ and line.ScontoMaggiorazione # Quantita not required
):
- retLine['discount'] = self._computeDiscount(line)
+ retLine["discount"] = self._computeDiscount(line)
if line.RiferimentoAmministrazione:
- retLine['admin_ref'] = line.RiferimentoAmministrazione
+ retLine["admin_ref"] = line.RiferimentoAmministrazione
if wt_founds and line.Ritenuta:
- retLine['invoice_line_tax_wt_ids'] = [(6, 0, [x.id for x in wt_founds])]
+ retLine["invoice_line_tax_wt_ids"] = [(6, 0, [x.id for x in wt_founds])]
return retLine
def _prepareRelDocsLine(self, invoice_id, line, doc_type):
res = []
lineref = line.RiferimentoNumeroLinea or False
- IdDoc = line.IdDocumento or 'Error'
+ IdDoc = line.IdDocumento or "Error"
Data = line.Data or False
- NumItem = line.NumItem or ''
- Code = line.CodiceCommessaConvenzione or ''
- Cig = line.CodiceCIG or ''
- Cup = line.CodiceCUP or ''
+ NumItem = line.NumItem or ""
+ Code = line.CodiceCommessaConvenzione or ""
+ Cig = line.CodiceCIG or ""
+ Cup = line.CodiceCUP or ""
invoice_lineid = False
if lineref:
for numline in lineref:
invoice_lineid = False
- invoice_line_model = self.env['account.invoice.line']
+ invoice_line_model = self.env["account.invoice.line"]
invoice_lines = invoice_line_model.search(
[
- ('invoice_id', '=', invoice_id),
- ('sequence', '=', int(numline)),
- ])
+ ("invoice_id", "=", invoice_id),
+ ("sequence", "=", int(numline)),
+ ]
+ )
if invoice_lines:
invoice_lineid = invoice_lines[0].id
val = {
- 'type': doc_type,
- 'name': IdDoc,
- 'lineRef': numline,
- 'invoice_line_id': invoice_lineid,
- 'invoice_id': invoice_id,
- 'date': Data,
- 'numitem': NumItem,
- 'code': Code,
- 'cig': Cig,
- 'cup': Cup,
+ "type": doc_type,
+ "name": IdDoc,
+ "lineRef": numline,
+ "invoice_line_id": invoice_lineid,
+ "invoice_id": invoice_id,
+ "date": Data,
+ "numitem": NumItem,
+ "code": Code,
+ "cig": Cig,
+ "cup": Cup,
}
res.append(val)
else:
val = {
- 'type': doc_type,
- 'name': IdDoc,
- 'invoice_line_id': invoice_lineid,
- 'invoice_id': invoice_id,
- 'date': Data,
- 'numitem': NumItem,
- 'code': Code,
- 'cig': Cig,
- 'cup': Cup
+ "type": doc_type,
+ "name": IdDoc,
+ "invoice_line_id": invoice_lineid,
+ "invoice_id": invoice_id,
+ "date": Data,
+ "numitem": NumItem,
+ "code": Code,
+ "cig": Cig,
+ "cup": Cup,
}
res.append(val)
return res
def _prepareWelfareLine(self, invoice_id, line):
TipoCassa = line.TipoCassa or False
- AlCassa = line.AlCassa and (float(line.AlCassa)/100) or None
+ AlCassa = line.AlCassa and (float(line.AlCassa) / 100) or None
ImportoContributoCassa = (
- line.ImportoContributoCassa and
- float(line.ImportoContributoCassa) or None)
- ImponibileCassa = (
- line.ImponibileCassa and float(line.ImponibileCassa) or None)
- AliquotaIVA = (
- line.AliquotaIVA and (float(line.AliquotaIVA)/100) or None)
- Ritenuta = line.Ritenuta or ''
+ line.ImportoContributoCassa and float(line.ImportoContributoCassa) or None
+ )
+ ImponibileCassa = line.ImponibileCassa and float(line.ImponibileCassa) or None
+ AliquotaIVA = line.AliquotaIVA and (float(line.AliquotaIVA) / 100) or None
+ Ritenuta = line.Ritenuta or ""
Natura = line.Natura or False
kind_id = False
if Natura:
- kind = self.env['account.tax.kind'].search([
- ('code', '=', Natura)
- ])
+ kind = self.env["account.tax.kind"].search([("code", "=", Natura)])
if not kind:
- self.log_inconsistency(
- _("Tax kind %s not found") % Natura
- )
+ self.log_inconsistency(_("Tax kind %s not found") % Natura)
else:
kind_id = kind[0].id
- RiferimentoAmministrazione = line.RiferimentoAmministrazione or ''
- WelfareTypeModel = self.env['welfare.fund.type']
+ RiferimentoAmministrazione = line.RiferimentoAmministrazione or ""
+ WelfareTypeModel = self.env["welfare.fund.type"]
if not TipoCassa:
- raise UserError(
- _('Welfare Fund is not defined.')
- )
- WelfareType = WelfareTypeModel.search(
- [('name', '=', TipoCassa)]
- )
+ raise UserError(_("Welfare Fund is not defined."))
+ WelfareType = WelfareTypeModel.search([("name", "=", TipoCassa)])
res = {
- 'welfare_rate_tax': AlCassa,
- 'welfare_amount_tax': ImportoContributoCassa,
- 'welfare_taxable': ImponibileCassa,
- 'welfare_Iva_tax': AliquotaIVA,
- 'subjected_withholding': Ritenuta,
- 'kind_id': kind_id,
- 'pa_line_code': RiferimentoAmministrazione,
- 'invoice_id': invoice_id,
+ "welfare_rate_tax": AlCassa,
+ "welfare_amount_tax": ImportoContributoCassa,
+ "welfare_taxable": ImponibileCassa,
+ "welfare_Iva_tax": AliquotaIVA,
+ "subjected_withholding": Ritenuta,
+ "kind_id": kind_id,
+ "pa_line_code": RiferimentoAmministrazione,
+ "invoice_id": invoice_id,
}
if not WelfareType:
raise UserError(
- _('Welfare Fund %s not present in your system.') % TipoCassa)
+ _("Welfare Fund %s not present in your system.") % TipoCassa
+ )
else:
- res['name'] = WelfareType[0].id
+ res["name"] = WelfareType[0].id
return res
@@ -595,185 +606,159 @@ def _prepareDiscRisePriceLine(self, line_id, line):
Percentuale = line.Percentuale and float(line.Percentuale) or 0.0
Importo = line.Importo and float(line.Importo) or 0.0
res = {
- 'percentage': Percentuale,
- 'amount': Importo,
- self.env.context.get('drtype'): line_id,
+ "percentage": Percentuale,
+ "amount": Importo,
+ self.env.context.get("drtype"): line_id,
}
- res['name'] = Tipo
+ res["name"] = Tipo
return res
def _computeDiscount(self, DettaglioLinea):
line_total = float(DettaglioLinea.PrezzoTotale)
line_unit = line_total / float(DettaglioLinea.Quantita)
- discount = (
- 1 - (line_unit / float(DettaglioLinea.PrezzoUnitario))
- ) * 100.0
+ discount = (1 - (line_unit / float(DettaglioLinea.PrezzoUnitario))) * 100.0
return discount
def _addGlobalDiscount(self, invoice_id, DatiGeneraliDocumento):
discount = 0.0
if (
- DatiGeneraliDocumento.ScontoMaggiorazione and
- self.e_invoice_detail_level == '2'
+ DatiGeneraliDocumento.ScontoMaggiorazione
+ and self.e_invoice_detail_level == "2"
):
- invoice = self.env['account.invoice'].browse(invoice_id)
+ invoice = self.env["account.invoice"].browse(invoice_id)
for DiscRise in DatiGeneraliDocumento.ScontoMaggiorazione:
if DiscRise.Percentuale:
- amount = (
- invoice.amount_total * (
- float(DiscRise.Percentuale) / 100))
- if DiscRise.Tipo == 'SC':
+ amount = invoice.amount_total * (float(DiscRise.Percentuale) / 100)
+ if DiscRise.Tipo == "SC":
discount -= amount
- elif DiscRise.Tipo == 'MG':
+ elif DiscRise.Tipo == "MG":
discount += amount
elif DiscRise.Importo:
- if DiscRise.Tipo == 'SC':
+ if DiscRise.Tipo == "SC":
discount -= float(DiscRise.Importo)
- elif DiscRise.Tipo == 'MG':
+ elif DiscRise.Tipo == "MG":
discount += float(DiscRise.Importo)
journal = self.get_purchase_journal(invoice.company_id)
credit_account_id = journal.default_credit_account_id.id
line_vals = {
- 'invoice_id': invoice_id,
- 'name': _(
- "Global bill discount from document general data"),
- 'account_id': credit_account_id,
- 'price_unit': discount,
- 'quantity': 1,
- }
+ "invoice_id": invoice_id,
+ "name": _("Global bill discount from document general data"),
+ "account_id": credit_account_id,
+ "price_unit": discount,
+ "quantity": 1,
+ }
if self.env.user.company_id.sconto_maggiorazione_product_id:
sconto_maggiorazione_product = (
- self.env.user.company_id.sconto_maggiorazione_product_id)
- line_vals['product_id'] = sconto_maggiorazione_product.id
- line_vals['name'] = sconto_maggiorazione_product.name
- self.adjust_accounting_data(
- sconto_maggiorazione_product, line_vals
+ self.env.user.company_id.sconto_maggiorazione_product_id
)
- self.env['account.invoice.line'].create(line_vals)
+ line_vals["product_id"] = sconto_maggiorazione_product.id
+ line_vals["name"] = sconto_maggiorazione_product.name
+ self.adjust_accounting_data(sconto_maggiorazione_product, line_vals)
+ self.env["account.invoice.line"].create(line_vals)
return True
def _createPaymentsLine(self, payment_id, line, partner_id):
details = line.DettaglioPagamento or False
if details:
- PaymentModel = self.env['fatturapa.payment.detail']
- PaymentMethodModel = self.env['fatturapa.payment_method']
- BankModel = self.env['res.bank']
- PartnerBankModel = self.env['res.partner.bank']
+ PaymentModel = self.env["fatturapa.payment.detail"]
+ PaymentMethodModel = self.env["fatturapa.payment_method"]
+ BankModel = self.env["res.bank"]
+ PartnerBankModel = self.env["res.partner.bank"]
for dline in details:
method = PaymentMethodModel.search(
- [('code', '=', dline.ModalitaPagamento)]
+ [("code", "=", dline.ModalitaPagamento)]
)
if not method:
raise UserError(
_(
- 'Payment method %s is not defined in your system.'
+ "Payment method %s is not defined in your system."
% dline.ModalitaPagamento
)
)
val = {
- 'recipient': dline.Beneficiario,
- 'fatturapa_pm_id': method[0].id,
- 'payment_term_start':
- dline.DataRiferimentoTerminiPagamento or False,
- 'payment_days':
- dline.GiorniTerminiPagamento or 0,
- 'payment_due_date':
- dline.DataScadenzaPagamento or False,
- 'payment_amount':
- dline.ImportoPagamento or 0.0,
- 'post_office_code':
- dline.CodUfficioPostale or '',
- 'recepit_surname':
- dline.CognomeQuietanzante or '',
- 'recepit_name':
- dline.NomeQuietanzante or '',
- 'recepit_cf':
- dline.CFQuietanzante or '',
- 'recepit_title':
- dline.TitoloQuietanzante or '1',
- 'payment_bank_name':
- dline.IstitutoFinanziario or '',
- 'payment_bank_iban':
- dline.IBAN or '',
- 'payment_bank_abi':
- dline.ABI or '',
- 'payment_bank_cab':
- dline.CAB or '',
- 'payment_bank_bic':
- dline.BIC or '',
- 'payment_bank': False,
- 'prepayment_discount':
- dline.ScontoPagamentoAnticipato or 0.0,
- 'max_payment_date':
- dline.DataLimitePagamentoAnticipato or False,
- 'penalty_amount':
- dline.PenalitaPagamentiRitardati or 0.0,
- 'penalty_date':
- dline.DataDecorrenzaPenale or False,
- 'payment_code':
- dline.CodicePagamento or '',
- 'payment_data_id': payment_id
+ "recipient": dline.Beneficiario,
+ "fatturapa_pm_id": method[0].id,
+ "payment_term_start": dline.DataRiferimentoTerminiPagamento
+ or False,
+ "payment_days": dline.GiorniTerminiPagamento or 0,
+ "payment_due_date": dline.DataScadenzaPagamento or False,
+ "payment_amount": dline.ImportoPagamento or 0.0,
+ "post_office_code": dline.CodUfficioPostale or "",
+ "recepit_surname": dline.CognomeQuietanzante or "",
+ "recepit_name": dline.NomeQuietanzante or "",
+ "recepit_cf": dline.CFQuietanzante or "",
+ "recepit_title": dline.TitoloQuietanzante or "1",
+ "payment_bank_name": dline.IstitutoFinanziario or "",
+ "payment_bank_iban": dline.IBAN or "",
+ "payment_bank_abi": dline.ABI or "",
+ "payment_bank_cab": dline.CAB or "",
+ "payment_bank_bic": dline.BIC or "",
+ "payment_bank": False,
+ "prepayment_discount": dline.ScontoPagamentoAnticipato or 0.0,
+ "max_payment_date": dline.DataLimitePagamentoAnticipato or False,
+ "penalty_amount": dline.PenalitaPagamentiRitardati or 0.0,
+ "penalty_date": dline.DataDecorrenzaPenale or False,
+ "payment_code": dline.CodicePagamento or "",
+ "payment_data_id": payment_id,
}
bank = False
payment_bank_id = False
if dline.BIC:
- banks = BankModel.search(
- [('bic', '=', dline.BIC.strip())]
- )
+ banks = BankModel.search([("bic", "=", dline.BIC.strip())])
if not banks:
if not dline.IstitutoFinanziario:
self.log_inconsistency(
- _("Name of Bank with BIC '%s' is not set."
- " Can't create bank") % dline.BIC
+ _(
+ "Name of Bank with BIC '%s' is not set."
+ " Can't create bank"
+ )
+ % dline.BIC
)
else:
bank = BankModel.create(
{
- 'name': dline.IstitutoFinanziario,
- 'bic': dline.BIC,
+ "name": dline.IstitutoFinanziario,
+ "bic": dline.BIC,
}
)
else:
bank = banks[0]
if dline.IBAN:
SearchDom = [
- (
- 'acc_number', '=',
- pretty_iban(dline.IBAN.strip())
- ),
- ('partner_id', '=', partner_id),
+ ("acc_number", "=", pretty_iban(dline.IBAN.strip())),
+ ("partner_id", "=", partner_id),
]
payment_bank_id = False
payment_banks = PartnerBankModel.search(SearchDom)
if not payment_banks and not bank:
self.log_inconsistency(
_(
- 'BIC is required and not exist in Xml\n'
- 'Curr bank data is: \n'
- 'IBAN: %s\n'
- 'Bank Name: %s\n'
+ "BIC is required and not exist in Xml\n"
+ "Curr bank data is: \n"
+ "IBAN: %s\n"
+ "Bank Name: %s\n"
)
% (
- dline.IBAN.strip() or '',
- dline.IstitutoFinanziario or ''
+ dline.IBAN.strip() or "",
+ dline.IstitutoFinanziario or "",
)
)
elif not payment_banks and bank:
payment_bank_id = PartnerBankModel.create(
{
- 'acc_number': dline.IBAN.strip(),
- 'partner_id': partner_id,
- 'bank_id': bank.id,
- 'bank_name': dline.IstitutoFinanziario or bank.name,
- 'bank_bic': dline.BIC or bank.bic
+ "acc_number": dline.IBAN.strip(),
+ "partner_id": partner_id,
+ "bank_id": bank.id,
+ "bank_name": dline.IstitutoFinanziario or bank.name,
+ "bank_bic": dline.BIC or bank.bic,
}
).id
if payment_banks:
payment_bank_id = payment_banks[0].id
if payment_bank_id:
- val['payment_bank'] = payment_bank_id
+ val["payment_bank"] = payment_bank_id
PaymentModel.create(val)
return True
@@ -781,90 +766,87 @@ def _createPaymentsLine(self, payment_id, line, partner_id):
def set_StabileOrganizzazione(self, CedentePrestatore, invoice):
if CedentePrestatore.StabileOrganizzazione:
invoice.efatt_stabile_organizzazione_indirizzo = (
- CedentePrestatore.StabileOrganizzazione.Indirizzo)
+ CedentePrestatore.StabileOrganizzazione.Indirizzo
+ )
invoice.efatt_stabile_organizzazione_civico = (
- CedentePrestatore.StabileOrganizzazione.NumeroCivico)
+ CedentePrestatore.StabileOrganizzazione.NumeroCivico
+ )
invoice.efatt_stabile_organizzazione_cap = (
- CedentePrestatore.StabileOrganizzazione.CAP)
+ CedentePrestatore.StabileOrganizzazione.CAP
+ )
invoice.efatt_stabile_organizzazione_comune = (
- CedentePrestatore.StabileOrganizzazione.Comune)
+ CedentePrestatore.StabileOrganizzazione.Comune
+ )
invoice.efatt_stabile_organizzazione_provincia = (
- CedentePrestatore.StabileOrganizzazione.Provincia)
+ CedentePrestatore.StabileOrganizzazione.Provincia
+ )
invoice.efatt_stabile_organizzazione_nazione = (
- CedentePrestatore.StabileOrganizzazione.Nazione)
+ CedentePrestatore.StabileOrganizzazione.Nazione
+ )
def get_purchase_journal(self, company):
- journal_model = self.env['account.journal']
+ journal_model = self.env["account.journal"]
journals = journal_model.search(
- [
- ('type', '=', 'purchase'),
- ('company_id', '=', company.id)
- ],
- limit=1)
+ [("type", "=", "purchase"), ("company_id", "=", company.id)], limit=1
+ )
if not journals:
raise UserError(
- _(
- "Define a purchase journal "
- "for this company: '%s' (id: %d)."
- ) % (company.name, company.id)
+ _("Define a purchase journal " "for this company: '%s' (id: %d).")
+ % (company.name, company.id)
)
return journals[0]
def create_e_invoice_line(self, line):
vals = {
- 'line_number': int(line.NumeroLinea or 0),
- 'service_type': line.TipoCessionePrestazione,
- 'name': line.Descrizione,
- 'qty': float(line.Quantita or 0),
- 'uom': line.UnitaMisura,
- 'period_start_date': line.DataInizioPeriodo,
- 'period_end_date': line.DataFinePeriodo,
- 'unit_price': float(line.PrezzoUnitario or 0),
- 'total_price': float(line.PrezzoTotale or 0),
- 'tax_amount': float(line.AliquotaIVA or 0),
- 'wt_amount': line.Ritenuta,
- 'tax_kind': line.Natura,
- 'admin_ref': line.RiferimentoAmministrazione,
+ "line_number": int(line.NumeroLinea or 0),
+ "service_type": line.TipoCessionePrestazione,
+ "name": line.Descrizione,
+ "qty": float(line.Quantita or 0),
+ "uom": line.UnitaMisura,
+ "period_start_date": line.DataInizioPeriodo,
+ "period_end_date": line.DataFinePeriodo,
+ "unit_price": float(line.PrezzoUnitario or 0),
+ "total_price": float(line.PrezzoTotale or 0),
+ "tax_amount": float(line.AliquotaIVA or 0),
+ "wt_amount": line.Ritenuta,
+ "tax_kind": line.Natura,
+ "admin_ref": line.RiferimentoAmministrazione,
}
- einvoiceline = self.env['einvoice.line'].create(vals)
+ einvoiceline = self.env["einvoice.line"].create(vals)
if line.CodiceArticolo:
for caline in line.CodiceArticolo:
- self.env['fatturapa.article.code'].create(
+ self.env["fatturapa.article.code"].create(
{
- 'name': caline.CodiceTipo or '',
- 'code_val': caline.CodiceValore or '',
- 'e_invoice_line_id': einvoiceline.id
+ "name": caline.CodiceTipo or "",
+ "code_val": caline.CodiceValore or "",
+ "e_invoice_line_id": einvoiceline.id,
}
)
if line.ScontoMaggiorazione:
for DiscRisePriceLine in line.ScontoMaggiorazione:
DiscRisePriceVals = self.with_context(
- drtype='e_invoice_line_id'
- )._prepareDiscRisePriceLine(
- einvoiceline.id, DiscRisePriceLine
- )
- self.env['discount.rise.price'].create(DiscRisePriceVals)
+ drtype="e_invoice_line_id"
+ )._prepareDiscRisePriceLine(einvoiceline.id, DiscRisePriceLine)
+ self.env["discount.rise.price"].create(DiscRisePriceVals)
if line.AltriDatiGestionali:
for dato in line.AltriDatiGestionali:
- self.env['einvoice.line.other.data'].create(
+ self.env["einvoice.line.other.data"].create(
{
- 'name': dato.TipoDato,
- 'text_ref': dato.RiferimentoTesto,
- 'num_ref': float(dato.RiferimentoNumero or 0),
- 'date_ref': dato.RiferimentoData,
- 'e_invoice_line_id': einvoiceline.id
+ "name": dato.TipoDato,
+ "text_ref": dato.RiferimentoTesto,
+ "num_ref": float(dato.RiferimentoNumero or 0),
+ "date_ref": dato.RiferimentoData,
+ "e_invoice_line_id": einvoiceline.id,
}
)
return einvoiceline
- def invoiceCreate(
- self, fatt, fatturapa_attachment, FatturaBody, partner_id
- ):
- partner_model = self.env['res.partner']
- invoice_model = self.env['account.invoice']
- currency_model = self.env['res.currency']
- ftpa_doctype_model = self.env['fiscal.document.type']
- rel_docs_model = self.env['fatturapa.related_document_type']
+ def invoiceCreate(self, fatt, fatturapa_attachment, FatturaBody, partner_id):
+ partner_model = self.env["res.partner"]
+ invoice_model = self.env["account.invoice"]
+ currency_model = self.env["res.currency"]
+ ftpa_doctype_model = self.env["fiscal.document.type"]
+ rel_docs_model = self.env["fatturapa.related_document_type"]
company = self.env.user.company_id
partner = partner_model.browse(partner_id)
@@ -872,73 +854,65 @@ def invoiceCreate(
# currency 2.1.1.2
currency = currency_model.search(
- [
- (
- 'name', '=',
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa
- )
- ])
+ [("name", "=", FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa)]
+ )
if not currency:
raise UserError(
_(
- 'No currency found with code %s.'
+ "No currency found with code %s."
% FatturaBody.DatiGenerali.DatiGeneraliDocumento.Divisa
)
)
purchase_journal = self.get_purchase_journal(company)
credit_account_id = purchase_journal.default_credit_account_id.id
- comment = ''
+ comment = ""
# 2.1.1
docType_id = False
- invtype = 'in_invoice'
+ invtype = "in_invoice"
docType = FatturaBody.DatiGenerali.DatiGeneraliDocumento.TipoDocumento
if docType:
- docType_record = ftpa_doctype_model.search(
- [
- ('code', '=', docType)
- ]
- )
+ docType_record = ftpa_doctype_model.search([("code", "=", docType)])
if docType_record:
docType_id = docType_record[0].id
else:
- raise UserError(
- _("Document type %s not handled.")
- % docType)
- if docType == 'TD04':
- invtype = 'in_refund'
+ raise UserError(_("Document type %s not handled.") % docType)
+ if docType == "TD04":
+ invtype = "in_refund"
# 2.1.1.11
causLst = FatturaBody.DatiGenerali.DatiGeneraliDocumento.Causale
if causLst:
for rel_doc in causLst:
- comment += rel_doc + '\n'
+ comment += rel_doc + "\n"
if fatturapa_attachment.e_invoice_received_date:
- e_invoice_received_date = fatturapa_attachment.\
- e_invoice_received_date.date()
+ e_invoice_received_date = (
+ fatturapa_attachment.e_invoice_received_date.date()
+ )
else:
e_invoice_received_date = fatturapa_attachment.create_date.date()
e_invoice_date = datetime.strptime(
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data, '%Y-%m-%d').date()
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data, "%Y-%m-%d"
+ ).date()
invoice_data = {
- 'e_invoice_received_date': e_invoice_received_date,
- 'date': e_invoice_received_date
- if company.in_invoice_registration_date == 'rec_date' else e_invoice_date,
- 'fiscal_document_type_id': docType_id,
- 'sender': fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
- 'account_id': pay_acc_id,
- 'type': invtype,
- 'partner_id': partner_id,
- 'currency_id': currency[0].id,
- 'journal_id': purchase_journal.id,
+ "e_invoice_received_date": e_invoice_received_date,
+ "date": e_invoice_received_date
+ if company.in_invoice_registration_date == "rec_date"
+ else e_invoice_date,
+ "fiscal_document_type_id": docType_id,
+ "sender": fatt.FatturaElettronicaHeader.SoggettoEmittente or False,
+ "account_id": pay_acc_id,
+ "type": invtype,
+ "partner_id": partner_id,
+ "currency_id": currency[0].id,
+ "journal_id": purchase_journal.id,
# 'origin': xmlData.datiOrdineAcquisto,
- 'fiscal_position_id': (
- partner.property_account_position_id.id or False),
- 'payment_term_id': partner.property_supplier_payment_term_id.id,
- 'company_id': company.id,
- 'fatturapa_attachment_in_id': fatturapa_attachment.id,
- 'comment': comment
+ "fiscal_position_id": (partner.property_account_position_id.id or False),
+ "payment_term_id": partner.property_supplier_payment_term_id.id,
+ "company_id": company.id,
+ "fatturapa_attachment_in_id": fatturapa_attachment.id,
+ "comment": comment,
}
# 2.1.1.10
@@ -952,15 +926,15 @@ def invoiceCreate(
# 2.2.1
self.set_invoice_line_ids(
- FatturaBody, credit_account_id, partner, wt_founds, invoice_data)
+ FatturaBody, credit_account_id, partner, wt_founds, invoice_data
+ )
self.set_e_invoice_lines(FatturaBody, invoice_data)
invoice = invoice_model.create(invoice_data)
# 2.1.1.7
- self.set_welfares_fund(
- FatturaBody, credit_account_id, invoice, wt_founds)
+ self.set_welfares_fund(FatturaBody, credit_account_id, invoice, wt_founds)
invoice._onchange_invoice_line_wt_ids()
invoice._onchange_payment_term_date_invoice()
@@ -971,23 +945,22 @@ def invoiceCreate(
rel_docs_dict = {
# 2.1.2
- 'order': FatturaBody.DatiGenerali.DatiOrdineAcquisto,
+ "order": FatturaBody.DatiGenerali.DatiOrdineAcquisto,
# 2.1.3
- 'contract': FatturaBody.DatiGenerali.DatiContratto,
+ "contract": FatturaBody.DatiGenerali.DatiContratto,
# 2.1.4
- 'agreement': FatturaBody.DatiGenerali.DatiConvenzione,
+ "agreement": FatturaBody.DatiGenerali.DatiConvenzione,
# 2.1.5
- 'reception': FatturaBody.DatiGenerali.DatiRicezione,
+ "reception": FatturaBody.DatiGenerali.DatiRicezione,
# 2.1.6
- 'invoice': FatturaBody.DatiGenerali.DatiFattureCollegate,
+ "invoice": FatturaBody.DatiGenerali.DatiFattureCollegate,
}
for rel_doc_key, rel_doc_data in rel_docs_dict.items():
if not rel_doc_data:
continue
for rel_doc in rel_doc_data:
- doc_datas = self._prepareRelDocsLine(
- invoice_id, rel_doc, rel_doc_key)
+ doc_datas = self._prepareRelDocsLine(invoice_id, rel_doc, rel_doc_key)
for doc_data in doc_datas:
# Note for v12: must take advantage of batch creation
rel_docs_model.create(doc_data)
@@ -1017,7 +990,8 @@ def invoiceCreate(
self.set_attachments_data(FatturaBody, invoice_id)
self._addGlobalDiscount(
- invoice_id, FatturaBody.DatiGenerali.DatiGeneraliDocumento)
+ invoice_id, FatturaBody.DatiGenerali.DatiGeneraliDocumento
+ )
self.set_roundings(FatturaBody, invoice)
@@ -1029,25 +1003,26 @@ def invoiceCreate(
def set_vendor_bill_data(self, FatturaBody, invoice):
if not invoice.date_invoice:
- invoice.update({
- 'date_invoice': datetime.strptime(
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data,
- '%Y-%m-%d').date(),
- })
+ invoice.update(
+ {
+ "date_invoice": datetime.strptime(
+ FatturaBody.DatiGenerali.DatiGeneraliDocumento.Data, "%Y-%m-%d"
+ ).date(),
+ }
+ )
if not invoice.reference:
- invoice.update({
- 'reference':
- FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
- })
+ invoice.update(
+ {
+ "reference": FatturaBody.DatiGenerali.DatiGeneraliDocumento.Numero,
+ }
+ )
def set_parent_invoice_data(self, FatturaBody, invoice):
ParentInvoice = FatturaBody.DatiGenerali.FatturaPrincipale
if ParentInvoice:
parentinv_vals = {
- 'related_invoice_code':
- ParentInvoice.NumeroFatturaPrincipale or '',
- 'related_invoice_date':
- ParentInvoice.DataFatturaPrincipale or False
+ "related_invoice_code": ParentInvoice.NumeroFatturaPrincipale or "",
+ "related_invoice_date": ParentInvoice.DataFatturaPrincipale or False,
}
invoice.write(parentinv_vals)
@@ -1055,54 +1030,56 @@ def set_vehicles_data(self, FatturaBody, invoice):
Vehicle = FatturaBody.DatiVeicoli
if Vehicle:
veicle_vals = {
- 'vehicle_registration': Vehicle.Data or False,
- 'total_travel': Vehicle.TotalePercorso or '',
+ "vehicle_registration": Vehicle.Data or False,
+ "total_travel": Vehicle.TotalePercorso or "",
}
invoice.write(veicle_vals)
def set_attachments_data(self, FatturaBody, invoice_id):
AttachmentsData = FatturaBody.Allegati
if AttachmentsData:
- self.env['fatturapa.attachment.in'].extract_attachments(
- AttachmentsData, invoice_id)
+ self.env["fatturapa.attachment.in"].extract_attachments(
+ AttachmentsData, invoice_id
+ )
def set_ddt_data(self, FatturaBody, invoice_id):
DdtDatas = FatturaBody.DatiGenerali.DatiDDT
if not DdtDatas:
return
- invoice_line_model = self.env['account.invoice.line']
- DdTModel = self.env['fatturapa.related_ddt']
+ invoice_line_model = self.env["account.invoice.line"]
+ DdTModel = self.env["fatturapa.related_ddt"]
for DdtDataLine in DdtDatas:
if not DdtDataLine.RiferimentoNumeroLinea:
DdTModel.create(
{
- 'name': DdtDataLine.NumeroDDT or '',
- 'date': DdtDataLine.DataDDT or False,
- 'invoice_id': invoice_id
+ "name": DdtDataLine.NumeroDDT or "",
+ "date": DdtDataLine.DataDDT or False,
+ "invoice_id": invoice_id,
}
)
else:
for numline in DdtDataLine.RiferimentoNumeroLinea:
invoice_lines = invoice_line_model.search(
[
- ('invoice_id', '=', invoice_id),
- ('sequence', '=', int(numline)),
- ])
+ ("invoice_id", "=", invoice_id),
+ ("sequence", "=", int(numline)),
+ ]
+ )
invoice_lineid = False
if invoice_lines:
invoice_lineid = invoice_lines[0].id
DdTModel.create(
{
- 'name': DdtDataLine.NumeroDDT or '',
- 'date': DdtDataLine.DataDDT or False,
- 'invoice_id': invoice_id,
- 'invoice_line_id': invoice_lineid
+ "name": DdtDataLine.NumeroDDT or "",
+ "date": DdtDataLine.DataDDT or False,
+ "invoice_id": invoice_id,
+ "invoice_line_id": invoice_lineid,
}
)
def set_art73(self, FatturaBody, invoice_data):
if FatturaBody.DatiGenerali.DatiGeneraliDocumento.Art73:
- invoice_data['art73'] = True
+ invoice_data["art73"] = True
def set_roundings(self, FatturaBody, invoice):
rounding = 0.0
@@ -1114,67 +1091,74 @@ def set_roundings(self, FatturaBody, invoice):
rounding += float(summary.Arrotondamento or 0.0)
if rounding:
- arrotondamenti_attivi_account_id = self.env.user.company_id.\
- arrotondamenti_attivi_account_id
+ arrotondamenti_attivi_account_id = (
+ self.env.user.company_id.arrotondamenti_attivi_account_id
+ )
if not arrotondamenti_attivi_account_id:
- raise UserError(_("Round up account is not set "
- "in Accounting Settings"))
+ raise UserError(
+ _("Round up account is not set " "in Accounting Settings")
+ )
- arrotondamenti_passivi_account_id = self.env.user.company_id.\
- arrotondamenti_passivi_account_id
+ arrotondamenti_passivi_account_id = (
+ self.env.user.company_id.arrotondamenti_passivi_account_id
+ )
if not arrotondamenti_passivi_account_id:
- raise UserError(_("Round down account is not set "
- "in Accounting Settings"))
+ raise UserError(
+ _("Round down account is not set " "in Accounting Settings")
+ )
- arrotondamenti_tax_id = self.env.user.company_id.\
- arrotondamenti_tax_id
+ arrotondamenti_tax_id = self.env.user.company_id.arrotondamenti_tax_id
if not arrotondamenti_tax_id:
- self.log_inconsistency(
- _('Round up and down tax is not set')
- )
+ self.log_inconsistency(_("Round up and down tax is not set"))
- line_sequence = max(invoice.invoice_line_ids.mapped('sequence'))
+ line_sequence = max(invoice.invoice_line_ids.mapped("sequence"))
line_vals = []
for summary in FatturaBody.DatiBeniServizi.DatiRiepilogo:
to_round = float(summary.Arrotondamento or 0.0)
if to_round != 0.0:
account_taxes = self.get_account_taxes(
- summary.AliquotaIVA, summary.Natura)
- arrotondamenti_account_id = arrotondamenti_passivi_account_id.id\
- if to_round > 0.0 else arrotondamenti_attivi_account_id.id
- invoice_line_tax_id = account_taxes[0].id if account_taxes\
+ summary.AliquotaIVA, summary.Natura
+ )
+ arrotondamenti_account_id = (
+ arrotondamenti_passivi_account_id.id
+ if to_round > 0.0
+ else arrotondamenti_attivi_account_id.id
+ )
+ invoice_line_tax_id = (
+ account_taxes[0].id
+ if account_taxes
else arrotondamenti_tax_id.id
- name = _("Rounding down") if to_round > 0.0 else _(
- "Rounding up")
+ )
+ name = _("Rounding down") if to_round > 0.0 else _("Rounding up")
line_sequence += 1
- line_vals.append({
- 'sequence': line_sequence,
- 'invoice_id': invoice.id,
- 'name': name,
- 'account_id': arrotondamenti_account_id,
- 'price_unit': to_round,
- 'invoice_line_tax_ids':
- [(6, 0, [invoice_line_tax_id])],
- })
+ line_vals.append(
+ {
+ "sequence": line_sequence,
+ "invoice_id": invoice.id,
+ "name": name,
+ "account_id": arrotondamenti_account_id,
+ "price_unit": to_round,
+ "invoice_line_tax_ids": [(6, 0, [invoice_line_tax_id])],
+ }
+ )
if line_vals:
- self.env['account.invoice.line'].create(line_vals)
+ self.env["account.invoice.line"].create(line_vals)
def set_efatt_rounding(self, FatturaBody, invoice_data):
if FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento:
- invoice_data['efatt_rounding'] = float(
+ invoice_data["efatt_rounding"] = float(
FatturaBody.DatiGenerali.DatiGeneraliDocumento.Arrotondamento
)
def set_activity_progress(self, FatturaBody, invoice_id):
SalDatas = FatturaBody.DatiGenerali.DatiSAL
if SalDatas:
- SalModel = self.env['faturapa.activity.progress']
+ SalModel = self.env["faturapa.activity.progress"]
for SalDataLine in SalDatas:
SalModel.create(
{
- 'fatturapa_activity_progress':
- SalDataLine.RiferimentoFase or 0,
- 'invoice_id': invoice_id
+ "fatturapa_activity_progress": SalDataLine.RiferimentoFase or 0,
+ "invoice_id": invoice_id,
}
)
@@ -1191,237 +1175,236 @@ def _get_last_due_date(self, DatiPagamento):
def set_payments_data(self, FatturaBody, invoice_id, partner_id):
PaymentsData = FatturaBody.DatiPagamento
- partner = self.env['res.partner'].browse(partner_id)
+ partner = self.env["res.partner"].browse(partner_id)
if not partner.property_supplier_payment_term_id:
due_dates = self._get_last_due_date(FatturaBody.DatiPagamento)
if due_dates:
- self.env['account.invoice'].browse(invoice_id).date_due = due_dates[0]
+ self.env["account.invoice"].browse(invoice_id).date_due = due_dates[0]
if PaymentsData:
- PaymentDataModel = self.env['fatturapa.payment.data']
- PaymentTermsModel = self.env['fatturapa.payment_term']
+ PaymentDataModel = self.env["fatturapa.payment.data"]
+ PaymentTermsModel = self.env["fatturapa.payment_term"]
for PaymentLine in PaymentsData:
cond = PaymentLine.CondizioniPagamento or False
if not cond:
- raise UserError(
- _('Payment method code not found in document.')
- )
- terms = PaymentTermsModel.search([('code', '=', cond)])
+ raise UserError(_("Payment method code not found in document."))
+ terms = PaymentTermsModel.search([("code", "=", cond)])
if not terms:
- raise UserError(
- _('Payment method code %s is incorrect.') % cond
- )
+ raise UserError(_("Payment method code %s is incorrect.") % cond)
else:
term_id = terms[0].id
PayDataId = PaymentDataModel.create(
- {
- 'payment_terms': term_id,
- 'invoice_id': invoice_id
- }
+ {"payment_terms": term_id, "invoice_id": invoice_id}
).id
self._createPaymentsLine(PayDataId, PaymentLine, partner_id)
def set_withholding_tax(self, FatturaBody, invoice_data):
- Withholdings = FatturaBody.DatiGenerali. \
- DatiGeneraliDocumento.DatiRitenuta
+ Withholdings = FatturaBody.DatiGenerali.DatiGeneraliDocumento.DatiRitenuta
if not Withholdings:
return None
- invoice_data['ftpa_withholding_ids'] = []
+ invoice_data["ftpa_withholding_ids"] = []
wt_founds = []
for Withholding in Withholdings:
- wts = self.env['withholding.tax'].search([
- ('causale_pagamento_id.code', '=', Withholding.CausalePagamento)
- ])
+ wts = self.env["withholding.tax"].search(
+ [("causale_pagamento_id.code", "=", Withholding.CausalePagamento)]
+ )
if not wts:
- raise UserError(_(
- "The bill contains withholding tax with "
- "payment reason %s, "
- "but such a tax is not found in your system. Please "
- "set it."
- ) % Withholding.CausalePagamento)
+ raise UserError(
+ _(
+ "The bill contains withholding tax with "
+ "payment reason %s, "
+ "but such a tax is not found in your system. Please "
+ "set it."
+ )
+ % Withholding.CausalePagamento
+ )
for wt in wts:
if (
- wt.tax == float(Withholding.AliquotaRitenuta) and
- WT_CODES_MAPPING[Withholding.TipoRitenuta] == wt.wt_types
+ wt.tax == float(Withholding.AliquotaRitenuta)
+ and WT_CODES_MAPPING[Withholding.TipoRitenuta] == wt.wt_types
):
wt_founds.append(wt)
break
else:
- raise UserError(_(
- "No withholding tax found with "
- "document payment reason %s, rate %s and type %s.")
+ raise UserError(
+ _(
+ "No withholding tax found with "
+ "document payment reason %s, rate %s and type %s."
+ )
% (
Withholding.CausalePagamento,
Withholding.AliquotaRitenuta,
- WT_CODES_MAPPING[Withholding.TipoRitenuta]
- ))
- invoice_data['ftpa_withholding_ids'].append((
- 0, 0, {
- 'name': Withholding.TipoRitenuta,
- 'amount': Withholding.ImportoRitenuta,
- }))
+ WT_CODES_MAPPING[Withholding.TipoRitenuta],
+ )
+ )
+ invoice_data["ftpa_withholding_ids"].append(
+ (
+ 0,
+ 0,
+ {
+ "name": Withholding.TipoRitenuta,
+ "amount": Withholding.ImportoRitenuta,
+ },
+ )
+ )
return wt_founds
- def set_welfares_fund(
- self, FatturaBody, credit_account_id, invoice, wt_founds
- ):
- if not self.e_invoice_detail_level == '2':
+ def set_welfares_fund(self, FatturaBody, credit_account_id, invoice, wt_founds):
+ if not self.e_invoice_detail_level == "2":
return
- Welfares = FatturaBody.DatiGenerali. \
- DatiGeneraliDocumento.DatiCassaPrevidenziale
+ Welfares = FatturaBody.DatiGenerali.DatiGeneraliDocumento.DatiCassaPrevidenziale
if not Welfares:
return
- WelfareFundLineModel = self.env['welfare.fund.data.line']
+ WelfareFundLineModel = self.env["welfare.fund.data.line"]
for welfareLine in Welfares:
WalfarLineVals = self._prepareWelfareLine(invoice.id, welfareLine)
WelfareFundLineModel.create(WalfarLineVals)
- if welfareLine.TipoCassa == 'TC07':
+ if welfareLine.TipoCassa == "TC07":
continue
line_vals = self._prepare_generic_line_data(welfareLine)
- line_vals.update({
- 'name': _(
- "Welfare Fund: %s") % welfareLine.TipoCassa,
- 'price_unit': float(welfareLine.ImportoContributoCassa),
- 'invoice_id': invoice.id,
- 'account_id': credit_account_id,
- })
+ line_vals.update(
+ {
+ "name": _("Welfare Fund: %s") % welfareLine.TipoCassa,
+ "price_unit": float(welfareLine.ImportoContributoCassa),
+ "invoice_id": invoice.id,
+ "account_id": credit_account_id,
+ }
+ )
if welfareLine.Ritenuta:
if not wt_founds:
- raise UserError(_(
- "Welfare Fund data %s has withholding tax but no "
- "withholding tax was found in the system."
- ) % welfareLine.TipoCassa)
- line_vals['invoice_line_tax_wt_ids'] = [
- (6, 0, [wt.id for wt in wt_founds])]
+ raise UserError(
+ _(
+ "Welfare Fund data %s has withholding tax but no "
+ "withholding tax was found in the system."
+ )
+ % welfareLine.TipoCassa
+ )
+ line_vals["invoice_line_tax_wt_ids"] = [
+ (6, 0, [wt.id for wt in wt_founds])
+ ]
if self.env.user.company_id.cassa_previdenziale_product_id:
- cassa_previdenziale_product = self.env.user.company_id \
- .cassa_previdenziale_product_id
- line_vals['product_id'] = cassa_previdenziale_product.id
- line_vals['name'] = cassa_previdenziale_product.name
- self.adjust_accounting_data(
- cassa_previdenziale_product, line_vals
+ cassa_previdenziale_product = (
+ self.env.user.company_id.cassa_previdenziale_product_id
)
- self.env['account.invoice.line'].create(line_vals)
+ line_vals["product_id"] = cassa_previdenziale_product.id
+ line_vals["name"] = cassa_previdenziale_product.name
+ self.adjust_accounting_data(cassa_previdenziale_product, line_vals)
+ self.env["account.invoice.line"].create(line_vals)
def set_delivery_data(self, FatturaBody, invoice):
Delivery = FatturaBody.DatiGenerali.DatiTrasporto
if Delivery:
delivery_id = self.getCarrirerPartner(Delivery)
delivery_dict = {
- 'carrier_id': delivery_id,
- 'transport_vehicle': Delivery.MezzoTrasporto or '',
- 'transport_reason': Delivery.CausaleTrasporto or '',
- 'number_items': Delivery.NumeroColli or 0,
- 'description': Delivery.Descrizione or '',
- 'unit_weight': Delivery.UnitaMisuraPeso or 0.0,
- 'gross_weight': Delivery.PesoLordo or 0.0,
- 'net_weight': Delivery.PesoNetto or 0.0,
- 'pickup_datetime': Delivery.DataOraRitiro or False,
- 'transport_date': Delivery.DataInizioTrasporto or False,
- 'delivery_datetime': Delivery.DataOraConsegna or False,
- 'delivery_address': '',
- 'ftpa_incoterms': Delivery.TipoResa,
+ "carrier_id": delivery_id,
+ "transport_vehicle": Delivery.MezzoTrasporto or "",
+ "transport_reason": Delivery.CausaleTrasporto or "",
+ "number_items": Delivery.NumeroColli or 0,
+ "description": Delivery.Descrizione or "",
+ "unit_weight": Delivery.UnitaMisuraPeso or 0.0,
+ "gross_weight": Delivery.PesoLordo or 0.0,
+ "net_weight": Delivery.PesoNetto or 0.0,
+ "pickup_datetime": Delivery.DataOraRitiro or False,
+ "transport_date": Delivery.DataInizioTrasporto or False,
+ "delivery_datetime": Delivery.DataOraConsegna or False,
+ "delivery_address": "",
+ "ftpa_incoterms": Delivery.TipoResa,
}
if Delivery.IndirizzoResa:
- delivery_dict['delivery_address'] = (
- '{0}, {1}\n{2} - {3}\n{4} {5}'.format(
- Delivery.IndirizzoResa.Indirizzo or '',
- Delivery.IndirizzoResa.NumeroCivico or '',
- Delivery.IndirizzoResa.CAP or '',
- Delivery.IndirizzoResa.Comune or '',
- Delivery.IndirizzoResa.Provincia or '',
- Delivery.IndirizzoResa.Nazione or ''
- )
+ delivery_dict["delivery_address"] = "{}, {}\n{} - {}\n{} {}".format(
+ Delivery.IndirizzoResa.Indirizzo or "",
+ Delivery.IndirizzoResa.NumeroCivico or "",
+ Delivery.IndirizzoResa.CAP or "",
+ Delivery.IndirizzoResa.Comune or "",
+ Delivery.IndirizzoResa.Provincia or "",
+ Delivery.IndirizzoResa.Nazione or "",
)
invoice.write(delivery_dict)
def set_summary_data(self, FatturaBody, invoice_id):
Summary_datas = FatturaBody.DatiBeniServizi.DatiRiepilogo
- summary_data_model = self.env['faturapa.summary.data']
+ summary_data_model = self.env["faturapa.summary.data"]
if Summary_datas:
for summary in Summary_datas:
summary_line = {
- 'tax_rate': summary.AliquotaIVA or 0.0,
- 'non_taxable_nature': summary.Natura or False,
- 'incidental_charges': summary.SpeseAccessorie or 0.0,
- 'rounding': summary.Arrotondamento or 0.0,
- 'amount_untaxed': summary.ImponibileImporto or 0.0,
- 'amount_tax': summary.Imposta or 0.0,
- 'payability': summary.EsigibilitaIVA or False,
- 'law_reference': summary.RiferimentoNormativo or '',
- 'invoice_id': invoice_id,
+ "tax_rate": summary.AliquotaIVA or 0.0,
+ "non_taxable_nature": summary.Natura or False,
+ "incidental_charges": summary.SpeseAccessorie or 0.0,
+ "rounding": summary.Arrotondamento or 0.0,
+ "amount_untaxed": summary.ImponibileImporto or 0.0,
+ "amount_tax": summary.Imposta or 0.0,
+ "payability": summary.EsigibilitaIVA or False,
+ "law_reference": summary.RiferimentoNormativo or "",
+ "invoice_id": invoice_id,
}
summary_data_model.create(summary_line)
def set_e_invoice_lines(self, FatturaBody, invoice_data):
- e_invoice_lines = self.env['einvoice.line'].browse()
+ e_invoice_lines = self.env["einvoice.line"].browse()
for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
e_invoice_lines |= self.create_e_invoice_line(line)
if e_invoice_lines:
- invoice_data['e_invoice_line_ids'] = [(6, 0, e_invoice_lines.ids)]
+ invoice_data["e_invoice_line_ids"] = [(6, 0, e_invoice_lines.ids)]
- def _set_invoice_lines(self, product, invoice_line_data, invoice_lines,
- invoice_line_model):
+ def _set_invoice_lines(
+ self, product, invoice_line_data, invoice_lines, invoice_line_model
+ ):
if product:
- invoice_line_data['product_id'] = product.id
+ invoice_line_data["product_id"] = product.id
self.adjust_accounting_data(product, invoice_line_data)
- invoice_line_id = invoice_line_model.create(
- invoice_line_data).id
+ invoice_line_id = invoice_line_model.create(invoice_line_data).id
invoice_lines.append(invoice_line_id)
def set_invoice_line_ids(
- self, FatturaBody, credit_account_id, partner, wt_founds,
- invoice_data):
+ self, FatturaBody, credit_account_id, partner, wt_founds, invoice_data
+ ):
- if self.e_invoice_detail_level == '0':
+ if self.e_invoice_detail_level == "0":
return
invoice_lines = []
- invoice_line_model = self.env['account.invoice.line']
- if self.e_invoice_detail_level == '1':
+ invoice_line_model = self.env["account.invoice.line"]
+ if self.e_invoice_detail_level == "1":
for nline, line in enumerate(FatturaBody.DatiBeniServizi.DatiRiepilogo):
invoice_line_data = self._prepareInvoiceLineAliquota(
- credit_account_id, line, nline)
+ credit_account_id, line, nline
+ )
product = partner.e_invoice_default_product_id
- self._set_invoice_lines(product, invoice_line_data, invoice_lines,
- invoice_line_model)
+ self._set_invoice_lines(
+ product, invoice_line_data, invoice_lines, invoice_line_model
+ )
- elif self.e_invoice_detail_level == '2':
+ elif self.e_invoice_detail_level == "2":
for line in FatturaBody.DatiBeniServizi.DettaglioLinee:
invoice_line_data = self._prepareInvoiceLine(
- credit_account_id, line, wt_founds)
+ credit_account_id, line, wt_founds
+ )
product = self.get_line_product(line, partner)
- self._set_invoice_lines(product, invoice_line_data, invoice_lines,
- invoice_line_model)
+ self._set_invoice_lines(
+ product, invoice_line_data, invoice_lines, invoice_line_model
+ )
- invoice_data['invoice_line_ids'] = [(6, 0, invoice_lines)]
+ invoice_data["invoice_line_ids"] = [(6, 0, invoice_lines)]
def check_invoice_amount(self, invoice, FatturaElettronicaBody):
- if (
- FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
- ScontoMaggiorazione and
- FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
- ImportoTotaleDocumento
- ):
+ dgd = FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento
+ if dgd.ScontoMaggiorazione and dgd.ImportoTotaleDocumento:
# assuming that, if someone uses
# DatiGeneraliDocumento.ScontoMaggiorazione, also fills
# DatiGeneraliDocumento.ImportoTotaleDocumento
- ImportoTotaleDocumento = float(
- FatturaElettronicaBody.DatiGenerali.DatiGeneraliDocumento.
- ImportoTotaleDocumento)
+ ImportoTotaleDocumento = float(dgd.ImportoTotaleDocumento)
if not float_is_zero(
- invoice.amount_total-ImportoTotaleDocumento, precision_digits=2
+ invoice.amount_total - ImportoTotaleDocumento, precision_digits=2
):
self.log_inconsistency(
- _('Bill total %s is different from '
- 'document total amount %s')
+ _("Bill total %s is different from " "document total amount %s")
% (invoice.amount_total, ImportoTotaleDocumento)
)
else:
@@ -1429,14 +1412,12 @@ def check_invoice_amount(self, invoice, FatturaElettronicaBody):
# DatiGeneraliDocumento.ScontoMaggiorazione is not present,
# because otherwise DatiRiepilogo and odoo invoice total would
# differ
- amount_untaxed = invoice.compute_xml_amount_untaxed(
- FatturaElettronicaBody)
+ amount_untaxed = invoice.compute_xml_amount_untaxed(FatturaElettronicaBody)
if not float_is_zero(
- invoice.amount_untaxed-amount_untaxed, precision_digits=2
+ invoice.amount_untaxed - amount_untaxed, precision_digits=2
):
self.log_inconsistency(
- _('Computed amount untaxed %s is different from'
- ' summary data %s')
+ _("Computed amount untaxed %s is different from" " summary data %s")
% (invoice.amount_untaxed, amount_untaxed)
)
@@ -1446,85 +1427,75 @@ def get_invoice_obj(self, fatturapa_attachment):
@api.multi
def importFatturaPA(self):
- fatturapa_attachment_obj = self.env['fatturapa.attachment.in']
- fatturapa_attachment_ids = self.env.context.get('active_ids', False)
- invoice_model = self.env['account.invoice']
+ fatturapa_attachment_obj = self.env["fatturapa.attachment.in"]
+ fatturapa_attachment_ids = self.env.context.get("active_ids", False)
+ invoice_model = self.env["account.invoice"]
new_invoices = []
for fatturapa_attachment_id in fatturapa_attachment_ids:
- self.__dict__.update(
- self.with_context(inconsistencies='').__dict__
- )
+ self.__dict__.update(self.with_context(inconsistencies="").__dict__)
fatturapa_attachment = fatturapa_attachment_obj.browse(
- fatturapa_attachment_id)
+ fatturapa_attachment_id
+ )
if fatturapa_attachment.in_invoice_ids:
- raise UserError(
- _("File is linked to bills yet."))
+ raise UserError(_("File is linked to bills yet."))
fatt = self.get_invoice_obj(fatturapa_attachment)
cedentePrestatore = fatt.FatturaElettronicaHeader.CedentePrestatore
# 1.2
partner_id = self.getCedPrest(cedentePrestatore)
# 1.3
- TaxRappresentative = fatt.FatturaElettronicaHeader.\
- RappresentanteFiscale
+ TaxRappresentative = fatt.FatturaElettronicaHeader.RappresentanteFiscale
# 1.5
- Intermediary = fatt.FatturaElettronicaHeader.\
- TerzoIntermediarioOSoggettoEmittente
+ Intermediary = (
+ fatt.FatturaElettronicaHeader.TerzoIntermediarioOSoggettoEmittente
+ )
- generic_inconsistencies = ''
- if self.env.context.get('inconsistencies'):
- generic_inconsistencies = (
- self.env.context['inconsistencies'] + '\n\n')
+ generic_inconsistencies = ""
+ if self.env.context.get("inconsistencies"):
+ generic_inconsistencies = self.env.context["inconsistencies"] + "\n\n"
- xmlproblems = getattr(fatt, '_xmldoctor', None)
+ xmlproblems = getattr(fatt, "_xmldoctor", None)
if xmlproblems: # None or []
- generic_inconsistencies += '\n'.join(xmlproblems) + '\n\n'
+ generic_inconsistencies += "\n".join(xmlproblems) + "\n\n"
# 2
for fattura in fatt.FatturaElettronicaBody:
# reset inconsistencies
- self.__dict__.update(
- self.with_context(inconsistencies='').__dict__
- )
+ self.__dict__.update(self.with_context(inconsistencies="").__dict__)
invoice_id = self.invoiceCreate(
- fatt, fatturapa_attachment, fattura, partner_id)
+ fatt, fatturapa_attachment, fattura, partner_id
+ )
invoice = invoice_model.browse(invoice_id)
self.set_StabileOrganizzazione(cedentePrestatore, invoice)
if TaxRappresentative:
tax_partner_id = self.getPartnerBase(
- TaxRappresentative.DatiAnagrafici, supplier=False)
- invoice.write(
- {
- 'tax_representative_id': tax_partner_id
- }
+ TaxRappresentative.DatiAnagrafici, supplier=False
)
+ invoice.write({"tax_representative_id": tax_partner_id})
if Intermediary:
Intermediary_id = self.getPartnerBase(
- Intermediary.DatiAnagrafici, supplier=False)
- invoice.write(
- {
- 'intermediary': Intermediary_id
- }
+ Intermediary.DatiAnagrafici, supplier=False
)
+ invoice.write({"intermediary": Intermediary_id})
new_invoices.append(invoice_id)
self.check_invoice_amount(invoice, fattura)
invoice.set_einvoice_data(fattura)
- if self.env.context.get('inconsistencies'):
- invoice_inconsistencies = (
- self.env.context['inconsistencies'])
+ if self.env.context.get("inconsistencies"):
+ invoice_inconsistencies = self.env.context["inconsistencies"]
else:
- invoice_inconsistencies = ''
+ invoice_inconsistencies = ""
invoice.inconsistencies = (
- generic_inconsistencies + invoice_inconsistencies)
+ generic_inconsistencies + invoice_inconsistencies
+ )
return {
- 'view_type': 'form',
- 'name': "Electronic Bills",
- 'view_mode': 'tree,form',
- 'res_model': 'account.invoice',
- 'type': 'ir.actions.act_window',
- 'domain': [('id', 'in', new_invoices)],
+ "view_type": "form",
+ "name": "Electronic Bills",
+ "view_mode": "tree,form",
+ "res_model": "account.invoice",
+ "type": "ir.actions.act_window",
+ "domain": [("id", "in", new_invoices)],
}
diff --git a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
index c064828bb51c..4fe66517c6cc 100644
--- a/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
+++ b/l10n_it_fatturapa_in/wizard/wizard_import_fatturapa_view.xml
@@ -1,4 +1,4 @@
-
+
@@ -6,26 +6,32 @@
Electronic Bill Import
wizard.import.fatturapa
-
+
-
+
-
+ view_id="wizard_import_fatturapa_form_view"
+ />
From ec32601f49c923bc2c9897fedfcb4f074362579c Mon Sep 17 00:00:00 2001
From: Marco Colombo
Date: Wed, 26 May 2021 15:05:20 +0200
Subject: [PATCH 102/155] [MIG] l10n_it_fatturapa_in: Migration to 14.0
---
l10n_it_fatturapa_in/README.rst | 13 +-
l10n_it_fatturapa_in/__manifest__.py | 7 +-
.../i18n/l10n_it_fatturapa_in.pot | 2 +-
l10n_it_fatturapa_in/models/account.py | 131 +++-----
l10n_it_fatturapa_in/models/attachment.py | 19 +-
l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst | 1 +
.../security/ir.model.access.csv | 3 +
l10n_it_fatturapa_in/security/rules.xml | 2 +-
.../static/description/index.html | 9 +-
.../tests/fatturapa_common.py | 57 ++--
.../tests/test_import_fatturapa_xml.py | 106 ++++---
l10n_it_fatturapa_in/views/account_view.xml | 144 +++++----
l10n_it_fatturapa_in/views/partner_view.xml | 2 +-
l10n_it_fatturapa_in/wizard/efattura.py | 75 ++++-
.../wizard/link_to_existing_invoice.py | 6 +-
.../wizard/link_to_existing_invoice.xml | 25 +-
.../wizard/wizard_import_fatturapa.py | 283 +++++++++++-------
.../wizard/wizard_import_fatturapa_view.xml | 19 +-
18 files changed, 497 insertions(+), 407 deletions(-)
diff --git a/l10n_it_fatturapa_in/README.rst b/l10n_it_fatturapa_in/README.rst
index ae20a2f5df03..6ef0b35fb13f 100644
--- a/l10n_it_fatturapa_in/README.rst
+++ b/l10n_it_fatturapa_in/README.rst
@@ -14,13 +14,13 @@ ITA - Fattura elettronica - Ricezione
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
- :target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_fatturapa_in
+ :target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_fatturapa_in
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_fatturapa_in
+ :target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_fatturapa_in
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/122/12.0
+ :target: https://runbot.odoo-community.org/runbot/122/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -91,7 +91,7 @@ See also the README file of l10n_it_fatturapa module.
For every supplier, it is possible to set the 'E-bills Detail Level':
- - Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill
+ - Minimum level: Bill is created with no lines; User will have to create them, according to what specified in the electronic bill
- Maximum level: Every line contained in electronic bill will create a line in bill
Moreover, in supplier form you can set the 'E-bill Default Product': this product will be used, during generation of bills, when no other possible product is found. Tax and account of bill line will be set according to what configured in the product.
@@ -152,7 +152,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -174,6 +174,7 @@ Contributors
* Sergio Zanchetta
* Giovanni Serra
* Gianmarco Conte
+* Marco Colombo
Maintainers
~~~~~~~~~~~
@@ -188,6 +189,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/l10n-italy `_ project on GitHub.
+This module is part of the `OCA/l10n-italy `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/l10n_it_fatturapa_in/__manifest__.py b/l10n_it_fatturapa_in/__manifest__.py
index 6f8b249018bd..7264a2103749 100644
--- a/l10n_it_fatturapa_in/__manifest__.py
+++ b/l10n_it_fatturapa_in/__manifest__.py
@@ -6,8 +6,8 @@
{
"name": "ITA - Fattura elettronica - Ricezione",
- "version": "12.0.2.1.3",
- "development_status": "Beta",
+ "version": "14.0.1.0.0",
+ "development_status": "Alpha",
"category": "Localization/Italy",
"summary": "Ricezione fatture elettroniche",
"author": "Agile Business Group, Innoviu, " "Odoo Community Association (OCA)",
@@ -15,7 +15,8 @@
"license": "AGPL-3",
"depends": [
"l10n_it_fatturapa",
- "l10n_it_withholding_tax_causali",
+ "l10n_it_fiscal_document_type",
+ "l10n_it_withholding_tax_reason",
],
"data": [
"views/account_view.xml",
diff --git a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
index 8457069a682d..ed161b23a446 100644
--- a/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
+++ b/l10n_it_fatturapa_in/i18n/l10n_it_fatturapa_in.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
diff --git a/l10n_it_fatturapa_in/models/account.py b/l10n_it_fatturapa_in/models/account.py
index e5a97431f61f..408a9d3a62e6 100644
--- a/l10n_it_fatturapa_in/models/account.py
+++ b/l10n_it_fatturapa_in/models/account.py
@@ -1,12 +1,10 @@
from odoo import _, api, fields, models
-from odoo.exceptions import UserError, ValidationError
+from odoo.exceptions import ValidationError
from odoo.tools import float_compare
-import odoo.addons.decimal_precision as dp
-
class AccountInvoice(models.Model):
- _inherit = "account.invoice"
+ _inherit = "account.move"
fatturapa_attachment_in_id = fields.Many2one(
"fatturapa.attachment.in", "E-bill Import File", ondelete="restrict", copy=False
@@ -42,78 +40,28 @@ class AccountInvoice(models.Model):
e_invoice_received_date = fields.Date(string="E-Bill Received Date")
- @api.multi
@api.depends(
- "invoice_line_ids.price_subtotal",
- "tax_line_ids.amount",
- "tax_line_ids.amount_rounding",
- "currency_id",
- "company_id",
- "date_invoice",
- "type",
- "efatt_rounding",
+ "line_ids.matched_debit_ids.debit_move_id.move_id.line_ids.amount_residual",
+ "line_ids.matched_debit_ids.debit_move_id.move_id.line_ids.amount_residual_currency", # noqa: B950
+ "line_ids.matched_credit_ids.credit_move_id.move_id.line_ids.amount_residual",
+ "line_ids.matched_credit_ids.credit_move_id.move_id.line_ids.amount_residual_currency", # noqa: B950
+ "line_ids.debit",
+ "line_ids.credit",
+ "line_ids.currency_id",
+ "line_ids.amount_currency",
+ "line_ids.amount_residual",
+ "line_ids.amount_residual_currency",
+ "line_ids.payment_id.state",
+ "line_ids.full_reconcile_id",
)
def _compute_amount(self):
super(AccountInvoice, self)._compute_amount()
for inv in self:
if inv.efatt_rounding != 0:
inv.amount_total += inv.efatt_rounding
- amount_total_company_signed = inv.amount_total
- if (
- inv.currency_id
- and inv.company_id
- and inv.currency_id != inv.company_id.currency_id
- ):
- currency_id = inv.currency_id
- amount_total_company_signed = currency_id._convert(
- inv.amount_total,
- inv.company_id.currency_id,
- inv.company_id,
- inv.date_invoice or fields.Date.today(),
- )
- sign = inv.type in ["in_refund", "out_refund"] and -1 or 1
- inv.amount_total_company_signed = amount_total_company_signed * sign
+ sign = inv.move_type in ["in_refund", "out_refund"] and -1 or 1
inv.amount_total_signed = inv.amount_total * sign
- @api.model
- def invoice_line_move_line_get(self):
- """Append global rounding move lines"""
- res = super().invoice_line_move_line_get()
-
- if self.efatt_rounding != 0:
- if self.efatt_rounding > 0:
- arrotondamenti_account_id = (
- self.env.user.company_id.arrotondamenti_passivi_account_id
- )
- if not arrotondamenti_account_id:
- raise UserError(
- _("Round down account is not set " "in Accounting Settings")
- )
- name = _("Rounding down")
- else:
- arrotondamenti_account_id = (
- self.env.user.company_id.arrotondamenti_attivi_account_id
- )
- if not arrotondamenti_account_id:
- raise UserError(
- _("Round up account is not set " "in Accounting Settings")
- )
- name = _("Rounding up")
-
- res.append(
- {
- "type": "global_rounding",
- "name": name,
- "price_unit": self.efatt_rounding,
- "quantity": 1,
- "price": self.efatt_rounding,
- "account_id": arrotondamenti_account_id.id,
- "invoice_id": self.id,
- }
- )
- return res
-
- @api.multi
def invoice_validate(self):
for invoice in self:
if (
@@ -216,19 +164,23 @@ def e_inv_dati_ritenuta(self):
return error_message
@api.depends(
- "type",
+ "move_type",
"state",
"fatturapa_attachment_in_id",
"amount_untaxed",
"amount_tax",
"amount_total",
- "reference",
- "date_invoice",
+ "ref",
+ "invoice_date",
)
def _compute_e_invoice_validation_error(self):
+ self.ensure_one()
+ self.e_invoice_validation_error = False
+ self.e_invoice_validation_message = False
+
bills_to_check = self.filtered(
- lambda inv: inv.type in ["in_invoice", "in_refund"]
- and inv.state in ["draft", "open", "paid"]
+ lambda inv: inv.is_purchase_document()
+ and inv.state in ["draft", "posted"]
and inv.fatturapa_attachment_in_id
)
for bill in bills_to_check:
@@ -250,21 +202,24 @@ def _compute_e_invoice_validation_error(self):
if error_message:
error_messages.append(error_message)
- if bill.e_invoice_reference and bill.reference != bill.e_invoice_reference:
+ if (
+ bill.e_invoice_reference
+ and bill.payment_reference != bill.e_invoice_reference
+ ):
error_messages.append(
_(
"Vendor reference ({bill_vendor_ref}) "
"does not match with "
"e-bill vendor reference ({e_bill_vendor_ref})"
).format(
- bill_vendor_ref=bill.reference or "",
+ bill_vendor_ref=bill.payment_reference or "",
e_bill_vendor_ref=bill.e_invoice_reference,
)
)
if (
bill.e_invoice_date_invoice
- and bill.e_invoice_date_invoice != bill.date_invoice
+ and bill.e_invoice_date_invoice != bill.invoice_date
):
error_messages.append(
_(
@@ -272,7 +227,7 @@ def _compute_e_invoice_validation_error(self):
"does not match with "
"e-bill invoice date ({e_bill_date_invoice})"
).format(
- bill_date_invoice=bill.date_invoice or "",
+ bill_date_invoice=bill.invoice_date or "",
e_bill_date_invoice=bill.e_invoice_date_invoice,
)
)
@@ -282,27 +237,25 @@ def _compute_e_invoice_validation_error(self):
bill.e_invoice_validation_error = True
bill.e_invoice_validation_message = ",\n".join(error_messages) + "."
- @api.multi
def name_get(self):
result = super(AccountInvoice, self).name_get()
res = []
for tup in result:
invoice = self.browse(tup[0])
- if invoice.type in ("in_invoice", "in_refund"):
+ if invoice.is_purchase_document():
name = "{}, {}".format(tup[1], invoice.partner_id.name)
if invoice.amount_total_signed:
name += ", {} {}".format(
invoice.amount_total_signed,
invoice.currency_id.symbol,
)
- if invoice.origin:
- name += ", %s" % invoice.origin
+ if invoice.invoice_origin:
+ name += ", %s" % invoice.invoice_origin
res.append((invoice.id, name))
else:
res.append(tup)
return res
- @api.multi
def remove_attachment_link(self):
self.ensure_one()
self.fatturapa_attachment_in_id = False
@@ -359,7 +312,7 @@ def process_negative_lines(self):
# if every line is negative, change them all
for line in self.invoice_line_ids:
line.price_unit = -line.price_unit
- self.compute_taxes()
+ self._recompute_dynamic_lines(recompute_all_taxes=True)
class FatturapaArticleCode(models.Model):
@@ -379,13 +332,13 @@ class AccountInvoiceLine(models.Model):
# '2.2.1.3', '2.2.1.6', '2.2.1.7',
# '2.2.1.8', '2.1.1.10'
# ]
- _inherit = "account.invoice.line"
+ _inherit = "account.move.line"
fatturapa_attachment_in_id = fields.Many2one(
"fatturapa.attachment.in",
"E-bill Import File",
readonly=True,
- related="invoice_id.fatturapa_attachment_in_id",
+ related="move_id.fatturapa_attachment_in_id",
)
@@ -400,7 +353,7 @@ class EInvoiceLine(models.Model):
_name = "einvoice.line"
_description = "E-invoice line"
invoice_id = fields.Many2one(
- "account.invoice", "Bill", readonly=True, ondelete="cascade"
+ "account.move", "Bill", readonly=True, ondelete="cascade"
)
line_number = fields.Integer("Line Number", readonly=True)
service_type = fields.Char("Sale Provision Type", readonly=True)
@@ -408,15 +361,11 @@ class EInvoiceLine(models.Model):
"fatturapa.article.code", "e_invoice_line_id", "Articles Code", readonly=True
)
name = fields.Char("Description", readonly=True)
- qty = fields.Float(
- "Quantity", readonly=True, digits=dp.get_precision("Product Unit of Measure")
- )
+ qty = fields.Float("Quantity", readonly=True, digits="Product Unit of Measure")
uom = fields.Char("Unit of measure", readonly=True)
period_start_date = fields.Date("Period Start Date", readonly=True)
period_end_date = fields.Date("Period End Date", readonly=True)
- unit_price = fields.Float(
- "Unit Price", readonly=True, digits=dp.get_precision("Product Price")
- )
+ unit_price = fields.Float("Unit Price", readonly=True, digits="Product Price")
discount_rise_price_ids = fields.One2many(
"discount.rise.price",
"e_invoice_line_id",
diff --git a/l10n_it_fatturapa_in/models/attachment.py b/l10n_it_fatturapa_in/models/attachment.py
index 0125d3bf6f18..ad4710e33825 100644
--- a/l10n_it_fatturapa_in/models/attachment.py
+++ b/l10n_it_fatturapa_in/models/attachment.py
@@ -18,7 +18,7 @@ class FatturaPAAttachmentIn(models.Model):
string="E-bill file name", related="ir_attachment_id.name", store=True
)
in_invoice_ids = fields.One2many(
- "account.invoice",
+ "account.move",
"fatturapa_attachment_in_id",
string="In Bills",
readonly=True,
@@ -62,6 +62,8 @@ class FatturaPAAttachmentIn(models.Model):
@api.depends("in_invoice_ids.e_invoice_validation_error")
def _compute_e_invoice_validation_error(self):
for att in self:
+ att.e_invoice_validation_error = False
+ att.e_invoice_validation_message = False
bills_with_error = att.in_invoice_ids.filtered(
lambda b: b.e_invoice_validation_error
)
@@ -78,17 +80,16 @@ def _compute_e_invoice_validation_error(self):
)
att.e_invoice_validation_message = "\n\n".join(error_messages)
- @api.onchange("datas_fname")
- def onchagne_datas_fname(self):
- self.name = self.datas_fname
-
def get_xml_string(self):
return self.ir_attachment_id.get_xml_string()
- @api.multi
@api.depends("ir_attachment_id.datas")
def _compute_xml_data(self):
for att in self:
+ att.xml_supplier_id = False
+ att.invoices_number = False
+ att.invoices_total = False
+ att.invoices_date = False
wiz_obj = self.env["wizard.import.fatturapa"].with_context(
from_attachment=att
)
@@ -104,15 +105,12 @@ def _compute_xml_data(self):
att.invoices_total += float(dgd.ImportoTotaleDocumento or 0)
invoice_date = format_date(
att.with_context(lang=att.env.user.lang).env,
- fields.Date.from_string(
- dgd.DatiGenerali.DatiGeneraliDocumento.Data
- ),
+ fields.Date.from_string(dgd.Data),
)
if invoice_date not in invoices_date:
invoices_date.append(invoice_date)
att.invoices_date = " ".join(invoices_date)
- @api.multi
@api.depends("in_invoice_ids")
def _compute_registered(self):
for att in self:
@@ -132,7 +130,6 @@ def extract_attachments(self, AttachmentsData, invoice_id):
_attach_dict = {
"name": name,
"datas": base64.b64encode(content),
- "datas_fname": name,
"description": attach.DescrizioneAttachment or "",
"compression": attach.AlgoritmoCompressione or "",
"format": attach.FormatoAttachment or "",
diff --git a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
index 1a84bfecc996..d592bfd1ebf4 100644
--- a/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
+++ b/l10n_it_fatturapa_in/readme/CONTRIBUTORS.rst
@@ -4,3 +4,4 @@
* Sergio Zanchetta
* Giovanni Serra
* Gianmarco Conte
+* Marco Colombo
diff --git a/l10n_it_fatturapa_in/security/ir.model.access.csv b/l10n_it_fatturapa_in/security/ir.model.access.csv
index 056d7bcb6181..6ce8e04fa203 100644
--- a/l10n_it_fatturapa_in/security/ir.model.access.csv
+++ b/l10n_it_fatturapa_in/security/ir.model.access.csv
@@ -3,3 +3,6 @@ access_fatturapa_attachment_in,access_fatturapa_attachment_in,model_fatturapa_at
access_fatturapa_article_code,access_fatturapa_article_code,model_fatturapa_article_code,account.group_account_invoice,1,1,1,1
access_einvoice_line,access_einvoice_line,model_einvoice_line,account.group_account_invoice,1,1,1,1
access_einvoice_line_other_data,access_einvoice_line_other_data,model_einvoice_line_other_data,account.group_account_invoice,1,1,1,1
+access_wizard_import_fatturapa,access_wizard_import_fatturapa,model_wizard_import_fatturapa,account.group_account_invoice,1,1,1,1
+access_wizard_link_to_invoice,access_wizard_link_to_invoice,model_wizard_link_to_invoice,account.group_account_invoice,1,1,1,1
+access_wizard_link_to_invoice_line,access_wizard_link_to_invoice_line,model_wizard_link_to_invoice_line,account.group_account_invoice,1,1,1,1
diff --git a/l10n_it_fatturapa_in/security/rules.xml b/l10n_it_fatturapa_in/security/rules.xml
index 6d4bc882d501..0fd6a0e2cde6 100644
--- a/l10n_it_fatturapa_in/security/rules.xml
+++ b/l10n_it_fatturapa_in/security/rules.xml
@@ -9,7 +9,7 @@
['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
+ >['|',('company_id','=',False),('company_id','in',company_ids)]
diff --git a/l10n_it_fatturapa_in/static/description/index.html b/l10n_it_fatturapa_in/static/description/index.html
index 2b75910494fd..44ea8f854030 100644
--- a/l10n_it_fatturapa_in/static/description/index.html
+++ b/l10n_it_fatturapa_in/static/description/index.html
@@ -3,7 +3,7 @@
-
+
ITA - Fattura elettronica - Ricezione