Skip to Content
Menú
This question has been flagged

I try for example to remove the "My Account" link from the main navigation.

After looking through code I found the template responsible for adding the link in addons/portal/views/portal_templates.xml:

<template id="my_account_link" name="Link to frontend portal" inherit_id="portal.frontend_layout">
<xpath expr="//a[@id='o_logout']" position="before">
<a href="/my/home" role="menuitem" class="dropdown-item">My Account</a>
</xpath>
</template>

I thought that I could simply override the inherited template by doing

<template id="portal.my_account_link">
</template>

which throws an error: "Element '<t t-name="portal.my_account_link">' cannot be found in parent view."


My question is:

How can I undo changes made by an inherited template of an existing addon?

Please note that I'm not asking for a different way to hide the my account link. I'd like to know, how you experienced odoo developers modify changes different addons want to apply.

Thanks a lot,
Martin


Avatar
Descartar
Best Answer

Hello

You have to delete the record directly. E.g:

In the file: your_module_name/data/ir_ui_view_data.xml

< delete model="ir.ui.view" id="purchase_discount.report_purchaseorder_document"/>

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de març 22
6886
2
de març 15
7494
1
de des. 23
1635
5
de set. 19
5713
2
de des. 22
22812