From b59e4f73b9128cd4ee1b0e0e85aa5dd989e6fe87 Mon Sep 17 00:00:00 2001 From: "Maximilien (malb)" Date: Mon, 24 Jul 2023 08:44:33 +0000 Subject: [PATCH] [FIX] account: automatic entries crash When having a python format in the ref (or memo) of a payment, going to journal items, select the move and doing an automatic entries, when changing the account a traceback appears. In the _format_new_transfer_move_log, we create a format that will be put in the chatter. In this message we use python format without considering the possibility that we can have one in the link of the move. By putting the python format before formatting the link, the issues is solved. task: 3434131 closes odoo/odoo#130091 X-original-commit: 12e0e6a492a010d61a8a1f763c72e25765654511 Signed-off-by: Laurent Smet (las) Signed-off-by: Maximilien La Barre (malb) --- addons/account/wizard/account_automatic_entry_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_automatic_entry_wizard.py b/addons/account/wizard/account_automatic_entry_wizard.py index be9858fdcd1..c82fddb4b75 100644 --- a/addons/account/wizard/account_automatic_entry_wizard.py +++ b/addons/account/wizard/account_automatic_entry_wizard.py @@ -453,7 +453,7 @@ class AutomaticEntryWizard(models.TransientModel): rslt = Markup(_("This entry transfers the following amounts to %(destination)s") + "
    %(transfer_logs)s
") % { 'destination': Markup("%s") % self.destination_account_id.display_name, 'transfer_logs': Markup().join([ - self._format_strings(transfer_format, move, balance) % {'account_source_name': account.display_name} + self._format_strings(transfer_format % {'account_source_name': account.display_name}, move, balance) for move, balances_per_account in acc_transfer_per_move.items() for account, balance in balances_per_account.items() if account != self.destination_account_id # Otherwise, logging it here is confusing for the user