Merge pull request #1725 from expsa/samir-aladawi-fix-errors

[FIX] odoo_dynamic_workflow
This commit is contained in:
SamirLADOUI-sa 2024-11-10 13:42:41 +01:00 committed by GitHub
commit 2d5d958d57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -85,8 +85,7 @@ class OdooWorkflowModel(models.Model):
for node in rec.node_ids: for node in rec.node_ids:
ret.append((node.node_name, node.name)) ret.append((node.node_name, node.name))
else: else:
temp = rec.model_state.split(',') ret = self.env[rec_model].sudo().fields_get()['state']['selection']
ret = list(zip(temp[::2], temp[1::2]))
return ret return ret
state = fields.Selection(selection='_load_state', string='Status', default=_compute_default_state, state = fields.Selection(selection='_load_state', string='Status', default=_compute_default_state,