Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2149 Vizualizări

Hi odoo forum, i need help

i have these fields in my hr.employee model:

yearly_holidays_ids = fields.One2many('hr.employee.yearly.holidays','employee_id')
current_holiday_pool = fields.Integer()


And i have these fields in my hr.employee.yearly.holidays model:

employee_id= fields.Many2one('hr.employee', readonly=True)
year = fields.Integer(string='Year', readonly=True)
remaining_count=fields.Integer(string='Remaining', compute='_compute_remaining_count', store=True)

I want the value of current_holiday_pool in the hr.employee model to use the  value to that in the hr.employee.yearly.holidays model, the remaining_count field, and only the records for the current year (in this case 2021).

I need a compute field ?


Thank you for helping me out!


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
aug. 21
2663
3
sept. 20
11565
1
iun. 25
5240
0
iul. 22
3820
3
iul. 20
11948