From fcb26db97a822deda1e1d2e80ca57f734d166ec0 Mon Sep 17 00:00:00 2001 From: younes Date: Tue, 21 Oct 2025 09:24:17 +0100 Subject: [PATCH] [FIX] system_dashboard_classic: Fix bug --- odex25_base/system_dashboard_classic/models/config.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/odex25_base/system_dashboard_classic/models/config.py b/odex25_base/system_dashboard_classic/models/config.py index a26f7fa1c..dada504f4 100644 --- a/odex25_base/system_dashboard_classic/models/config.py +++ b/odex25_base/system_dashboard_classic/models/config.py @@ -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)