Skip to content

Commit c85f092

Browse files
committed
Merge PR #4858 into 18.0
Signed-off-by eLBati
2 parents 83c1a92 + 7d855dc commit c85f092

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+22895
-0
lines changed

l10n_it_edi_extension/README.rst

Lines changed: 493 additions & 0 deletions
Large diffs are not rendered by default.

l10n_it_edi_extension/__init__.py

Lines changed: 951 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2025 Giuseppe Borruso - Dinamiche Aziendali srl
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": "Beta",
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+
"external_dependencies": {
14+
"python": [
15+
"codicefiscale",
16+
"openupgradelib",
17+
],
18+
},
19+
"depends": [
20+
"account",
21+
"l10n_it_edi",
22+
"partner_firstname",
23+
],
24+
"data": [
25+
"security/ir.model.access.csv",
26+
"data/invoice_it_template.xml",
27+
"data/res.city.it.code.csv",
28+
"views/l10n_it_view.xml",
29+
"views/res_partner_view.xml",
30+
"views/company_view.xml",
31+
"wizards/compute_fc_view.xml",
32+
"wizards/l10n_it_edi_import_file_wizard.xml",
33+
],
34+
"installable": True,
35+
"pre_init_hook": "_l10n_it_edi_extension_pre_init_hook",
36+
"post_init_hook": "_l10n_it_edi_extension_post_init_hook",
37+
}
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 2025 Giuseppe Borruso - Dinamiche Aziendali srl
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)