Hi all,
I am able to get the id of the current user in the domain and use it successfully as follows:
field name="domain" eval="[('
doctor_id.name.internal_user.id', '=',
Eval('context',{}).get('_user'))]" pyson="1"/>
This is good as far as we want to apply condition on Id of the user.
What if we want to get the specialty of the current user using the user Id from context and use it in a domain rule to view list of only those records which contain the same specialty?
If it is not possible, can we place some key/value data in context and refer to it in domain rules just as we referred to '_user'? This way I would be able to write the following domain rule to filter on the basis of specialty:
field name="domain" eval="[('
specialty.id', '=',
Eval('context',{}).get('_specialty'))]" pyson="1"/>
Thanking you in anticipation.
Regards,
Khurram.