good morning
i am working on Odoo v8.0, and i want to :
- hide the edit button when a condition is verified
i tried the following code but it didn't worked :
attrs = "{'edit':[('request_state','=','draft')]}"
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
good morning
i am working on Odoo v8.0, and i want to :
- hide the edit button when a condition is verified
i tried the following code but it didn't worked :
attrs = "{'edit':[('request_state','=','draft')]}"
hello,
Edit and Create button are managed by setting access rights using xml and csv.
To hide Edit set permission write to false.
<record model="ir.rule" id="ir_values_my_costume_rule">
<field name="name">My Rule Name</field>
<field name="model_id" ref="model_your_model_name"/>
<field name="domain_force">[('field','operator','value'),('user_id','=',user.id)]</field>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="True"/>
<field name="perm_create" eval="True"/>
</record>
for more details refer this link : https://www.odoo.com/forum/how-to/developers-13/setting-up-rules-access-right-in-xml-csv-files-12667
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Aug 23
|
12549 | ||
change password
Solved
|
|
1
Aug 23
|
11058 | |
|
1
Jul 23
|
7228 | ||
|
4
Apr 23
|
8677 | ||
|
2
Feb 23
|
17601 |