تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
866 أدوات العرض

hai everyone,

I want to ask, here I am working on the payroll module, where there are cases of employees resigning and I have added boolean_toggle for active and inactive status in HR.employee. Now what I want to ask is how do I make the resigned employee not get selected when generating payslips?

Thanks,

الصورة الرمزية
إهمال
أفضل إجابة

Hi Arif,

To get the employees that are active in the selection field, you can add a domain to the field. The selection field will be a many2one field. So by adding a domain to this field, we can filter the employees based on the conditions. Here, you want to get the employees who are in the active state.

Please try adding one of the domains mentioned below to the field.

If you want to add in the XML of the field: domain="[('active', '=', True)]" If you want to add in the Python of the field: domain=[('active', '=', True)]


Hope it helps

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 25
3567
1
يوليو 25
2695
0
ديسمبر 24
1450
0
ديسمبر 23
1297
0
سبتمبر 20
1557