Skip to content

Commit

Permalink
[FIX] change FatturaPA into E-invoice (#674)
Browse files Browse the repository at this point in the history
[IMP] revamp README and manifest
  • Loading branch information
primes2h authored and eLBati committed Nov 27, 2018
1 parent f31617e commit 589eae1
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 26 deletions.
29 changes: 26 additions & 3 deletions l10n_it_fatturapa_out/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,18 @@ Italian Localization - Fattura Elettronica - Emission

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to generate the fatturaPA XML file version 1.2
**Italiano**

Questo modulo consente di generare il file XML fatturaPA versione 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
to be sent to the Exchange System
da inviare al Sistema di Interscambio (SDI)
http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm

**English**

This module allows you to generate the fatturaPA XML file version 1.2
http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm
to be sent to the Exchange System (ES)
http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm

**Table of contents**
Expand All @@ -38,12 +47,25 @@ http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm
Configuration
=============

**Italiano**

Consultare il file README di l10n_it_fatturapa.

**English**

See l10n_it_fatturapa README file.

Usage
=====

* Fill invoice data you need to export. For instance, in 'Electronic Invoice Attachments' TAB.
**Italiano**

* Compilare la fattura con i dati necessari per l'esportazione. Per esempio, nella scheda "Allegati fattura elettronica"
* Selezionare 1 o N fatture ed eseguire la procedura guidata "Esporta fattura elettronica"

**English**

* Fill invoice data you need to export. For instance, in 'Electronic Invoice Attachments' TAB
* Select 1 or N invoices and run 'Export Electronic Invoice' wizard

Bug Tracker
Expand Down Expand Up @@ -74,6 +96,7 @@ Contributors
* Roberto Onnis
* Alessio Gerace
* Alex Comba
* Sergio Zanchetta <https://github.com/primes2h>

Maintainers
~~~~~~~~~~~
Expand Down
6 changes: 4 additions & 2 deletions l10n_it_fatturapa_out/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2014 Davide Corio
# Copyright 2015-2016 Lorenzo Battistini - Agile Business Group
# 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 - Emission',
'version': '10.0.1.2.2',
'version': '10.0.1.2.3',
'category': 'Localization/Italy',
'summary': 'Electronic invoices emission',
'author': 'Davide Corio, Agile Business Group, Innoviu,'
'Odoo Community Association (OCA)',
'website': 'http://www.agilebg.com',
'website': 'https://github.com/OCA/l10n-italy/tree/10.0/'
'l10n_it_fatturapa_out',
'license': 'LGPL-3',
"depends": [
'l10n_it_fatturapa',
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_out/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AccountInvoice(models.Model):
_inherit = "account.invoice"

fatturapa_attachment_out_id = fields.Many2one(
'fatturapa.attachment.out', 'FatturaPA Export File',
'fatturapa.attachment.out', 'E-invoice Export File',
readonly=True, copy=False)

has_pdf_invoice_print = fields.Boolean(
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_out/models/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class FatturaPAAttachment(models.Model):
_name = "fatturapa.attachment.out"
_description = "FatturaPA Export File"
_description = "E-invoice Export File"
_inherits = {'ir.attachment': 'ir_attachment_id'}
_inherit = ['mail.thread']
_order = 'id desc'
Expand Down
6 changes: 6 additions & 0 deletions l10n_it_fatturapa_out/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
**Italiano**

Consultare il file README di l10n_it_fatturapa.

**English**

See l10n_it_fatturapa README file.
1 change: 1 addition & 0 deletions l10n_it_fatturapa_out/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
* Roberto Onnis
* Alessio Gerace
* Alex Comba
* Sergio Zanchetta <https://github.com/primes2h>
13 changes: 11 additions & 2 deletions l10n_it_fatturapa_out/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
This module allows you to generate the fatturaPA XML file version 1.2
**Italiano**

Questo modulo consente di generare il file XML fatturaPA versione 1.2
http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm
to be sent to the Exchange System
da inviare al Sistema di Interscambio (SDI)
http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm

**English**

This module allows you to generate the fatturaPA XML file version 1.2
http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm
to be sent to the Exchange System (ES)
http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm
9 changes: 8 additions & 1 deletion l10n_it_fatturapa_out/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
* Fill invoice data you need to export. For instance, in 'Electronic Invoice Attachments' TAB.
**Italiano**

* Compilare la fattura con i dati necessari per l'esportazione. Per esempio, nella scheda "Allegati fattura elettronica"
* Selezionare 1 o N fatture ed eseguire la procedura guidata "Esporta fattura elettronica"

**English**

* Fill invoice data you need to export. For instance, in 'Electronic Invoice Attachments' TAB
* Select 1 or N invoices and run 'Export Electronic Invoice' wizard
24 changes: 21 additions & 3 deletions l10n_it_fatturapa_out/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,15 @@ <h1 class="title">Italian Localization - Fattura Elettronica - Emission</h1>
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/10.0/l10n_it_fatturapa_out"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-10-0/l10n-italy-10-0-l10n_it_fatturapa_out"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/10.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows you to generate the fatturaPA XML file version 1.2
<p><strong>Italiano</strong></p>
<p>Questo modulo consente di generare il file XML fatturaPA versione 1.2
<a class="reference external" href="http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm">http://www.fatturapa.gov.it/export/fatturazione/it/normativa/f-2.htm</a>
to be sent to the Exchange System
da inviare al Sistema di Interscambio (SDI)
<a class="reference external" href="http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm">http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm</a></p>
<p><strong>English</strong></p>
<p>This module allows you to generate the fatturaPA XML file version 1.2
<a class="reference external" href="http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm">http://www.fatturapa.gov.it/export/fatturazione/en/normativa/f-2.htm</a>
to be sent to the Exchange System (ES)
<a class="reference external" href="http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm">http://www.fatturapa.gov.it/export/fatturazione/en/sdi.htm</a></p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -388,13 +394,24 @@ <h1 class="title">Italian Localization - Fattura Elettronica - Emission</h1>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<p><strong>Italiano</strong></p>
<p>Consultare il file README di l10n_it_fatturapa.</p>
<p><strong>English</strong></p>
<p>See l10n_it_fatturapa README file.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p><strong>Italiano</strong></p>
<blockquote>
<ul class="simple">
<li>Compilare la fattura con i dati necessari per l’esportazione. Per esempio, nella scheda “Allegati fattura elettronica”</li>
<li>Selezionare 1 o N fatture ed eseguire la procedura guidata “Esporta fattura elettronica”</li>
</ul>
</blockquote>
<p><strong>English</strong></p>
<blockquote>
<ul class="simple">
<li>Fill invoice data you need to export. For instance, in ‘Electronic Invoice Attachments’ TAB.</li>
<li>Fill invoice data you need to export. For instance, in ‘Electronic Invoice Attachments’ TAB</li>
<li>Select 1 or N invoices and run ‘Export Electronic Invoice’ wizard</li>
</ul>
</blockquote>
Expand Down Expand Up @@ -425,6 +442,7 @@ <h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<li>Roberto Onnis</li>
<li>Alessio Gerace</li>
<li>Alex Comba</li>
<li>Sergio Zanchetta &lt;<a class="reference external" href="https://github.com/primes2h">https://github.com/primes2h</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
4 changes: 2 additions & 2 deletions l10n_it_fatturapa_out/views/account_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</field>
</group>
</page>
<page string="Fattura Elettronica"
<page string="Electronic Invoice"
attrs="{'invisible': [('electronic_invoice_subjected', '=', False)]}">
<group>
<group string="Results">
Expand All @@ -44,7 +44,7 @@
</group>
</group>
</page>
<page string="Fattura Elettronica attachments"
<page string="Electronic Invoice attachments"
attrs="{'invisible': [('electronic_invoice_subjected', '=', False)]}">
<group string="Attachments">
<field name="fatturapa_doc_attachments" nolabel="1" >
Expand Down
8 changes: 4 additions & 4 deletions l10n_it_fatturapa_out/views/attachment_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="name">fatturapa.attachment.out.tree</field>
<field name="model">fatturapa.attachment.out</field>
<field name="arch" type="xml">
<tree string="Export Fattura Elettronica" create="false">
<tree string="Export Electronic Invoice" create="false">
<field name="name"/>
<field name="invoice_partner_id"/>
<field name="out_invoice_ids"/>
Expand All @@ -28,7 +28,7 @@
<field name="name">fatturapa.attachment.out.form</field>
<field name="model">fatturapa.attachment.out</field>
<field name="arch" type="xml">
<form string="Export Fattura Elettronica" create="false">
<form string="Export Electronic Invoice" create="false">
<div>
<group>
<group>
Expand Down Expand Up @@ -62,7 +62,7 @@
</record>

<record id="action_fatturapa_attachment" model="ir.actions.act_window">
<field name="name">Fattura Elettronica Export Files</field>
<field name="name">Electronic Invoice Export Files</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">fatturapa.attachment.out</field>
<field name="view_type">form</field>
Expand All @@ -72,7 +72,7 @@

<menuitem action="action_fatturapa_attachment"
parent="l10n_it_fatturapa.menu_fattura_pa_receivables"
name="Fattura Elettronica Export Files"
name="E-invoice Export Files"
id="fatturapa_attachment_menu"/>

</data>
Expand Down
14 changes: 7 additions & 7 deletions l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

class WizardExportFatturapa(models.TransientModel):
_name = "wizard.export.fatturapa"
_description = "Export FatturaPA"
_description = "Export E-invoice"

@api.model
def _domain_ir_values(self):
Expand Down Expand Up @@ -102,7 +102,7 @@ def setProgressivoInvio(self, fatturapa):
fatturapa_sequence = company.fatturapa_sequence_id
if not fatturapa_sequence:
raise UserError(
_('FatturaPA sequence not configured.'))
_('E-invoice sequence not configured.'))
number = fatturapa_sequence.next_by_id()
try:
fatturapa.FatturaElettronicaHeader.DatiTrasmissione.\
Expand Down Expand Up @@ -205,10 +205,10 @@ def _setDatiAnagraficiCedente(self, CedentePrestatore, company):
fatturapa_fp = company.fatturapa_fiscal_position_id
if not fatturapa_fp:
raise UserError(_(
'Fiscal position for Fattura Elettronica not set '
'Fiscal position for Electronic Invoice not set '
'for company %s. '
'(Go to Accounting --> Configuration --> Settings --> '
'Fattura Elettronica)' % company.name
'Electronic Invoice)' % company.name
))
CedentePrestatore.DatiAnagrafici.IdFiscaleIVA = IdFiscaleType(
IdPaese=company.country_id.code, IdCodice=company.vat[2:])
Expand Down Expand Up @@ -670,11 +670,11 @@ def setDatiPagamento(self, invoice, body):
DatiPagamento = DatiPagamentoType()
if not invoice.payment_term_id.fatturapa_pt_id:
raise UserError(
_('Payment term %s does not have a linked fatturaPA '
_('Payment term %s does not have a linked e-invoice '
'payment term') % invoice.payment_term_id.name)
if not invoice.payment_term_id.fatturapa_pm_id:
raise UserError(
_('Payment term %s does not have a linked fatturaPA '
_('Payment term %s does not have a linked e-invoice '
'payment method') % invoice.payment_term_id.name)
DatiPagamento.CondizioniPagamento = (
invoice.payment_term_id.fatturapa_pt_id.code)
Expand Down Expand Up @@ -781,7 +781,7 @@ def exportFatturaPA(self):
invoice_id)
if inv.fatturapa_attachment_out_id:
raise UserError(
_("Invoice %s has FatturaPA Export File yet") % (
_("Invoice %s has E-invoice Export File yet") % (
inv.number))
if self.report_print_menu:
self.generate_attach_report(inv)
Expand Down

0 comments on commit 589eae1

Please sign in to comment.