Remove useless call to count_tab_domain

issue11202
review376641002
This commit is contained in:
Nicolas Évrard committed 2022-02-03 11:55:01 +01:00
1 parent 688a10ff0d
commit 59b1ec32b0
2 files changed
+5 -4

No files matched your search

-3
View File
@@ -868,9 +868,6 @@
this._domain_parser = {};
this.pre_validate = false;
this.switch_callback = null;
// count_tab_domain is called in Sao.Tab.Form.init after
// switch_view to avoid unnecessary call to fields_view_get by
// domain_parser.
},
get readonly() {
var readonly_records = this.selected_records.some(function(r) {
+5 -1
View File
@@ -472,6 +472,11 @@
name = Sao.common.MODELNAME.get(model_name);
}
this.set_name(name);
if (attributes.res_id) {
if (attributes.hasOwnPropery('tab_domain')) {
delete attributes.tab_domain;
}
}
attributes.breadcrumb = [name];
var screen = new Sao.Screen(model_name, attributes);
screen.windows.push(this);
@@ -490,7 +495,6 @@
this.set_buttons_sensitive();
this.view_prm = this.screen.switch_view().done(function() {
this.screen.count_tab_domain();
this.content.append(screen.screen_container.el);
if (attributes.res_id) {
if (!jQuery.isArray(attributes.res_id)) {