Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3191 Prikazi

Hii,

I have a Many2one custom field on hr.leave model. 

substitute_employee_id = fields.Many2one('hr.employee', string='Substitute Employee')
<field name="substitute_employee_id"/>

Currently substitute_employee_id shows all employees from hr.employee model on the view.

1. I want to show all employees instead of currently logged in employee in substitute_employee_id field? 

2. How to show logged in user department employees only and not currently logged in employee? 

How to apply a filter or domain on python or xml?

Avatar
Opusti

In future this will helps: https://goo.gl/8HgnCF

Best Answer

Hi Muhammad: Try the following domain on the field

<field name="substitute_employee_id" domain="[('user_id', '!=', uid)]"/>

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
3
sep. 20
71920
2
sep. 23
9636
1
apr. 22
2569
1
jul. 20
5717
0
mar. 15
4802