details:   https://code.tryton.org/tryton/commit/a73f2297baa2
branch:    8.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 c94cb76eead7 -r a73f2297baa2 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

Reply via email to