19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:00 +01:00
parent a1137a1456
commit e1d89e11e3
2789 changed files with 1093187 additions and 605897 deletions

View file

@ -0,0 +1,13 @@
from odoo import api, models, fields
class HrEmployee(models.Model):
_inherit = 'hr.employee'
equipment_ids = fields.One2many('maintenance.equipment', 'employee_id', groups="hr.group_hr_user")
equipment_count = fields.Integer('Equipment Count', compute='_compute_equipment_count')
@api.depends('equipment_ids')
def _compute_equipment_count(self):
for employee in self:
employee.equipment_count = len(employee.equipment_ids)