Skip to content

Commit eea23f0

Browse files
committed
[ADD] l10n_it_edi_extension: aggiunta PR OCA#4411
1 parent 187d020 commit eea23f0

17 files changed

+3918
-0
lines changed

l10n_it_edi_extension/README.rst

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
==================================
2+
Italy - E-invoicing - Base Feature
3+
==================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:f1248807eff1e257c248a5aa7e2174684c32b780f443ff30730f1f1b1e850bd1
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Production/Stable
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
20+
:target: https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_edi_extension
21+
:alt: OCA/l10n-italy
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/l10n-italy-18-0/l10n-italy-18-0-l10n_it_edi_extension
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
**Italiano**
32+
33+
Questo modulo aggiunge funzionalità basi per gestire le fatture
34+
elettroniche.
35+
36+
<https://www.fatturapa.gov.it>
37+
38+
**English**
39+
40+
This module adds base feature to handle e-invoice.
41+
42+
<https://www.fatturapa.gov.it>
43+
44+
**Table of contents**
45+
46+
.. contents::
47+
:local:
48+
49+
Bug Tracker
50+
===========
51+
52+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
53+
In case of trouble, please check there if your issue has already been reported.
54+
If you spotted it first, help us to smash it by providing a detailed and welcomed
55+
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_edi_extension%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
56+
57+
Do not contact contributors directly about support or help with technical issues.
58+
59+
Credits
60+
=======
61+
62+
Authors
63+
-------
64+
65+
* Giuseppe Borruso
66+
67+
Contributors
68+
------------
69+
70+
- Giuseppe Borruso - Dinamiche Aziendali srl
71+
<gborruso@dinamicheaziendali.it>
72+
73+
Maintainers
74+
-----------
75+
76+
This module is maintained by the OCA.
77+
78+
.. image:: https://odoo-community.org/logo.png
79+
:alt: Odoo Community Association
80+
:target: https://odoo-community.org
81+
82+
OCA, or the Odoo Community Association, is a nonprofit organization whose
83+
mission is to support the collaborative development of Odoo features and
84+
promote its widespread use.
85+
86+
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/18.0/l10n_it_edi_extension>`_ project on GitHub.
87+
88+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

l10n_it_edi_extension/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2024 Giuseppe Borruso <gborruso@dinamicheaziendali.it>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
from . import controllers
5+
from . import models

l10n_it_edi_extension/__manifest__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2024 Giuseppe Borruso <gborruso@dinamicheaziendali.it>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
{
5+
"name": "Italy - E-invoicing - Base Feature",
6+
"version": "18.0.1.0.0",
7+
"category": "Accounting/Localizations/EDI",
8+
"development_status": "Production/Stable",
9+
"summary": "E-invoice base feature",
10+
"author": "Giuseppe Borruso, Odoo Community Association (OCA)",
11+
"website": "https://github.com/OCA/l10n-italy",
12+
"license": "AGPL-3",
13+
"depends": [
14+
"l10n_it_edi",
15+
],
16+
"data": [
17+
"data/invoice_it_template.xml",
18+
"views/l10n_it_view.xml",
19+
],
20+
"installable": True,
21+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import portal
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2024 Giuseppe Borruso <gborruso@dinamicheaziendali.it>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
from odoo.http import Controller, request, route
5+
6+
7+
class FatturaPAController(Controller):
8+
@route(
9+
[
10+
"/fatturapa/preview/<attachment_id>",
11+
],
12+
type="http",
13+
auth="user",
14+
website=True,
15+
)
16+
def fatturapa_preview(self, attachment_id, **data):
17+
attach = request.env["ir.attachment"].browse(int(attachment_id))
18+
html = attach.get_fattura_elettronica_preview()
19+
if isinstance(html, bytes):
20+
html = html.decode()
21+
pdf = request.env["ir.actions.report"]._run_wkhtmltopdf([html])
22+
23+
pdfhttpheaders = [
24+
("Content-Type", "application/pdf"),
25+
("Content-Length", len(pdf)),
26+
]
27+
return request.make_response(pdf, headers=pdfhttpheaders)

0 commit comments

Comments
 (0)