In workflow process, when the status have to move to cancel state need not to define the workflow transaction from current state to cancel state. Instead set the cancel button as type=object and write the status directly through the function because here flow will be stopped.

In case again if we have to start the flow from cancel state to draft state, set the button Set to Draft with type=object and call the function. In function we have to write the status directly as draft and call create_workflow() function.

For reference, Module: mrp_repair/ –>¬†action_cancel_draf() method.

Share This