Include context domain in URL and tab comparison

Closes #14921
This commit is contained in:
Cédric Krier
2026-07-01 13:16:19 +02:00
parent 91434daade
commit 1b92494767
6 changed files with 17 additions and 0 deletions
+2
View File
@@ -533,6 +533,8 @@ var Sao = {
}
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 || '[]');
+4
View File
@@ -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)]);
+3
View File
@@ -832,6 +832,9 @@
(this.attributes.res_id === attributes.res_id) &&
(compare(
this.attributes.domain || [], attributes.domain || [])) &&
(compare(
this.attributes.context_domain || [],
attributes.context_domain || [])) &&
(compare(
this.attributes.view_ids || [],
attributes.view_ids || [])) &&
+2
View File
@@ -1019,6 +1019,8 @@ class Main(Gtk.Application):
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(
+2
View File
@@ -122,6 +122,8 @@ class Form(TabContent):
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']) == (
@@ -1364,6 +1364,10 @@ class Screen:
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(