it's work on formview but not on kanban view
the state change in terminal when print it but not save it in database
code:
@api.onchange('stage_id')
def onchange_win_state(self):
for record in self:
if len(record.x_refs) > 0:
if record.stage_id.success_stage:
record.x_refs[0].write({"state": "not"})
Record.x_refs[0].state = 'not'
i try it and it nor working