Issue with "Cancel" in Workflow

Good Day Everyone,

In a standard Workflow, the Last Two states are “Approved” and “Cancelled”. In the “Approved” state the Doc Status is 1, and the “Cancelled” state the Doc Status is 2.
When testing the full workflow, at the “Approved” state, the Document is Submitted. Normally, the workflow ends at this state.
When canceling the Document in the workflow, at the “Approved” state, the Standard “Cancel” Button appears, and the “Actions” Button appears as well. Inside the Actions Button, an action called “Cancel”.
When clicking the standard “Cancel” Button, The Workflow state remains the same at “Approved” state, (Even when removing the “Cancel” State and Action Doesn’t work) and clicking the Action Button “Cancel”, a message appears (Illegal Document Status for Cancelled).
When clicking the Actions Button “Cancel”, it works perfectly.
P.S. I tried to remove the “Cancel” Permissions in order to use the Action Button instead of using the Standard “Cancel” Button, but it didn’t work.

How to use the Action Button “Cancel” without removing the Permissions for “Cancel”?

Thank You

3 Likes

having the same issue, when click the standard action ‘cancel’ button, doc is cancelled but the state is still showing ‘Approved’.
Did you find any solution for this?

1 Like

Just fixed this. :slight_smile:

https://github.com/frappe/frappe/pull/7169

1 Like

Hi,

Im using the v11 version with already come up with the hotfix above but still having the same issue .

Currently for temp fix i need to add those hide script at the doctype affected .

v14- I have some sales order that were cancelled but they are still showing as valid orders back-end because the DOCUMENT STATUS = SUBMITTED

How can I change the document status = CANCELLED?