Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
5420 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mrt. 22
6992
2
mrt. 15
7586
1
dec. 23
1707
5
sep. 19
5823
2
dec. 22
22962