Change default state of a Document (Sales Invoice), once saved, to Subbmited (but without the Is submmitable option in the doctype)

Hi folks,

I have unchecked / disabled the Validation (Is submmitable) on the Sales Invoice Doctype. This is to avoid a problem with the Spanish Invoices Number (Cause in Spain all invoices must be correlative).

My problem now, is that after that, documents are saved as Draft, so they don’t appear in the Accounting Balance. How can I change the document estate of a Sales Invoice to Validated once saved, with the Validation option of the doctype unchecked and disabled?



@rtimagine your strategy won’t work. All balances are only posted on submission

maybe add a custom field to track the Invoice Number

Hiya rmehta,

Thanks for the answer. I understand that I will not archieve to make the Sales Invoice Submmited (to appear in the Balance), without the “Is subbitable checked box”.

So plan B would be to create a custom field with a new sequence that only runs when I subbmit the document. The concept of the problem, is that in Spain and other countries the sequence in Invoices must be correlative, and this is mandatory. So this is a big problem for companies that try to implement ERPNext, most of them will stop once they find this problem. I think @angelsanchez has reported this problem to you.

On the other hand, I’m working on adapt ERPNext to the Spanish requisites, but it’s getting hard to do. I hope I can do it and I can share it, but it’s not easy.

I can’t do a resume of the things that doesn’t fit with the Spanish Requisites:

- Chart of Accounts. I’m working on this right now. There’s no one really prepared, and there are concepts that are different or I don’t know how to configure (we have a root group, where then you will find a subgroup that is an Asset, and other that is a Liability, but I can only chose one root type no?) , so I’m testing cause I don’t know if this can be archieved. And for instance there should be a Name and a Number (But ok I can put this all together).

- Payment methods: Is very common that we have 1) A mutiple days payment (for instance 30-60-90 days method), and 2) a fixed day of payment that depends on the customer, so you have “to wait” untill this day after the 30 days (or every day of the 30-60-90 payments).

- Journal Voucher: I’m not sure about his one (I’m asking for information about what is mandatory), but in general is more common to have a Journal Voucher created from the Sales Invoice (one, or more). And I can’t find the way to do this in ERPNext, cause the Sales Invoice goes directly to the Balance without haven’t been converted to JV. But, maybe this is right and I don’t need legally the JV, so maybe just with the report of movements (I mean SINV, PINV…) is enough.

- Reports: Well, there are some personalized reports that I’ll have to do. Some will be not be easy. But ok, I think this is normal in any country.

If you know someone is working on this, o if someone of the core team of ERPNext can help on this, please let me know. I think there are not many users from Spain that have archieved to implement completely ERPNext. And the problems are the ones I mentioned. So, is perfect por CRM and other things, but the problem is when you arrive to Accounting. On the other hand, I think there’s a Openerp/Odoo spanish community, so is a pity, cause I think ERPNext is far better than Openerp/Odoo and you could have a big community in Spain once this problems are solved.

Keep in touch,


Hi did you find a solution to this? This has become essential for me to execute.

  1. Would it be possible to make invoice number editable by customization?
  2. To make edits without -1/-2 addition.
    Can someone direct me to code where -1/-2 is added in the code?

Have you managed to to implement this functionality? I’m desperate to get away from Odoo but right now I can’t because of these issues