Merge pull request #5003 from expsa/y_dev_odex25_base
[FIX] system_dashboard_classic: Fix bug
This commit is contained in:
commit
976487f270
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue