Add Custom Button in Tree or Header of a Kanban in Odoo16
We all know that, in Odoo, we can customize and add buttons to different views to achieve different Functionality as per our requirements. The functionalities of buttons may include opening a new pop-up Or wizard, changing the states of the records, printing documents, and so on. In this blog, We will look into the steps involved in adding a custom button in the tree or Header of Kanban in Odoo. In this example, we will add a button in the tree and Kanban header to open a wizard.
Adding a button in the list view
Tree View in Custom Module
Adding a button in the Kanban view
- With the kanban view, create an XML (custom_kanban_button.xml) file wherein we will inherit the kanban view and add our custom button.
- This XML file is to be placed under the static → src →XML folder of the module.
- The image below shows the content of the above XML file.