changeset c158a5b8cd44 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=c158a5b8cd44
description:
        Remove useless call to count_tab_domain

        issue11202
        review376641002
diffstat:

 src/screen.js |  3 ---
 src/tab.js    |  6 +++++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r d5bcfde09046 -r c158a5b8cd44 src/screen.js
--- a/src/screen.js     Tue Feb 01 17:22:20 2022 +0100
+++ b/src/screen.js     Thu Feb 03 11:55:01 2022 +0100
@@ -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) {
diff -r d5bcfde09046 -r c158a5b8cd44 src/tab.js
--- a/src/tab.js        Tue Feb 01 17:22:20 2022 +0100
+++ b/src/tab.js        Thu Feb 03 11:55:01 2022 +0100
@@ -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)) {

Reply via email to