Skip to Content
Menu
This question has been flagged
2134 Views

Hi All,

I have been trying many different ways for hiding the sidebar button. Below code is working on all forms. However, i just want to hide it on sale order form. Widget.modelName seems not working because it is before the form declaration. I also tried   doc_model in [sale.order'] and not working as well. How can I solve it? thanks

<t t-extend="ControlPanel">

            <t t-jquery = ".o_cp_left" t-operation = "replace">

              <t t-if = "widget.modelName == 'sale.order'">

                  <div class="o_cp_left hiddenManagerSO">

                      <div class="o_cp_buttons" role="toolbar" aria-label="Control panel toolbar"/>

                      <aside class="o_cp_sidebar"/>

                  </div>

              </t>

              <t t-if = "widget.modelName !== 'sale.order'">

                  <div class="o_cp_left hiddenManagerKOO">

                      <div class="o_cp_buttons" role="toolbar" aria-label="Control panel toolbar"/>

                      <aside class="o_cp_sidebar"/>

                  </div>

              </t>

            </t>

    </t>

Avatar
Discard