#NEWLINE# def deregister( self , ar ) : #NEWLINE# #INDENT# 'Deregister this object.  The base implementation just sets the\n        state to "draft".\n\n        Subclasses may override this to add custom behaviour.  Instead\n        of subclassing you can also override :meth:`set_workflow_state\n        <lino.core.model.Model.set_workflow_state>`,\n        :meth:`before_state_change\n        <lino.core.model.Model.before_state_change>` or\n        :meth:`after_state_change\n        <lino.core.model.Model.after_state_change>`.\n\n        ' #NEWLINE# state_field = self . _meta . get_field ( self . workflow_state_field ) #NEWLINE# target_state = state_field . choicelist . draft #NEWLINE# self . set_workflow_state ( ar , state_field , target_state )