hi everyone
i want to disable delete button in manytomany attachment field.
this is my code :
i just want to disable the X button from that widget when state is != to draft
i hope u can help me
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
hi everyone
i want to disable delete button in manytomany attachment field.
this is my code :
i just want to disable the X button from that widget when state is != to draft
i hope u can help me
Hi Mohamed,
Try ,
<field name="attachment_id" widget="many2many_binary" attrs="{'readonly':[('state','!=','draft')]}" />
Hope it helps,
Kiran K
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Sep 24
|
364 | ||
|
2
Dec 23
|
24062 | ||
|
0
Jul 18
|
3197 | ||
|
0
Mar 15
|
3087 | ||
|
1
Mar 15
|
2497 |
hi
thank you for your response. i want to keep the create in my field i want that user can create an attachment but he cant delete it
Here the user can create/delete in the draft state and is not able to create/delete in any other state