콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3337 화면

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)]"/>

아바타
취소
관련 게시물 답글 화면 활동
3
9월 20
72070
2
9월 23
9839
1
4월 22
2781
Many2One Domain 해결 완료
1
7월 20
5834
0
3월 15
4936