Revert "[FIX] odoo_dynamic_workflow"

This commit is contained in:
SamirLADOUI-sa 2024-11-10 13:45:50 +01:00 committed by GitHub
parent 2d5d958d57
commit 9d1aa4fc53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,8 @@ 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:
ret = self.env[rec_model].sudo().fields_get()['state']['selection'] temp = rec.model_state.split(',')
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,