Skip to content

Commit

Permalink
IMP decimal precision
Browse files Browse the repository at this point in the history
ADD Export E-invoice button
IMP README
  • Loading branch information
eLBati committed Oct 9, 2018
1 parent 5f1ab23 commit 3054766
Show file tree
Hide file tree
Showing 22 changed files with 995 additions and 129 deletions.
6 changes: 3 additions & 3 deletions l10n_it_fatturapa/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
================================
Italian Localization - FatturaPA
================================
=================================================
Italian Localization - Fattura Elettronica - Base
=================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand Down
3 changes: 2 additions & 1 deletion l10n_it_fatturapa/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import fields, models, api
import odoo.addons.decimal_precision as dp

RELATED_DOCUMENT_TYPES = {
'order': 'DatiOrdineAcquisto',
Expand Down Expand Up @@ -131,7 +132,7 @@ class DiscountRisePrice(models.Model):
name = fields.Selection(
[('SC', 'Discount'), ('MG', 'Rise Price')], 'Type')
percentage = fields.Float('Percentage')
amount = fields.Float('Amount')
amount = fields.Float('Amount', digits=dp.get_precision('Discount'))
invoice_line_id = fields.Many2one(
'account.invoice.line', 'Related Invoice',
ondelete='cascade', index=True
Expand Down
6 changes: 3 additions & 3 deletions l10n_it_fatturapa/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<title>Italian Localization - FatturaPA</title>
<title>Italian Localization - Fattura Elettronica - Base</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,8 +360,8 @@
</style>
</head>
<body>
<div class="document" id="italian-localization-fatturapa">
<h1 class="title">Italian Localization - FatturaPA</h1>
<div class="document" id="italian-localization-fattura-elettronica-base">
<h1 class="title">Italian Localization - Fattura Elettronica - Base</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand Down
34 changes: 16 additions & 18 deletions l10n_it_fatturapa_in/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Italian Localization - Fattura Elettronica reception

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

Questo modulo permette di importare gli XML della fattura elettronica, versione 1.2
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

ricevuti tramite il sistema di interscambio
received through the exchange system (SDI)

http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm

Expand All @@ -41,39 +41,37 @@ http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
Installation
============

odoo server deve girare su linux ed essere in grado di lanciare il comando
odoo server must run on linux and be able to run

``openssl``

Configuration
=============

Vedi anche il README del modulo l10n_it_fatturapa.
Also see the README file of l10n_it_fatturapa module.

Per ogni fornitore è possibile impostare il 'Livello di dettaglio Fatture elettroniche':
For every supplier, it is possible to set the 'details level of electronic invoices':

- 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
- Livello Massimo: tutte le righe presenti nella fattura elettronica vengono create come righe della fattura passiva
- 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.

E' inoltre possibile impostare il campo 'prodotto di default per le fatture elettroniche' nella scheda del fornitore: questo prodotto verrà usato in fase di importazione della fattura passiva quando nessun altro possibile prodotto verrà trovato dal sistema, utilizzando quindi il conto e l'imposta preconfigurati sul prodotto.
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.

Per ogni codice prodotto usato dai fornitori, impostarlo nel campo
Every product code used by suppliers can be set, in product form, in

Inventario --> Fornitori
Inventory --> Suppliers

nella scheda del prodotto.

Se il fornitore specificherà tale codice nell'XML, il sistema lo userà per recuperare il prodotto ed usarlo nella riga della fattura, impostando il relativo conto acquisti ed eventualmente l'IVA.
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
=====

* Andare su Contabilità --> Acquisti --> Fattura Elettronica
* Caricare il file XML
* Visualizzare la fattura cliccando su 'mostra anteprima'
* Lanciare il wizard 'Importa Fattura Elettronica' per creare una fattura bozza oppure lanciare il wizard 'collega ad una fattura fornitore esistente' per collegare il file ad una fattura già creata, automaticamente o manualmente, nel sistema
* 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

Nell'elenco dei file Fattura Elettronica in ingresso vengono mostrati di default i file ancora da registrare, cioè i file non ancora associati ad una o più fatture passive
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
===========
Expand Down
11 changes: 9 additions & 2 deletions l10n_it_fatturapa_in/models/account.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

from odoo import fields, models, api
import odoo.addons.decimal_precision as dp


class AccountInvoice(models.Model):
Expand Down Expand Up @@ -78,11 +79,17 @@ class EInvoiceLine(models.Model):
'Cod. Articles', readonly=True
)
name = fields.Char("Descrizione", readonly=True)
qty = fields.Float("Quantita'", 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)
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
Expand Down
18 changes: 8 additions & 10 deletions l10n_it_fatturapa_in/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Vedi anche il README del modulo l10n_it_fatturapa.
Also see the README file of l10n_it_fatturapa module.

Per ogni fornitore è possibile impostare il 'Livello di dettaglio Fatture elettroniche':
For every supplier, it is possible to set the 'details level of electronic invoices':

- 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
- Livello Massimo: tutte le righe presenti nella fattura elettronica vengono create come righe della fattura passiva
- 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.

E' inoltre possibile impostare il campo 'prodotto di default per le fatture elettroniche' nella scheda del fornitore: questo prodotto verrà usato in fase di importazione della fattura passiva quando nessun altro possibile prodotto verrà trovato dal sistema, utilizzando quindi il conto e l'imposta preconfigurati sul prodotto.
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.

Per ogni codice prodotto usato dai fornitori, impostarlo nel campo
Every product code used by suppliers can be set, in product form, in

Inventario --> Fornitori
Inventory --> Suppliers

nella scheda del prodotto.

Se il fornitore specificherà tale codice nell'XML, il sistema lo userà per recuperare il prodotto ed usarlo nella riga della fattura, impostando il relativo conto acquisti ed eventualmente l'IVA.
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.
4 changes: 2 additions & 2 deletions l10n_it_fatturapa_in/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Questo modulo permette di importare gli XML della fattura elettronica, versione 1.2
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

ricevuti tramite il sistema di interscambio
received through the exchange system (SDI)

http://www.fatturapa.gov.it/export/fatturazione/it/sdi.htm
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
odoo server deve girare su linux ed essere in grado di lanciare il comando
odoo server must run on linux and be able to run

``openssl``
10 changes: 5 additions & 5 deletions l10n_it_fatturapa_in/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
* Andare su Contabilità --> Acquisti --> Fattura Elettronica
* Caricare il file XML
* Visualizzare la fattura cliccando su 'mostra anteprima'
* Lanciare il wizard 'Importa Fattura Elettronica' per creare una fattura bozza oppure lanciare il wizard 'collega ad una fattura fornitore esistente' per collegare il file ad una fattura già creata, automaticamente o manualmente, nel sistema
* 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

Nell'elenco dei file Fattura Elettronica in ingresso vengono mostrati di default i file ancora da registrare, cioè i file non ancora associati ad una o più fatture passive
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
33 changes: 16 additions & 17 deletions l10n_it_fatturapa_in/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ <h1 class="title">Italian Localization - Fattura Elettronica reception</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_in"><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_in"><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>Questo modulo permette di importare gli XML della fattura elettronica, versione 1.2</p>
<p>This module allows to import XML files of electronic invoices, version 1.2</p>
<p><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></p>
<p>ricevuti tramite il sistema di interscambio</p>
<p>received through the exchange system (SDI)</p>
<p><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>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -389,36 +389,35 @@ <h1 class="title">Italian Localization - Fattura Elettronica reception</h1>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
<p>odoo server deve girare su linux ed essere in grado di lanciare il comando</p>
<p>odoo server must run on linux and be able to run</p>
<p><tt class="docutils literal">openssl</tt></p>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id2">Configuration</a></h1>
<p>Vedi anche il README del modulo l10n_it_fatturapa.</p>
<p>Per ogni fornitore è possibile impostare il ‘Livello di dettaglio Fatture elettroniche’:</p>
<p>Also see the README file of l10n_it_fatturapa module.</p>
<p>For every supplier, it is possible to set the ‘details level of electronic invoices’:</p>
<blockquote>
<ul class="simple">
<li>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</li>
<li>Livello Massimo: tutte le righe presenti nella fattura elettronica vengono create come righe della fattura passiva</li>
<li>Minimum level: Supplier invoice is created without lines; user will have to create them, according to what specified in electronic invoice</li>
<li>Maximum level: every line contained in electronic invoice will create a line in supplier invoice.</li>
</ul>
</blockquote>
<p>E’ inoltre possibile impostare il campo ‘prodotto di default per le fatture elettroniche’ nella scheda del fornitore: questo prodotto verrà usato in fase di importazione della fattura passiva quando nessun altro possibile prodotto verrà trovato dal sistema, utilizzando quindi il conto e l’imposta preconfigurati sul prodotto.</p>
<p>Per ogni codice prodotto usato dai fornitori, impostarlo nel campo</p>
<p>Inventario –&gt; Fornitori</p>
<p>nella scheda del prodotto.</p>
<p>Se il fornitore specificherà tale codice nell’XML, il sistema lo userà per recuperare il prodotto ed usarlo nella riga della fattura, impostando il relativo conto acquisti ed eventualmente l’IVA.</p>
<p>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.</p>
<p>Every product code used by suppliers can be set, in product form, in</p>
<p>Inventory –&gt; Suppliers</p>
<p>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.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id3">Usage</a></h1>
<blockquote>
<ul class="simple">
<li>Andare su Contabilità –&gt; Acquisti –&gt; Fattura Elettronica</li>
<li>Caricare il file XML</li>
<li>Visualizzare la fattura cliccando su ‘mostra anteprima</li>
<li>Lanciare il wizard ‘Importa Fattura Elettronica’ per creare una fattura bozza oppure lanciare il wizard ‘collega ad una fattura fornitore esistente’ per collegare il file ad una fattura già creata, automaticamente o manualmente, nel sistema</li>
<li>Go to Accounting –&gt; Purchases –&gt; Electronic Invoice</li>
<li>Upload XML file</li>
<li>View invoice content clicking on ‘show preview</li>
<li>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</li>
</ul>
</blockquote>
<p>Nell’elenco dei file Fattura Elettronica in ingresso vengono mostrati di default i file ancora da registrare, cioè i file non ancora associati ad una o più fatture passive</p>
<p>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</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
Expand Down
18 changes: 11 additions & 7 deletions l10n_it_fatturapa_in_purchase/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ Fattura Elettronica - Purchase integration
.. |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_purchase
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
.. |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_purchase
: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|
|badge1| |badge2| |badge3| |badge4| |badge5|

Integra gli ordini di acquisto con le fatture elettroniche passive.
Integrate purchase orders with supplier electronic invoices.

Con questo modulo è possibile collegare una fattura elettronica passiva ad un ordine di acquisto esistente nel sistema.
With this module you can link a supplier electronic invoice to an existing purchase order.

Così facendo si potrà tracciare se l'ordine è stato fatturato o meno.
In this way, you track whether the order is invoiced or not.

**Table of contents**

Expand All @@ -36,14 +39,15 @@ Così facendo si potrà tracciare se l'ordine è stato fatturato o meno.
Usage
=====

Nelle fatture elettroniche passive in stato bozza, aprire la riga che si vuole collegare ad una riga di ordine d'acquisto e riempire il campo 'Riga ordine d'acquisto'.
In draft supplier electronic invoices, open the line to be linked to a purchase order line and fill the 'purchase order line' field.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/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.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fatturapa_in_purchase%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down
6 changes: 3 additions & 3 deletions l10n_it_fatturapa_in_purchase/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Integra gli ordini di acquisto con le fatture elettroniche passive.
Integrate purchase orders with supplier electronic invoices.

Con questo modulo è possibile collegare una fattura elettronica passiva ad un ordine di acquisto esistente nel sistema.
With this module you can link a supplier electronic invoice to an existing purchase order.

Così facendo si potrà tracciare se l'ordine è stato fatturato o meno.
In this way, you track whether the order is invoiced or not.
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in_purchase/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Nelle fatture elettroniche passive in stato bozza, aprire la riga che si vuole collegare ad una riga di ordine d'acquisto e riempire il campo 'Riga ordine d'acquisto'.
In draft supplier electronic invoices, open the line to be linked to a purchase order line and fill the 'purchase order line' field.
Loading

0 comments on commit 3054766

Please sign in to comment.