Document Versioning
Document Versioning is a feature in ERPNext that lets you keep track of and check all the changes made to a document over time.
Document Versioning is very important for compliance, governance, and operational transparency in the most recent versions of ERPNext (v14 and v15). It keeps track of all changes, so businesses can see what changed, who changed it, when it was changed, and how the data changed over time.
This feature is very useful for Audit Trails, internal reviews, resolving disputes, and finding the Root cause of problems, where being able to see past changes is very important.
How to Turn on Document Versioning
Let’s say you want to turn on Document Versioning for your Purchase Order.
- Go to the list of purchase orders.
- From the Menu (three-dot icon), choose Customize.
- You will be taken to the Purchase Order Customize Form page.
- Check the box next to “Track Changes” in the Properties section.
- Keep the changes.
- Document Versioning will apply to all Purchase Orders that are changed from this point on.
Important Things to Remember:
- Document Versioning doesn’t keep track of changes that were made before Track Changes was turned on.
- Every time you save something that changes the data, a new version entry is made.
- Both changes made by hand and those made by the system (workflows, scripts, integrations) are recorded.
Log of Versions
ERPNext automatically makes a Version Log for every document that has Document Versioning turned on whenever the document is changed.
What is in the Version Log?
- Here is what each Version Log entry has:
- Version timestamp: The date and time the change happened
- User information: the person who made the change
- Changed fields: A full comparison that shows
- Value from before
- Value now
- Changes to the child table, like adding, removing, or updating items in tables like:
- Things
- Taxes
- Schedules for payments
- Changes in fields like Status, Workflow State, or Docstatus that affect the status of a document
Getting to the Version Log
You can see the history of versions from:
- The section of the document called “Timeline / Activity”
- Clicking the Version link next to document events
- The Version list, sorted by Reference Document
- When you look at a Version record:
- All changes are shown in a clear, organized way.
- Clearly marked are the modified fields
- Child row changes show differences at the row level for easy comparision.
Examples of Use
People often use document versioning for:
- Financial audits—keeping track of changes to rates, amounts, taxes, and totals
- Procurement reviews—keeping an eye on changes to purchase orders
- Compliance checks make sure that people are responsible for updating sensitive data.
- Operational troubleshooting—figuring out when and why wrong values were added
More behaviour and limits
- Users can’t change or delete Version Logs.
- It is normal for large documents that get updated often to have a lot of version entries.
- For most use cases, the impact on performance is small, but versioning should only be turned on for important DocTypes.
- Attachments themselves aren’t versioned, but changes to attachment references are recorded.
- If tracked fields are changed or cancelled, version entries are also made.
Best Practice: Turn on Document Versioning for important DocTypes that are used for transactions and approvals, like Purchase Orders, Sales Invoices, Journal Entries, and Contracts.