Community mailing list archives

community@mail.odoo.com

Replacing an entire template

by
Ryan Cole
- 03/23/2016 19:50:02
Is it possible to completely override a <template> definition from a theme module? I'm building a website, and would like to completely remove/replace the website.layout_footer_copyright template. What I've tried so far:

<template id="website.layout_footer_copyright" inherit_id="website.layout_footer_copyright"></template>

<template id="website.layout_footer_copyright"></template>

<template id="override_footer" inherit_id="website.layout_footer_copyright">
    <xpath expr="." position="replace">
        <div></div>
    </xpath>
</template>

None of the above tests have worked (either throwing errors, or not doing anything). 

I'm aware that I could use xpath to find the relevant html tag, and replace it that way - but there are several other templates that I'd like to replace and I need an elegant, simple solution.


Cheers,
Ryan