Skip to content

Commit 2dc8d57

Browse files
committed
Merge PR #5149 into 18.0
Signed-off-by MarcoCalcagni
2 parents 8762e16 + 7db1048 commit 2dc8d57

File tree

4 files changed

+101
-60
lines changed

4 files changed

+101
-60
lines changed

l10n_it_edi_extension/i18n/it.po

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 18.0\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"PO-Revision-Date: 2026-03-19 17:45+0000\n"
9+
"POT-Creation-Date: 2026-03-29 12:20+0000\n"
10+
"PO-Revision-Date: 2026-03-29 14:21+0200\n"
1011
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
1112
"Language-Team: none\n"
1213
"Language: it\n"
1314
"MIME-Version: 1.0\n"
1415
"Content-Type: text/plain; charset=UTF-8\n"
15-
"Content-Transfer-Encoding: \n"
16+
"Content-Transfer-Encoding: 8bit\n"
1617
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17-
"X-Generator: Weblate 5.15.2\n"
18+
"X-Generator: Poedit 3.0.1\n"
1819

1920
#. module: l10n_it_edi_extension
2021
#: model_terms:ir.ui.view,arch_db:l10n_it_edi_extension.view_account_config_settings_create_partner
@@ -408,6 +409,12 @@ msgstr "Altri dati riga e-fattura"
408409
msgid "E-invoice summary data"
409410
msgstr "Dati riepilogo e-fattura"
410411

412+
#. module: l10n_it_edi_extension
413+
#. odoo-python
414+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
415+
msgid "E-invoices"
416+
msgstr "E-fatture"
417+
411418
#. module: l10n_it_edi_extension
412419
#: model:ir.model.fields,field_description:l10n_it_edi_extension.field_res_partner__l10n_edi_it_eori_code
413420
#: model:ir.model.fields,field_description:l10n_it_edi_extension.field_res_users__l10n_edi_it_eori_code
@@ -836,6 +843,12 @@ msgstr ""
836843
"Massimo: ogni riga contenuta nella fattura elettronica creerà una riga nella "
837844
"fattura."
838845

846+
#. module: l10n_it_edi_extension
847+
#. odoo-python
848+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
849+
msgid "Partial import: skipped files"
850+
msgstr "Importazione parziale: alcuni file non importati"
851+
839852
#. module: l10n_it_edi_extension
840853
#: model:ir.model.fields,field_description:l10n_it_edi_extension.field_l10n_it_edi_discount_rise_price__percentage
841854
msgid "Percentage"
@@ -1090,8 +1103,8 @@ msgstr "Aliquota fiscale"
10901103
#. odoo-python
10911104
#: code:addons/l10n_it_edi_extension/models/account_move.py:0
10921105
msgid ""
1093-
"Taxed amount (%(tax_amount)s}) does not match with e-invoice taxed amount (%"
1094-
"(edi_tax_amount)s)"
1106+
"Taxed amount (%(tax_amount)s}) does not match with e-invoice taxed amount "
1107+
"(%(edi_tax_amount)s)"
10951108
msgstr ""
10961109
"L'importo tassato (%(tax_amount)s}) non corrisponde all'importo tassato "
10971110
"della e-fattura (%(edi_tax_amount)s)"
@@ -1128,6 +1141,23 @@ msgstr ""
11281141
msgid "The fiscal code '%s' must have 16 characters."
11291142
msgstr "Il codice fiscale '%s' deve avere 16 caratteri."
11301143

1144+
#. module: l10n_it_edi_extension
1145+
#. odoo-python
1146+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
1147+
msgid ""
1148+
"The following files were skipped (not valid XML/P7M):\n"
1149+
"%s"
1150+
msgstr ""
1151+
"Questi file non sono stati importati (formato XML/P7M invalido):\n"
1152+
"%s"
1153+
1154+
#. module: l10n_it_edi_extension
1155+
#. odoo-python
1156+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
1157+
msgid "The following files were skipped (not valid XML/P7M):<ul>%s</ul>"
1158+
msgstr ""
1159+
"Questi file non sono stati importati (formato XML/P7M invalido):<ul>%s</ul>"
1160+
11311161
#. module: l10n_it_edi_extension
11321162
#: model:ir.model.fields.selection,name:l10n_it_edi_extension.selection__account_move__l10n_it_edi_sender__tz
11331163
msgid "Third Person"
@@ -1147,8 +1177,8 @@ msgstr "Prezzo totale"
11471177
#. odoo-python
11481178
#: code:addons/l10n_it_edi_extension/models/account_move.py:0
11491179
msgid ""
1150-
"Total amount (%(total_amount)s) does not match with e-invoice total amount (%"
1151-
"(edi_total_amount)s)"
1180+
"Total amount (%(total_amount)s) does not match with e-invoice total amount "
1181+
"(%(edi_total_amount)s)"
11521182
msgstr ""
11531183
"L'importo totale (%(total_amount)s) non corrisponde all'importo totale della "
11541184
"e-fattura (%(edi_total_amount)s)"
@@ -1181,9 +1211,9 @@ msgid ""
11811211
"Untaxed amount (%(amount_untaxed)s}) minus rounding (%(rounding)s}) does not "
11821212
"match with e-invoice untaxed amount %(edi_amount_untaxed)s)"
11831213
msgstr ""
1184-
"L'importo non tassato (%(amount_untaxed)s}) meno l'arrotondamento (%"
1185-
"(rounding)s}) non corrisponde all'importo non tassato della e-fattura %"
1186-
"(edi_amount_untaxed)s)"
1214+
"L'importo non tassato (%(amount_untaxed)s}) meno l'arrotondamento "
1215+
"(%(rounding)s}) non corrisponde all'importo non tassato della e-fattura "
1216+
"%(edi_amount_untaxed)s)"
11871217

