79607932

Date: 2025-05-06 03:36:04
Score: 1.5
Natty:
Report link

Actually, your code works, the button does appear.

Electronic Products

I assume that, you didn't know that in Odoo, for general, buttons that used in the tree/list view don't always show, they only appear when any data is selected. So, if I don't select any data, you can see on the picture below, the "import" button of yours will disappear.

No Data Selected in List

Therefore, if what you want is for the button to always be shown, then you need to make further customization by utilizing the Owl JS component (but it needs more advanced knowledge)

You can see a topic discussed in Odoo forum similar with that here:
How to add a button next to Create in List View in Odoo 16

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: farisfath25