The Odoo Studio module will help you to add smart buttons to any
model
you want. You can follow the below steps to add a smart button
easily.
After enabling the studio module, you can navigate to the place
where
you going to add the smart button, and there will be a ‘+’ icon for
adding the smart button, as shown below:
Click on the ‘+’ icon to see the options for a smart button. You can
select the label, icon, and related field for the smart button.
Here, we can label the smart button as ‘Lines,’ add an icon, and
select the sale order line as the related field.
After filling in these details, you will be able to see your smart
button as given below:
If the developer mode is activated, you can see the details of your
smart button while pointing the mouse over it.
Close the studio, and you can see your smart button on the view. The
number inside the smart button indicates the number of related
fields to the model.
Here, the number is 3, which means there are a total of 3 order
lines.