details: https://code.tryton.org/tryton/commit/f186b83936db
branch: default
user: Nicolas Évrard <[email protected]>
date: Fri Oct 31 18:04:31 2025 +0100
description:
Use the local context when launching a graph_open action
Using the local context allow us to access the context of the field
shown by
the graph when the graph shows a One2Many field.
Closes #14341
diffstat:
sao/src/view/graph.js | 2 +-
tryton/tryton/gui/window/view_form/view/graph_gtk/graph.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r b69cd826844d -r f186b83936db sao/src/view/graph.js
--- a/sao/src/view/graph.js Fri Oct 31 18:02:26 2025 +0100
+++ b/sao/src/view/graph.js Fri Oct 31 18:04:31 2025 +0100
@@ -241,7 +241,7 @@
},
action: function(data, element) {
var ids = this.ids[this._action_key(data)];
- var ctx = jQuery.extend({}, this.view.screen.group._context);
+ var ctx = jQuery.extend({}, this.view.screen.group.local_context);
delete ctx.active_ids;
delete ctx.active_id;
Sao.Action.exec_keyword('graph_open', {
diff -r b69cd826844d -r f186b83936db
tryton/tryton/gui/window/view_form/view/graph_gtk/graph.py
--- a/tryton/tryton/gui/window/view_form/view/graph_gtk/graph.py Fri Oct
31 18:02:26 2025 +0100
+++ b/tryton/tryton/gui/window/view_form/view/graph_gtk/graph.py Fri Oct
31 18:04:31 2025 +0100
@@ -138,7 +138,7 @@
def action_keyword(self, ids):
if not ids:
return
- ctx = self.group._context.copy()
+ ctx = self.group.local_context.copy()
if 'active_ids' in ctx:
del ctx['active_ids']
if 'active_id' in ctx: