Merge pull request #5003 from expsa/y_dev_odex25_base

[FIX] system_dashboard_classic: Fix bug
This commit is contained in:
kchyounes19 2025-10-21 09:31:06 +01:00 committed by GitHub
commit 976487f270
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 5 deletions

View File

@ -106,12 +106,10 @@ class BaseDashboard(models.Model):
#becuase when holiday work flow installed records of leave can hold state or stage depends on holiday type.
if rec.model_name == 'hr.holidays':
rec.is_double = True
elif 'stage_id' in model._fields:
rec.is_stage = True
elif 'state' in model._fields:
rec.is_state = True
elif 'stage_id' in model._fields:
rec.is_stage = True
@api.depends('name', 'model_id')
@ -257,7 +255,7 @@ class BaseDashboard(models.Model):
else:
self.update_selection()
if 'stage_id' in model._fields and rec.model_name != 'hr.holidays':
elif 'stage_id' in model._fields and rec.model_name != 'hr.holidays':
rel = self.env['ir.model.fields'].sudo().search([('model_id','=',rec.model_id.id),('name','=','stage_id')])
#call method to get the stage of the model
self._get_stage(rel.relation)