Skip to content

[18.0] [ADD] l10n_it_edi_extension #4411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
495 changes: 495 additions & 0 deletions l10n_it_edi_extension/README.rst

Large diffs are not rendered by default.

1,188 changes: 1,188 additions & 0 deletions l10n_it_edi_extension/__init__.py

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions l10n_it_edi_extension/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2025 Giuseppe Borruso - Dinamiche Aziendali srl
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Italy - E-invoicing - Base Feature",
"version": "18.0.1.0.0",
"category": "Accounting/Localizations/EDI",
"development_status": "Production/Stable",
"summary": "E-invoice base feature",
"author": "Giuseppe Borruso, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy",
"license": "AGPL-3",
"external_dependencies": {
"python": [
"codicefiscale",
"openupgradelib",
],
},
"depends": [
"account",
"l10n_it_edi",
],
"data": [
"security/ir.model.access.csv",
"data/invoice_it_template.xml",
"data/res.city.it.code.csv",
"views/l10n_it_view.xml",
"views/res_partner_view.xml",
"views/company_view.xml",
"wizards/compute_fc_view.xml",
"wizards/l10n_it_edi_import_file_wizard.xml",
],
"installable": True,
"pre_init_hook": "_l10n_it_edi_extension_pre_init_hook",
"post_init_hook": "_l10n_it_edi_extension_post_init_hook",
}
1 change: 1 addition & 0 deletions l10n_it_edi_extension/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import portal
27 changes: 27 additions & 0 deletions l10n_it_edi_extension/controllers/portal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2025 Giuseppe Borruso - Dinamiche Aziendali srl
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.http import Controller, request, route


class FatturaPAController(Controller):
@route(
[
"/fatturapa/preview/<attachment_id>",
],
type="http",
auth="user",
website=True,
)
def fatturapa_preview(self, attachment_id, **data):
attach = request.env["ir.attachment"].browse(int(attachment_id))
html = attach.get_fattura_elettronica_preview()
if isinstance(html, bytes):
html = html.decode()
pdf = request.env["ir.actions.report"]._run_wkhtmltopdf([html])

pdfhttpheaders = [
("Content-Type", "application/pdf"),
("Content-Length", len(pdf)),
]
return request.make_response(pdf, headers=pdfhttpheaders)
Loading
Loading