Skip to content

Commit

Permalink
[FIX] translation source strings l10n_it_fatturapa_in
Browse files Browse the repository at this point in the history
[IMP] revamp README and manifest

[FIX] wrong tabs indentation
  • Loading branch information
primes2h authored and TheMule71 committed Jun 9, 2021
1 parent adba1b6 commit cb646fa
Show file tree
Hide file tree
Showing 23 changed files with 498 additions and 359 deletions.
85 changes: 68 additions & 17 deletions l10n_it_fatturapa_in/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
====================================================
Italian Localization - Fattura Elettronica reception
====================================================
======================================================
Italian Localization - Fattura Elettronica - Reception
======================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand All @@ -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::
Expand All @@ -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
===========
Expand All @@ -98,6 +148,7 @@ Contributors
* Lorenzo Battistini <[email protected]>
* Roberto Onnis
* Alessio Gerace
* Sergio Zanchetta <https://github.com/primes2h>

Maintainers
~~~~~~~~~~~
Expand Down
7 changes: 5 additions & 2 deletions l10n_it_fatturapa_in/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Copyright 2015 AgileBG SAGL <http://www.agilebg.com>
# Copyright 2015 innoviu Srl <http://www.innoviu.com>
# 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',
Expand Down
52 changes: 26 additions & 26 deletions l10n_it_fatturapa_in/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)


Expand All @@ -60,62 +60,62 @@ 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
)


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):
_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
'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)
5 changes: 2 additions & 3 deletions l10n_it_fatturapa_in/models/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
32 changes: 14 additions & 18 deletions l10n_it_fatturapa_in/models/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)


Expand All @@ -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
)

Expand Down
18 changes: 9 additions & 9 deletions l10n_it_fatturapa_in/models/partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Loading

0 comments on commit cb646fa

Please sign in to comment.