-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #589 from eLBati/10.0-porting-fatturapa_in
[10.0] porting l10n_it_fatturapa_in and supporting B2B (in and out)
- Loading branch information
Showing
125 changed files
with
13,799 additions
and
872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,97 @@ | ||
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-3 | ||
|
||
Italian Localization - FatturaPA | ||
================================ | ||
|
||
Base module to handle FatturaPA data. | ||
================================================= | ||
Italian Localization - Fattura Elettronica - Base | ||
================================================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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 | ||
: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 | ||
: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| | ||
|
||
Base module to handle Electronic Invoices. | ||
http://fatturapa.gov.it | ||
|
||
See l10n_it_fatturapa_out and l10n_it_fatturapa_in. | ||
See also l10n_it_fatturapa_out and l10n_it_fatturapa_in README files. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Installation | ||
============ | ||
|
||
This module requires PyXB 1.2.5 | ||
http://pyxb.sourceforge.net/ | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
* Edit the FatturaPA fields of the partners (in partner form) who will receive (send) the | ||
electronic invoices. IPA code is mandatory, EORI code is not. | ||
* In partner form, select 'Subjected to electronic invoice' in Electronic Invoice tab for customers and suppliers subjected to electronic invoicing | ||
* Public administrations must have IPA code | ||
* Others must have Codice Destinatario | ||
* Configure taxes about 'Non taxable nature', 'Law reference' and 'VAT payability' | ||
* Configure FatturaPA data in Accounting Configuration. Note that a sequence 'fatturaPA' is already loaded by the module and selectable. | ||
* Configure Electronic Invoice data in Accounting Configuration, where needed. | ||
|
||
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 <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fatturapa%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. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
Authors | ||
~~~~~~~ | ||
|
||
* Davide Corio | ||
* Agile Business Group | ||
* Innoviu | ||
* Odoo Italia Network | ||
|
||
* Davide Corio <davide.corio@abstract.it> | ||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com> | ||
* Roberto Onnis <roberto.onnis@innoviu.com> | ||
* Alessio Gerace <alessio.gerace@agilebg.com> | ||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
Maintainer | ||
---------- | ||
* Davide Corio | ||
* Lorenzo Battistini <https://github.com/eLBati> | ||
* Roberto Onnis | ||
* Alessio Gerace | ||
|
||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://odoo-community.org | ||
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. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. | ||
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/10.0/l10n_it_fatturapa>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
|
||
from . import models | ||
from . import bindings | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from odoo.http import Controller, route, request | ||
|
||
|
||
class FatturaElettronicaController(Controller): | ||
|
||
@route([ | ||
'/fatturapa/preview/<attachment_id>', | ||
], type='http', auth='user', website=True) | ||
def pdf_preview(self, attachment_id, **data): | ||
attach = request.env['ir.attachment'].browse(int(attachment_id)) | ||
html = attach.get_fattura_elettronica_preview() | ||
pdf = request.env['report']._run_wkhtmltopdf( | ||
[], [], [[False, html]], None, None) | ||
pdfhttpheaders = [ | ||
('Content-Type', 'application/pdf'), ('Content-Length', len(pdf)) | ||
] | ||
return request.make_response(pdf, headers=pdfhttpheaders) |
Oops, something went wrong.