From b99ec5cb3a9cc6ed06827c833692ab0b0f75b91a Mon Sep 17 00:00:00 2001 From: "Daniel Kosky (dako)" Date: Mon, 30 Jan 2023 13:41:26 +0000 Subject: [PATCH] [FIX] l10n_ke_edi_tremol: error message spacing Since batching was introduced for posting invoices with the fiscal device (in https://github.com/odoo/odoo/pull/107852), the error messages that are generated when doing the pre-post validation had to be grouped by the invoice name. However, there is no line break between the groups of messages, and thus the "Invalid invoice configuration on (invoice name)" can appear on the end of the previous line, which is quite confusing. This commit inserts a new line at the end of each error message string, so that the error messages displayed to the user are grouped appropriately by the invoice to which they refer. closes odoo/odoo#111502 X-original-commit: 1a47cf066a7c8eead7e602ebcb25c010021352f3 Signed-off-by: Josse Colpaert Signed-off-by: Daniel Kosky (dako) --- addons/l10n_ke_edi_tremol/i18n/l10n_ke_edi_tremol.pot | 4 ++-- addons/l10n_ke_edi_tremol/models/account_move.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/l10n_ke_edi_tremol/i18n/l10n_ke_edi_tremol.pot b/addons/l10n_ke_edi_tremol/i18n/l10n_ke_edi_tremol.pot index e366c196d9b..ae06e40ae88 100644 --- a/addons/l10n_ke_edi_tremol/i18n/l10n_ke_edi_tremol.pot +++ b/addons/l10n_ke_edi_tremol/i18n/l10n_ke_edi_tremol.pot @@ -138,9 +138,9 @@ msgstr "" #: code:addons/l10n_ke_edi_tremol/models/account_move.py:0 #, python-format msgid "" -"Invalid invoice configration on %s:\n" +"Invalid invoice configuration on %s:\n" +"%s\n" "\n" -"%s" msgstr "" #. module: l10n_ke_edi_tremol diff --git a/addons/l10n_ke_edi_tremol/models/account_move.py b/addons/l10n_ke_edi_tremol/models/account_move.py index 8684c90b7be..3bb7f56974b 100644 --- a/addons/l10n_ke_edi_tremol/models/account_move.py +++ b/addons/l10n_ke_edi_tremol/models/account_move.py @@ -233,7 +233,7 @@ class AccountMove(models.Model): error_msg = "" for move, error_list in errors: error_list = '\n'.join(error_list) - error_msg += _("Invalid invoice configration on %s:\n\n%s", move, error_list) + error_msg += _("Invalid invoice configuration on %s:\n%s\n\n", move, error_list) raise UserError(error_msg) return { 'type': 'ir.actions.client',