Skip to content

Commit

Permalink
FIX: problem on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Oct 15, 2024
1 parent 8a1cfbf commit e6afb8e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plm/models/plm_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,5 +461,14 @@ def get_all_translation(self, object_id, fields):
out[propKey] = getattr(obj.with_context(lang=code), field_name)
return out


@api.model
def get_possible_status(self):
out=[]
for model_id in self.env['ir.model'].sudo().search([('model','=', self._name)]):
for filed_id in self.env['ir.model.fields'].sudo().search([('model_id','=', model_id.id),
('name', '=', 'engineering_state')]):
for ir_model_fields_selection in self.env['ir.model.fields.selection'].sudo().search([('field_id','=',filed_id.id)]):
out.append((ir_model_fields_selection.name,
ir_model_fields_selection.value))
return out

0 comments on commit e6afb8e

Please sign in to comment.