details: https://code.tryton.org/tryton/commit/0a37d816a716
branch: default
user: Cédric Krier <[email protected]>
date: Wed Jul 01 13:16:19 2026 +0200
description:
Include context domain in URL and tab comparison
Closes #14921
diffstat:
sao/src/sao.js | 2 ++
sao/src/screen.js | 4 ++++
sao/src/tab.js | 3 +++
tryton/tryton/gui/main.py | 2 ++
tryton/tryton/gui/window/form.py | 2 ++
tryton/tryton/gui/window/view_form/screen/screen.py | 4 ++++
6 files changed, 17 insertions(+), 0 deletions(-)
diffs (77 lines):
diff -r 525198c97acd -r 0a37d816a716 sao/src/sao.js
--- a/sao/src/sao.js Wed Jun 24 22:07:52 2026 +0200
+++ b/sao/src/sao.js Wed Jul 01 13:16:19 2026 +0200
@@ -533,6 +533,8 @@
}
attributes.search_value = loads(params.search_value || '[]');
attributes.domain = loads(params.domain || '[]');
+ attributes.context_domain = loads(
+ params.context_domain || '[]');
attributes.context = loads(params.context || '{}');
attributes.context_model = params.context_model;
attributes.tab_domain = loads(params.tab_domain || '[]');
diff -r 525198c97acd -r 0a37d816a716 sao/src/screen.js
--- a/sao/src/screen.js Wed Jun 24 22:07:52 2026 +0200
+++ b/sao/src/screen.js Wed Jul 01 13:16:19 2026 +0200
@@ -2170,6 +2170,10 @@
if (!jQuery.isEmptyObject(this.domain)) {
query_string.push(['domain', dumps(this.domain)]);
}
+ if (!jQuery.isEmptyObject(this.context_domain)) {
+ query_string.push(
+ ['context_domain', dumps(this.context_domain)]);
+ }
var context = this.local_context; // Avoid rpc context
if (!jQuery.isEmptyObject(context)) {
query_string.push(['context', dumps(context)]);
diff -r 525198c97acd -r 0a37d816a716 sao/src/tab.js
--- a/sao/src/tab.js Wed Jun 24 22:07:52 2026 +0200
+++ b/sao/src/tab.js Wed Jul 01 13:16:19 2026 +0200
@@ -833,6 +833,9 @@
(compare(
this.attributes.domain || [], attributes.domain || [])) &&
(compare(
+ this.attributes.context_domain || [],
+ attributes.context_domain || [])) &&
+ (compare(
this.attributes.view_ids || [],
attributes.view_ids || [])) &&
(attributes.view_ids ||
diff -r 525198c97acd -r 0a37d816a716 tryton/tryton/gui/main.py
--- a/tryton/tryton/gui/main.py Wed Jun 24 22:07:52 2026 +0200
+++ b/tryton/tryton/gui/main.py Wed Jul 01 13:16:19 2026 +0200
@@ -1019,6 +1019,8 @@
attributes['search_value'] = loads(
params.get('search_value', '[]'))
attributes['domain'] = loads(params.get('domain', '[]'))
+ attributes['context_domain'] = loads(
+ params.get('context_domain', '[]'))
attributes['context'] = loads(params.get('context', '{}'))
attributes['context_model'] = params.get('context_model')
attributes['tab_domain'] = loads(
diff -r 525198c97acd -r 0a37d816a716 tryton/tryton/gui/window/form.py
--- a/tryton/tryton/gui/window/form.py Wed Jun 24 22:07:52 2026 +0200
+++ b/tryton/tryton/gui/window/form.py Wed Jul 01 13:16:19 2026 +0200
@@ -122,6 +122,8 @@
and self.model == model
and self.res_id == attributes.get('res_id')
and self.attributes.get('domain') == attributes.get('domain')
+ and (self.attributes.get('context_domain')
+ == attributes.get('context_domain'))
and self.attributes.get('view_ids') == attributes.get('view_ids')
and (attributes.get('view_ids')
or (self.attributes.get('mode') or ['tree', 'form']) == (
diff -r 525198c97acd -r 0a37d816a716
tryton/tryton/gui/window/view_form/screen/screen.py
--- a/tryton/tryton/gui/window/view_form/screen/screen.py Wed Jun 24
22:07:52 2026 +0200
+++ b/tryton/tryton/gui/window/view_form/screen/screen.py Wed Jul 01
13:16:19 2026 +0200
@@ -1364,6 +1364,10 @@
if self.domain:
query_string.append(('domain', json.dumps(
self.domain, cls=JSONEncoder, separators=(',', ':'))))
+ if self.context_domain:
+ query_string.append(('context_domain', json.dumps(
+ self.context_domain, cls=JSONEncoder,
+ separators=(',', ':'))))
context = self.local_context # Avoid rpc context
if context:
query_string.append(('context', json.dumps(