ERPNext - Performance - Versioning of a few insert only doctypes

We observed from tabVersion that we are maintaining version for following doctypes which by nature are either Insert Only or Calculated based on some other doctype.

  1. Stock Ledger Entry -
    Insert Only. No one will ever go and change stock ledger entry by hand.
  2. General Ledger Entry -
    Insert Only. No one will every go and and change ledger entry by hand.
  3. Bin -
    Same as above. This is calculated record and no one will change it by hand.

Having these document versioned creates 1 duplicate record each. In addition to that, in case there is any backdated Sales invoice/Delivery note entry it updates all subsequent Stock and General Ledger entries and also resulting in version record being created.

In our implementation, tabVersion table is bloated as follows -

Doctype            count(*) from tabVersion
Bin                                    635367 
GL Entry                              1075113 
Stock Ledger Entry                     283260 

We are planning to disable Versioning for above tables. Wanted to understand from this community if it is worth to disable versioning in core ErpNext codebase for above table. This can be sent as a PR then.


Agreed you can remove versioning from those doctypes!

did you send the PR for this performance upgrade?

it’ll leave a significant impact on performance enhancement.

Is this not about making immutable ledger? Once the entry is posted. No changes allowed on them.

Its about Versioning, Extra info(Audit Trail) for Each document.

So, if if we disable version control without restricting modification of entries, it will not be a good scenario when some modifications is done.

I understand that, Stock Entry or GL entry is not posted manually, but if someone does that. What is the protection we have?

in ERPNext there is no provision to do that.