Merge pull request #4991 from expsa/kchyou_dev_odex25_base

[FIX] system_dashboard_classic: FIX big
This commit is contained in:
kchyounes19 2025-10-20 13:48:48 +01:00 committed by GitHub
commit 2e79dc5811
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -135,7 +135,8 @@ class BaseDashboard(models.Model):
for stage in stage_ids:
# TODO: find a way to fix translation without searching in translation model &
#we got translaton issue stage name is translatable ,so we get the stage translation
value = self.env['ir.translation'].sudo().search([('source','=',stage.name)],limit=1).value
value = stage.with_context(lang=self.env.user.lang).name
#value = self.env['ir.translation'].sudo().search([('source','=',stage.name)],limit=1).value
stage = self.env['stage.stage'].sudo().create({'model_id':rec.model_id.id , 'form_view_id':rec.form_view_id.id , 'list_view_id':rec.list_view_id.id ,'stage_id':stage.id ,'name':stage.name,'value':value})
else:
self.update_selection()