This question has been flagged
2 Replies
9091 Views

Hii,

can the trash icon on one2many fields be deleted / hidden?

what I mean is in the picture here:

https://drive.google.com/file/d/1m8KcuyaUH23LAkLAwNBIQbAPXE9Df-gt/view?usp=sharing

thank you in advance :D

Avatar
Discard
Best Answer

Hi,

When defining the one2many tree view place attribute delete="0" which will remove the delete button.

Place delete="0" in the one2many tree view as in below image,



Now if you check the view,



Thanks

Avatar
Discard
Best Answer
I want to do this but only if a condition is met, that is, when the condition is met, the delete icon is removed.


Avatar
Discard

Yes use invisible="<condition>" (Odoo v17) else use attrs="{'invisible':[()]"