Submit this document to confirm

Hi all,

How can I remove ‘Submit this document to confirm’ a message that comes once a doctype is saved, on top of a draft doctype.

Thanks

You can’t! You also shouldn’t.
It is fundamental to the way the system works. It takes a few minutes to get used to it, but it really is the best way to work in any size organisation with multiple users.
“Save” let’s you keep track of your current status - which might not be “final” (eg. save a purchase order with the same price as your previous order). “Submit” when the item is unlikely to change again (eg. contractual commitment to a revised price)

Thanks! Though I mean this message not the submit button.

No idea, but this message will be shown to only those who have permitted Submit operation on that doctype. But why do you want to remove it ?

It is actually a good indicator esp. on documents that affect Accounts because all background ledger entries will be created when the document will be submitted not when saved. The Draft status is appropriate because it shows that the document may have all the details some may be subject to change and are not yet finalized.

Now imagine this message was not shown. You do only data entry (i.e. fill in details, and save but don’t submit) but the real work is pending that is actually moving money or material between accounts.

I’m ok with the whole process from save to submit, but the submit document to confirm is somehow confusing. Is submit to confirm what? That is the question that come to my minds

To confirm the current document which is saved as draft

1 Like

Great! Thanks a lot

Say you have a Payment Entry which says a customer is paying you 100 USD for some services he /she used.

Now in draft, that transaction is simply a document that is sitting on your database. No accounts affected nothing.

When you are submitting, you are confirming this payment and then ERPNext will create entries in the ledger according to the details you have filled in the Payment Entry. Draft mode gives you the chance to modify details in case of any changes that may happen. Finally when you are sure, you go on to submit which affects ledgers and actually the transaction is recorded.

These documents are good abstractions so I suggest you read the underlying code if you get the chance or have the time on github or your local instance.

Another question, is it possible to have a submit button, which can submit more than one doctype at once? For example I have created 8 doctypes, I want to be submit all at once.

You can write a custom script to do that.

Hmm. You can write a custom script that can do this for you. But creating such a function will be difficult in JS because it is much tougher in JS. A python function getting called from JS can do that trick.

Could you please help me with an example of such a script? Thanks

I really appreciate.

1 Like

I have done something like this to set my own message inside .js file

frappe.ui.form.on('MyDocTypeName', {
        refresh: function(frm) {
                frm.set_intro("");
                frm.set_intro(__("Submit this document to continue with the flow."), true);
        }
});