details:   https://code.tryton.org/tryton/commit/3d3a1f7a8db8
branch:    7.0
user:      Cédric Krier <[email protected]>
date:      Thu Apr 02 10:26:27 2026 +0200
description:
        Refresh resources when reloading record of form view

        As the record is only cancelled and not recreated, the cached resources 
are
        kept so they must be refreshed.

        Closes #14733
        (grafted from 89e59ce6f450c83d59c7f83313c0bad59b58ff04)
diffstat:

 sao/src/tab.js                   |  2 ++
 tryton/tryton/gui/window/form.py |  2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r 4ba9d60fe0e3 -r 3d3a1f7a8db8 sao/src/tab.js
--- a/sao/src/tab.js    Thu Apr 02 15:32:01 2026 +0200
+++ b/sao/src/tab.js    Thu Apr 02 10:26:27 2026 +0200
@@ -880,6 +880,8 @@
                                 }
                                 return set_cursor;
                             });
+                    } else {
+                        this.refresh_resources(true);
                     }
                     return set_cursor;
                 })
diff -r 4ba9d60fe0e3 -r 3d3a1f7a8db8 tryton/tryton/gui/window/form.py
--- a/tryton/tryton/gui/window/form.py  Thu Apr 02 15:32:01 2026 +0200
+++ b/tryton/tryton/gui/window/form.py  Thu Apr 02 10:26:27 2026 +0200
@@ -508,6 +508,8 @@
                     self.screen.current_record = record
                     set_cursor = True
                     break
+        else:
+            self.refresh_resources(True)
         self.screen.display(set_cursor=set_cursor)
         self.info_bar_clear()
         self.set_buttons_sensitive()

Reply via email to