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

I have created a new model that refers to company_id and now i want to add restriction rule so user can only create and see only his company items. Is that possible to do? I've tried to write rule like this:
[( 'Raw_material_comp_id', '=', 'user.company_id.id')]
but after that all my items of "raw material" disappears and I can not create any new ones. Any help?

아바타
취소
작성자

Solved just need to replace code:

[('raw_material_comp_id','child_of',[user.company_id.id])] [CORRECT]

Works fine.

관련 게시물 답글 화면 활동
2
7월 24
2669
1
6월 24
5138
1
10월 23
10845
1
10월 23
98
1
8월 23
2193