Skip to content

Instantly share code, notes, and snippets.

@herawais
Created June 6, 2021 14:21
Show Gist options
  • Save herawais/9dba65c4b46270c6604d85e01fbb5509 to your computer and use it in GitHub Desktop.
Save herawais/9dba65c4b46270c6604d85e01fbb5509 to your computer and use it in GitHub Desktop.
Odoo Template Inheritance
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<!-- Products Search Bar autocomplete item -->
<t t-name="website_sale.productsSearchBar.autocomplete.custom" t-inherit="website_sale.productsSearchBar.autocomplete" t-inherit-mode="extension" owl="1">
<xpath expr="//b[hasclass('text-nowrap')]" t-operation="before">
<b class="text-nowrap">
custom code
</b>
</xpath>
</t>
</templates>
@jeevan-smartltd
Copy link

i'm sorry, apparently the problem is on me. I read so many answers in stackoverflow and odoo forum, nothing works. But after I read the official documentation, now it works. my bad. thank you.

Hi,
could you please post the solution you found ?

thanks

@jackysupit
Copy link

hi i am sorry for the very late reply. we can hide the same action button using the index. if there are 2 buttons, then we should write 2 separated code to hide those 2 buttons. using regular xpath, just different index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment