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.