details: https://code.tryton.org/tryton/commit/731406d3e4e7
branch: 7.0
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
(grafted from 9e8d1bca2c7fd2fc4ce70284e069d4b06f5ec810)
diffstat:
modules/account/move.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 83905b96c05c -r 731406d3e4e7 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
@@ -1518,8 +1518,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,
@@ -1527,6 +1528,7 @@
'wiz_name': 'account.move.template.create',
'id': template.id,
})
+ toolbar['action'] = action
return toolbar
@classmethod