Ahrimann Steiner
Ahrimann Steiner

Reputation: 1314

Odoo: custom module-views overriden by WebEditor-views in Multi-site context

In Odoo-13 (odoo.sh), in my custom module src/user/membershipzsb, after having created a new qweb (web-layout): portal_my_details_zsb which inherit the Base-View portal_my_details (view id:421)

<odoo>
    <data>
        <template id="portal_my_details_zsb" inherit_id="portal.portal_my_details">
        <xpath expr="//form/div[hasclass('o_portal_details')]/div/div" position="inside">
      
            <div t-attf-class="form-group #{error.get('mbr_pro_email') and 'o_has_error' or ''} col-xl-6">
              <label class="col-form-label" for="mbr_pro_email">Email Pro.</label>
              <input type="email" name="mbr_pro_email" t-attf-class="form-control #{error.get('mbr_pro_email') and 'is-invalid' or ''}" t-att-value="mbr_pro_email or partner.mbr_pro_email"/>
            </div>
            <div t-attf-class="form-group #{error.get('mbr_pro_phone') and 'o_has_error' or ''} col-xl-6">
              <label class="col-form-label" for="mbr_pro_phone">Téléphone Pro.</label>
              <input type="tel" name="mbr_pro_phone" t-attf-class="form-control #{error.get('mbr_pro_phone') and 'is-invalid' or ''}" t-att-value="mbr_pro_phone or partner.mbr_pro_phone"/>
            </div>
           
        </xpath>
      </template>
   </data>
</odoo>

And after having updated this custom module, its new html input fields are displayed right on the website page (/my/account).

enter image description here

enter image description here

But in Multi-Website context, when I use the WebEditor to customize this page, a new Base-view is created portal_my_details[mywebsitename] (view id: 7834) which has the same view-key as the original one (view id:421 : portal.portal_my_details) and therefore override this original one and its inherited view (from my custom module).

enter image description here

How to prevent this weird overriding behavior in multisite ?

Upvotes: 1

Views: 80

Answers (0)

Related Questions