0

模块website有这个模板:

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

他们正在设置customize_show属性,我想在我的模块中将其覆盖为 false 以摆脱自定义菜单中的选项。

我尝试了这种方法和其他几种方法:

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

但我想问题是我的问题是,my_module.footer_default所以我无法以我猜的方式覆盖它。

4

1 回答 1

3

您可以尝试ir.ui.view直接更新模板的记录:

<record id="website.footer_default" model="ir.ui.view">
    <field name="customize_show" eval="False"/>
</record>
于 2018-01-23T20:40:06.497 回答