Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
5257 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
mar. 22
6818
2
mar. 15
7452
1
dez. 23
1574
5
set. 19
5637
2
dez. 22
22693