[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 <jco@odoo.com> Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user