I have one field called assessment_group_id which is many2one field. The object for the assessment_group_id is assessment.group
我有一个名为assessment_group_id的字段,其中有许多字段。 assessment_group_id的对象是assessment.group
In the assessment.group object, there is one2many field called group_lines. The object for group_lines is group.lines.
在assessment.group对象中,有一个名为group_lines的one2many字段。 group_lines的对象是group.lines。
In this line item, there is many2one field of hr.employee named therapist_id.
在此订单项中,hr.employee有许多名为therapist_id的字段。
I will book an appointment with the group name.
我将预约团体名称。
In the menu called Today's Appointment, The user belongs to that group only has to see the record.
在名为Today's Appointment的菜单中,用户属于该组只需要查看记录。
In short, I have to write a record rules for many2one field, where user names are in one2many values.
简而言之,我必须为many2one字段编写记录规则,其中用户名在one2many值中。
In above screenshot, Assessment Group is many2one field.
在上面的截图中,评估组是很多领域。
In this there is one2many field where the employee names are written.
在这里有一个写有员工姓名的字段。
The user have to see only their appointments. If the appointment is fixed with the specific group and the user has to see only their appointment records.
用户只能看到他们的约会。如果约定是由特定组修复的,则用户只能看到他们的约会记录。
Any help!
任何帮助!
Will something like this gives result
这样的事情会给出结果
[('user.id','=',[ each.therapist_id.user_id.id for val in assessment_group_id for each in val.group_lines])]
1 个解决方案
#1
0
[('assessment_group_id.group_lines.therapist_id.user_id','in',[user.id])]
This rule worked.
这条规则有效。
#1
0
[('assessment_group_id.group_lines.therapist_id.user_id','in',[user.id])]
This rule worked.
这条规则有效。