Creating and using smartbuttons in Odoo
Smartbuttons allow you to see how many related records you have in the form view in one overview. They allow you to directly open all the related records in just one click. It is often used within Odoo to quickly navigate to related documents or data. In this tutorial you will learn how to create a smartbutton, how to compute the total in the button and how to open another view after clicking on the smartbutton.
In this tutorial we will create a smartbutton on the form view of the country. The form will have a smartbutton with a counter for the amount of contacts you have in this country. Clicking on the smartbutton will directly open the tree view with the matching contacts.