Search code examples
pythonxmlodoo

Odoo 16 How to add an item to this drop-down box


Odoo 16 How to add an item to this drop-down box?

enter image description here

Trying to look here odoo\addons\portal\views\portal_templates.xml But I don't get it. Trying to add a menu item there, e.g. with a redirect to the page. Thanks in advance, even if you just give me a hint, I'm still just learning)


Solution

  • I found how to do it the right way, here's the solution, maybe it will be useful to someone

    <?xml version="1.0" encoding="utf-8"?>
    <odoo>
        <template id="my_itemmenu" name="my_itemmenu" inherit_id="portal.user_dropdown">
            <xpath expr="//*[@id='o_logout_divider']" position="before">
                <a href="/my/add-child" role="menuitem" class="dropdown-item ps-3">
                    <i class="fa fa-fw fa-child me-1 small text-muted"/>my_itemmenu
                </a>
            </xpath>
        </template>
    </odoo>