'Odoo Custom Button in Tree View

I follow developer tutorial from Odoo documentation and I found that we can make a custom button like check and cross button.

enter image description here

But the problem is, I can't found the source code to achieve those features. How can I add those custom buttons?



Solution 1:[1]

it's a simple class that you can use on buttons times for cross and check for ticks

<button name="function_for_button_press" type="object" class="fa fa-check" />
<button name="function_for_button_press" type="object" class="fa fa-times" />

also use style tags to make them look better list of icons you can use in odoo

Solution 2:[2]

In odoo backend form I usually use:

<button name="action_check" type="object" icon="fa-check text-success" string="Check"/>
<button name="action_cross" type="object" icon="fa-times text-success" string="Cross"/>

text-success it is for icon's green color.

I hope this answer can be helpful for you.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Muhammad Yusuf
Solution 2 Juan Salcedo