Search code examples
xmlodooodoo-11

How to override customize_show Attribute in Odoo 11?


Module website has this template:

<template id="footer_default" inherit_id="website.footer_custom" customize_show="True" name="Automatic Footer">
    <xpath expr="//div[@id='footer']" position="replace">
        ...
    </xpath>
</template>

They are setting the customize_show attribute and I want to to override it to false in my module to get rid of the option in the customize menu.

I tried this and serveral other ways:

<template id="footer_default" inherit_id="website.footer_custom" customize_show="False" active="False" name="Automatic Footer">
</template>

But I guess the problem is that mine is my_module.footer_default so I won't be able to override it that way i guess.


Solution

  • You may try updating the ir.ui.view record of the template directly:

    <record id="website.footer_default" model="ir.ui.view">
        <field name="customize_show" eval="False"/>
    </record>