콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

I have removed delete access from Employee group and its working perfectly in ir.attachment form view and tree view level, but the system is still allowing the user to remove attachment from many2many field(Access warning popup is shown, but still removing the attachment).


How to prevent a normal user from deleting a many2many_binary field?


Below is the field:

attachment_ids = fields.Many2many('ir.attachment', 'message_attachment_rel_1',  'message_id', 'attachment_id', string='Attachments', help='Attachments are linked to a document  ',  'through this field.', track_visibility='always')    

Below is the change in permission for Employee group:

base.access_ir_attachment_group_user,access_ir_attachment group_user,base.model_ir_attachment,base.group_user,1,1,1,0

Below is the error message:

Sorry, you are not allowed to delete this document. Only users with the following access level are currently allowed to do that:
- Sales/Manager
- Project/Manager

(Document model: ir.attachment)

아바타
취소
베스트 답변

Hello Pranav,

Can you please check what are all the access rights available for it.attachment model

you will get it from Setting --> Technical --> Database structure --> model     (visible only dedug mode)

after that change what are all the groups mapped to the current user.

After observing these two you will get an idea.

아바타
취소
관련 게시물 답글 화면 활동
0
11월 18
2971
0
7월 16
3472
0
2월 18
3364
1
11월 17
3035
1
6월 23
4149