1
0
Fork 0
mirror of https://github.com/NaN-tic/sao-old.git synced 2023-12-14 02:12:52 +01:00

Manage context domain on screen

issue5485
review27151002
This commit is contained in:
C?dric Krier 2017-03-29 22:38:20 +02:00
parent 33cb5fdd21
commit 48b4663205
2 changed files with 6 additions and 0 deletions

View file

@ -96,6 +96,7 @@
params.model = action.res_model || data.res_model;
params.res_id = action.res_id || data.res_id;
params.context_model = action.context_model;
params.context_domain = action.context_domain;
params.limit = action.limit;
params.icon = action['icon.rec_name'] || '';

View file

@ -633,6 +633,7 @@
this.current_view = null;
this.current_record = null;
this.domain = attributes.domain || [];
this.context_domain = attributes.context_domain;
this.size_limit = null;
if (this.attributes.limit === undefined) {
this.limit = Sao.config.limit;
@ -812,6 +813,10 @@
}
var domain = this.search_domain(search_string, true);
if (this.context_domain) {
var decoder = new Sao.PYSON.Decoder(this.context);
domain = ['AND', domain, decoder.decode(this.context_domain)];
}
var tab_domain = this.screen_container.get_tab_domain();
if (!jQuery.isEmptyObject(tab_domain)) {
domain = ['AND', domain, tab_domain];