11881218
#. module: l10n_it_edi_extension
11891219
#: model:ir.model.fields,help:l10n_it_edi_extension.field_res_partner__l10n_it_edi_ext_default_product_id
@@ -1377,5 +1407,8 @@ msgstr ""
13771407
msgid "from XML file:"
13781408
msgstr "da file XML:"
13791409

1410+
#~ msgid "Some e-invoices were not imported"
1411+
#~ msgstr "Alcune fatture non sono state importate"
1412+
13801413
#~ msgid "Preview FPA"
13811414
#~ msgstr "Anteprima FPA"

l10n_it_edi_extension/i18n/l10n_it_edi_extension.pot

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 18.0\n"
88
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2026-03-29 12:20+0000\n"
10+
"PO-Revision-Date: 2026-03-29 12:20+0000\n"
911
"Last-Translator: \n"
1012
"Language-Team: \n"
1113
"MIME-Version: 1.0\n"
@@ -380,6 +382,12 @@ msgstr ""
380382
msgid "E-invoice summary data"
381383
msgstr ""
382384

385+
#. module: l10n_it_edi_extension
386+
#. odoo-python
387+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
388+
msgid "E-invoices"
389+
msgstr ""
390+
383391
#. module: l10n_it_edi_extension
384392
#: model:ir.model.fields,field_description:l10n_it_edi_extension.field_res_partner__l10n_edi_it_eori_code
385393
#: model:ir.model.fields,field_description:l10n_it_edi_extension.field_res_users__l10n_edi_it_eori_code
@@ -765,6 +773,12 @@ msgid ""
765773
"Maximum: every line contained in the electronic bill will create a line in the bill."
766774
msgstr ""
767775

776+
#. module: l10n_it_edi_extension
777+
#. odoo-python
778+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
779+
msgid "Partial import: skipped files"
780+
msgstr ""
781+
768782
#. module: l10n_it_edi_extension
769783
#: model:ir.model.fields,field_description:l10n_it_edi_extension.field_l10n_it_edi_discount_rise_price__percentage
770784
msgid "Percentage"
@@ -1042,6 +1056,20 @@ msgstr ""
10421056
msgid "The fiscal code '%s' must have 16 characters."
10431057
msgstr ""
10441058

1059+
#. module: l10n_it_edi_extension
1060+
#. odoo-python
1061+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
1062+
msgid ""
1063+
"The following files were skipped (not valid XML/P7M):\n"
1064+
"%s"
1065+
msgstr ""
1066+
1067+
#. module: l10n_it_edi_extension
1068+
#. odoo-python
1069+
#: code:addons/l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py:0
1070+
msgid "The following files were skipped (not valid XML/P7M):<ul>%s</ul>"
1071+
msgstr ""
1072+
10451073
#. module: l10n_it_edi_extension
10461074
#: model:ir.model.fields.selection,name:l10n_it_edi_extension.selection__account_move__l10n_it_edi_sender__tz
10471075
msgid "Third Person"

l10n_it_edi_extension/i18n/l10n_it_edi_fatturapa.pot

Lines changed: 0 additions & 44 deletions
This file was deleted.

l10n_it_edi_extension/wizards/l10n_it_edi_import_file_wizard.py

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from odoo import fields, models
1111
from odoo.exceptions import UserError
12+
from odoo.tools import html_escape
1213

1314
_logger = logging.getLogger(__name__)
1415

@@ -26,6 +27,7 @@ def action_import(self):
2627
zip_binary = base64.b64decode(self.l10n_it_edi_attachment)
2728
zip_io = io.BytesIO(zip_binary)
2829
moves = self.env["account.move"]
30+
skipped_files = []
2931

3032
with zipfile.ZipFile(zip_io, "r") as zip_ref:
3133
for member in zip_ref.infolist():
@@ -61,6 +63,7 @@ def action_import(self):
6163

6264
if not attachment._is_l10n_it_edi_import_file():
6365
_logger.info(f"Skipping {filename}, not an XML/P7M file")
66+
skipped_files.append(filename)
6467
attachment.unlink()
6568
continue
6669

@@ -87,12 +90,33 @@ def action_import(self):
8790

8891
move._l10n_it_edi_import_invoice(move, file_data, True)
8992
moves |= move
90-
91-
return {
92-
"view_type": "form",
93-
"name": "E-invoices",
94-
"view_mode": "list,form",
95-
"res_model": "account.move",
93+
action = {
94+
"name": self.env._("E-invoices"),
9695
"type": "ir.actions.act_window",
96+
"res_model": "account.move",
97+
"view_mode": "list,form",
98+
"views": [[False, "list"], [False, "form"]],
9799
"domain": [("id", "in", moves.ids)],
98100
}
101+
if skipped_files:
102+
skipped_list_html = "".join(
103+
f"<li>{html_escape(f)}</li>" for f in skipped_files
104+
)
105+
skipped_info_html = (
106+
self.env._(
107+
"The following files were skipped (not valid XML/P7M):<ul>%s</ul>"
108+
)
109+
% skipped_list_html
110+
)
111+
# Create activity for the current user
112+
self.env["mail.activity"].create(
113+
{
114+
"activity_type_id": self.env.ref("mail.mail_activity_data_todo").id,
115+
"note": skipped_info_html,
116+
"summary": self.env._("Partial import: skipped files"),
117+
"user_id": self.env.uid,
118+
"res_id": self.env.user.partner_id.id,
119+
"res_model_id": self.env["ir.model"]._get_id("res.partner"),
120+
}
121+
)
122+
return action

0 commit comments

Comments
 (0)