Odoo workflow

class workflow_example(models.Model): _name = 'workflow.example' state= fields.Selection([('PGRC','PGRC'), ('ORIC','ORIC'), ('VC','VC'), ('External Evaluator','External Evaluator')],'State')

<page string="External Evaluation"> <header> <button name="btn_submit_to_oric" string="Submit" type="object" class="oe_highlight" groups="pgrc_user"/> <newline /> <field name="external_evaluation_sub_state" widget="statusbar" statusbar_visible="PGRC,ORIC,VC,External Evaluator" readonly="1" /> </header> </page>

@api.one def btn_submit_to_oric(self): if every_thing_is_fine: # perform some action self.write({'state':'ORIC'}) else: # force to perform necessary action