I tried to apply domain for many2one field. But I got the following Error:
@api.mutli
def open_other_view(self):
......
......
......
tree_id = self.env.ref('module_name.tree_xml_id').id
return {
'type': 'ir.actions.act_window',
'name': 'title',
'views': [(tree_id, 'tree'), (False, 'form')],
'domain' : [('employee_id','=',self.employee_id)],
....
....
}
you could try to obtain the employee id like:
I hope this help you.