Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2357 Prikazi

CRM module is untouched, means not any customization made yet.

please help in writing domain filter for Record Rule to get all user's data whose Manager is currently logged-in user including his/her data in CRM leads. what i have tried yet, mentioned below with errors it is showing.

['|', ('user_id.employee_id.manager_id', '=', user_id), ('user_id', '=', user_id)]

ValueError: : "name 'user_id' is not defined" while evaluating
"['|', ('user_id', '=', user_id), ('user_id.employee_id.manager_id', '=', user_id)]"

['|', ('user_id', '=', user\\.id\\),\\('hr_employee\\.parent_id\\.user_id',\\ '='\\ ,\\ user.id)]

raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf)))
ValueError: Invalid field crm.lead.hr_employee in leaf ('hr_employee.parent_id.user_id', '=', 2)


regards


Avatar
Opusti
Best Answer

Hi,

Can you please try this way,

['|', ('user_id', '=', user.id), ('user_id.employee_ids.parent_id.user_id', '=', user.id)]

Thanks

Avatar
Opusti
Avtor

@Savya Sachin thank you for your interest to help. i applied it and run CRM, it showed me the default Pipeline in kanban view, i removed default filter My Profiles but still it is showing only the data related with logged-in user Mitchell Admin and NOT his sub-ordinate Marc Demo's data which should appear. please guide me. i have its default filter with your given filter.
please, also help to post here in this forum because my post contains back slashes in 2nd example and your's has no back slash to disturb the code.

Avtor

it works now, there was some unknown problem, i deleted record rule and copy the code again from your post and it worked fine now. thanks very much for your help.

Related Posts Odgovori Prikazi Aktivnost
1
mar. 24
819
0
avg. 22
722
0
mar. 15
4130
1
jan. 24
1334
1
nov. 23
1399