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

In crm.team, I add a new many2many called member_ids

I want in menu "My pipeline", the leader of crm.team can see members opportunity as well


My approach is to create a new model called "accessable.res.users" (basically this model just contain 3 field. ID related to user_id.id, user_id, and name related to user_id.name) because when I make a many2many field in crm.lead called "visible_res_user_ids" that use comodel "res.users", then make notebook page tree with "visible_res_user_ids" field, when I open the form, nothing happen. the form is not opened and the page still responsive. just cannot open the form because it tried to read res.users. but if I remove the notebook page, it can open the form


So I assume res.users cannot be accessed by non admin users





Then I test it with filter before put it inside the view domain. 

I assume I have to set the users "Sales" access right to "User: All Documents" to make him can see other document then I filter it

But even after I change that, it still not working

What is wrong with my code?



I'm planning to follow this post https://www.odoo.com/forum/help-1/how-to-inherit-and-change-the-domain-of-standard-rules-in-odoo-8-0-69326 to change the domain from odoo base


아바타
취소
작성자 베스트 답변

I decide to change the way I approach. Basically in domains_force, it use 2 models for comparison. The current model that we open and res.users. So I make a new field in res.users to store what field can a user view. This way I can manage what a user can see when their "Sales" access right is "User: One document only". I change ir.rule with the id crm_rule_personal_lead then in the crm.lead, I change the value in the res.users field. But this comes with another problem. See this link 


Code with updating res.users is not working in server but working in local

아바타
취소
관련 게시물 답글 화면 활동
1
6월 24
2288
0
11월 22
80
1
6월 22
7015
1
7월 21
2676
1
7월 21
4059