I have a doctype called Task, in which I have added a Table Multiselect fields for selecting multiple users. Now I want to filter the list view based on whether the user created the task or task is asssigned to the user. How can this be achieved.
Suppose
- there is a child doctype name is Task User, in which there is one user link field .
- via customzie form, added one Table MultiSelect field with Options as Task User.
Solution
Create one permission query python script like below
user = frappe.session.user
conditions = f""" (owner = '{user}' or name in
(select tu.parent from `tabTask User` tu where tu.user = '{user}')) """
1 Like