details: https://code.tryton.org/tryton/commit/9e8d1bca2c7f
branch: default
user: Cédric Krier <[email protected]>
date: Mon Jun 08 09:09:23 2026 +0200
description:
Convert toolbar into mutable objects before modification
Since 619fd425e3bb the toolbar may be immutable when it comes from the
cache.
Closes #14881
diffstat:
modules/account/move.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 2d7c2466ae0e -r 9e8d1bca2c7f modules/account/move.py
--- a/modules/account/move.py Mon Jun 08 16:19:50 2026 +0200
+++ b/modules/account/move.py Mon Jun 08 09:09:23 2026 +0200
@@ -1573,8 +1573,9 @@
('company', '=', company),
('journal', '=', journal),
])
+ toolbar = dict(toolbar)
+ action = list(toolbar['action'])
for template in templates:
- action = toolbar['action']
# Use template id for action id to auto-select the template
action.append({
'name': template.name,
@@ -1582,6 +1583,7 @@
'wiz_name': 'account.move.template.create',
'id': template.id,
})
+ toolbar['action'] = action
return toolbar
@classmethod