[Python] How to add a custom view button next to Kanban/List/Calendar in Odoo 18 CRM module?

Discussão em 'Python' iniciado por Stack, Maio 14, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working with Odoo 18, in the CRM module, and I want to add a custom button in the top-right view switcher (next to Kanban, List, Calendar, etc.), as shown in this screenshot:

    [​IMG]

    What I want:

    Add a button with a custom icon (e.g. fa-puzzle-piece)

    When clicked, it should open a completely custom view (even a simple "Hello World" div is fine as a start)

    I want to implement this properly using a custom Odoo module (not via JavaScript hacks or monkey-patching)


    What I’ve tried:

    I created a module that inherits the Kanban view and added a button to the view switcher, but it doesn't show up

    I tried defining an ir.actions.client with a custom JS tag, but the view doesn’t load

    I reviewed various tutorials and even used code generators, but nothing resulted in a working view button


    All I need is a working minimal example that:

    Adds a button to the view switcher

    Opens a blank view (where I can later build my own logic)


    I’ve read the Odoo documentation and inspected existing modules, but couldn't find a reliable reference.

    Thanks in advance to anyone who can help clarify how this is done the “Odoo way”!

    Continue reading...

Compartilhe esta Página