Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
12701 มุมมอง

I want my user should have a privilege to add attachment in customer master form and not to delete that attachment after uploading document. To configure this option i tried in Setting -> Technical -> Security -> Access-Control List and choose ir.attachment user and enable only Read access and untick all other. But not working i can delete attachment. Any other configuration for only add a attachment and not delete the attachment. Or Else any other configuration for achieve these things...

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Go to

Settings -> Security -> Record rules -> Add rule

image description

อวตาร
ละทิ้ง
ผู้เขียน

Thanks.. I will try..

คำตอบที่ดีที่สุด

You need 2 ir_rule according to this answer by Olivier Dony for version 7 and 8: https://bugs.launchpad.net/openobject-addons/+bug/969198

For employee:

['|',('res_model','!=','hr.employee'),('res_id','in',[e.id for e in user.employee_ids])]

For hr manager:

[('res_model','=','hr.employee')]

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 15
8390
0
พ.ย. 23
2402
1
ก.พ. 23
5947
0
มี.ค. 22
1626
1
ม.ค. 22
6781