Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3134 Представления

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?

Аватар
Отменить

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

Лучший ответ

Hi Muhammad: Try the following domain on the field

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
3
сент. 20
71898
2
сент. 23
9601
1
апр. 22
2520
Many2One Domain Решено
1
июл. 20
5689
0
мар. 15
4796