This question has been flagged
3 Replies
2666 Views

I tried a lot of ways to do connection.But i didn't any solution for that. Can you help me out? Thanks in Advance.

Please note my version is odoo 11.

Avatar
Discard
Best Answer

There is a function in hr_holidays.py which returns all remaining leaves according to leave type.

ie,


leave_type.get_days(employee_id.id)

here leave type is type object or "hr.holidays.status". which returns result of dict containing
leave_type id as key and values ,[virtual_remaining_leaves,max_leaves,remaining_leaves,leaves_taken]



Avatar
Discard
Author

I can't connect hr.holidays.status and hr.employee. Please give me a solution

env['modelname'].get_days()

Best Answer

Hi,

By remaining Field,  you mean the remaining leaves of an Employee?

If so, by default itself the remaining leaves of an employee are shown in their form.




Thanks

Avatar
Discard
Author Best Answer


Cybrosys Technologies

Thanks for answering.

I want to show remaing all leaves in a tab in the employee directory

https://prnt.sc/kqwqht

This image wil help you to understand.

Avatar
Discard