Hi,
The following is my line of code and is working,
'user_id': fields.many2one('res.users', 'Responsible', track_visibility='onchange', domain="[('emp_department_id', '=', 10)]"),
Now i want replace that employee department id and that should be the value returned by a function,
say something similar to this
def test():
return department id of the login users
'user_id': fields.many2one('res.users', 'Responsible', track_visibility='onchange', domain="[('emp_department_id', '=', self.test())]"),
I know the above statement is not valid since the whole thing is a dict and domain is one of the key in the dict and its value is string. I want this concept to be done somehow.
I am even ok for some crooked ideas. Thanks for your time.