Understanding Document States


If I have a custom doctype, how would I go about to implement Document States. Basically I want to show, Waiting (Draft), Started (Draft), and Finished (Approved).

I have looked into Workflow States. But the on_submit function does not fire on workflow changes even though the doc_status changes. So I am looking at alternatives such as Document States which I’m not really sure how it works.

Is there some documentation I can read or example to follow? Thanks!


Document states are tied to the status field.

For workflows, you can also use the before_workflow_action and after_workflow_action client-side hooks


Thanks, @peterg

So its to my understanding that this is designed to work without making the form submitable. Because once I do, the forms submit function overrides the status field.

It’s not my understanding that document submission overrides the status variable in general. It may be the case that the doctype you’re working with does that.


Did anyone knows if Document States, will be implemented on the Frappe|ERPNext Doctypes?
Or it will be deprecated on v15 or later?

I was looking for implementations of it, and there is any
The old fashion get_indicator in each listview_settings remains