Try ERPNext Buy Support Partners Foundation

Workflow Issue: Error when transitioning from Submitted State

Hi ,

We tried adding a transition from a State with Docstatus ‘1’ to another State with Docstatus ‘1’ but it returns the following error:

ValidationError: Illegal Document Status for Sample Workflow State

Please note that ‘Allow on Submit’ is checked in the Workflow State field. We need this transition as an acknowledgement after submission of the document

Any ideas or suggestions pls?

Kind regards,

Github Issue:

You can only transition from Submitted state (docstatus 1) to Cancelled state (docstatus 2). Any document with submitted status can only be validated once which means that any workflow state that changes the docstatus to 1 will register the document as submitted.

Hi @flexy2ky

Thanks for your response but this is an issue! It should be possible to update the Workflow State after submission! That’s why the ‘Allow on Submit’ option is always checked by default I suppose?

Since the Workflow State field works interchangeably as the Status field, it should be possible to have it updated after submission. Seems to me like a bug

Allow on submit ? Is that not applicable to fields in a Doctype and not the doctype itself ?

I am not sure that “allow on submit” applies to the doctype

Regards

Hi @olamide_shodunke

Yes, you’re right. ‘Allow on Submit’ is a setting that is applied on the ‘Workflow State’ field which is the field which get’s updated during a workflow transition. The normal expectation is that you should be able to update the Workflow State field even after a document is Submitted

Kind regards,