[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) <las@odoo.com> Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
This commit is contained in:
@@ -453,7 +453,7 @@ class AutomaticEntryWizard(models.TransientModel):
|
||||
rslt = Markup(_("This entry transfers the following amounts to %(destination)s") + "<ul>%(transfer_logs)s</ul>") % {
|
||||
'destination': Markup("<strong>%s</strong>") % 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
|
||||
|
||||
Reference in New Issue
Block a user