Sample Data for Demo


Is there sample data that we can use to really understand ERPNext’s abilities? I will take data in text files, or even a whole database dump that I can upload.

But something that in your opinion, is good data to demonstrate it’s abilities. As I am new to this particular piece of software.

Thank you

Hello, in our experience after searching a long time on this subject, was to create a database with good information, and then make a script to run with bench, that after reading the bkp of this database, updates all the date fields of the specified doctypes based on a formula.

This way we always have complete and clean demos ready to use.

1 Like

In version-12 there is data for demo site. And in the bench there is command to create the demo site (find it using the --help)
I don’t know if this still exist in version-13

Awesome! Thank you!

I will look for it!

Does it exist in version 13? Do you know the command?

We dont use that command. The demo info its so bad.

we read the code of how this command was made, and we did not like it, it was very difficult and cumbersome to customize it.

Our solution today is very efficient, the time is in generating a good demo with the information you need.

The issue then is that there is absolutely no way to show someone that this software does anything at all! Until they invest tens of thousands of dollars to load their data in and have someone just fiddle with it.

Right? That is the alternative. People will just spend the money to fiddle with it on the hopes it turns into something that could be useful for their business?

Without sample data, or some demonstration, that is a pretty big leap of faith. I’ve never used the system before? Should I be the one developing the test data?

I’ve never seen it used before, should I be the one loading a companies data into it? Since I’m the only one who suggested ERPNext, and I have no way of showing that it actually does something. I’m at a loss here.

I actually have to show this to someone next week, and I have nothing to show them.

Please can you make sample data available.

Is there demo data? Can the client run reports on Demo data?

I know how to download and install it. It has no demo.

I find it hard to read this type of comments, increasingly common in the forum.

I understand your point of view and I also complained (without writing it in the forum) that there is no complete example data.

Now when you are already profiting from the system (not a bad word, just that you get money out of it), as was our case too, it cannot demand what you are demanding.

It’s like saying “I’m missing X thing and I can’t earn money! just do something for free and that’s it”.

Here is the idea of our script, in case it is useful to someone else. We have an original fixed date, and based on that it makes the calculations at the moment the bench command is thrown.

As I said before, it requires a lot of work to write the necessary doctypes (and the first bd data example!), but the methodology that Frappe uses to create the demos is much more complicated.

def setear_fechas(doctype, dates=[], child_dates={}, related_doctype=''):
    doctype (str): Quotation
    dates (list): ['transaction_date', 'valid_till']
    child_dates (dict): {'Payment Schedule': 'due_date'}
    related_doctype (str): 'Stock Ledger Entry'
    import datetime

    def get_new_date(old_date):
        if not old_date:

        old_time = None

        if type(old_date) == datetime.datetime:
            old_time = old_date.time()
            old_date =

        fecha_demo =, 12, 18)
        fecha_hoy =
        diff = (fecha_demo - old_date).days

        value = fecha_hoy - datetime.timedelta(days=diff)

        if old_time:
            return datetime.datetime.combine(value, old_time)

        return value

    docs = frappe.get_all(doctype, fields=['name'] + dates)

    for doc_data in docs:
        # Cambia las fechas al doctype en si
        for field_name in dates:
            value = get_new_date(doc_data[field_name])
            if value:
                frappe.db.set_value(doctype, doc_data['name'], field_name, value)

        # Cambia la fecha en los doctypes hijos, por ahora soporta cambiar un valor por doctype hijo
        for child_doctype, field in child_dates.items():
            children_docs = frappe.get_all(child_doctype, filters={'parent': doc_data['name']}, fields=['name', field])

            for children_doc in children_docs:
                value = get_new_date(children_doc[field])
                if value:
                    frappe.db.set_value(child_doctype, children_doc['name'], field, value)

        if related_doctype:
            relateds = frappe.get_all(related_doctype, filters={'voucher_no': doc_data['name']}, fields=['name', 'posting_date'])

            for related in relateds:
                value = get_new_date(related['posting_date'])
                if value:
                    frappe.db.set_value(related_doctype, related['name'], 'posting_date', value)


        doc = frappe.get_doc(doctype, doc_data['name'])
            frappe.db.set_value(doctype, doc_data['name'], 'status', doc.status)
        except Exception as e:

def setear_status():
    import frappe

    doctypes = [doctype['name'] for doctype in frappe.get_all('DocType', {'issingle': 0})]

    for doctype in doctypes:
            all_documents = [dt['name'] for dt in frappe.get_all(doctype)]
        except Exception:

        for dn in all_documents:
            doc = frappe.get_doc(doctype, dn)
                frappe.db.set_value(doctype, dn, 'status', doc.status)
            except Exception:


setear_fechas('Stock Entry', dates=['posting_date'], related_doctype='Stock Ledger Entry')
setear_fechas('Material Request', dates=['transaction_date', 'schedule_date'], child_dates={'Material Request Item': 'schedule_date'})
setear_fechas('Stock Reconciliation', dates=['posting_date'])
setear_fechas('Stock Reconciliation', dates=['posting_date'])
setear_fechas('Landed Cost Voucher', dates=['posting_date'], child_dates={'Landed Cost Purchase Receipt': 'posting_date'})
setear_fechas('Delivery Note', dates=['posting_date', 'lr_date'], related_doctype='Stock Ledger Entry')
setear_fechas('Purchase Receipt', dates=['posting_date'], related_doctype='Stock Ledger Entry')
setear_fechas('Delivery Trip', dates=['departure_time'], child_dates={'Delivery Stop': 'estimated_arrival'})
setear_fechas('Batch', dates=['manufacturing_date'])
setear_fechas('Serial No', dates=['warranty_expiry_date','amc_expiry_date'])
setear_fechas('Item', dates=['end_of_life'])

# Accounting
setear_fechas('Sales Invoice', dates=['posting_date', 'due_date','po_date'], child_dates={'Payment Schedule': 'due_date', 'Sales Invoice Payment': 'clearance_date'}, related_doctype='GL Entry')
setear_fechas('Journal Entry', dates=['posting_date','clearance_date','bill_date','bill_date','due_date'])
setear_fechas('Purchase Invoice', dates=['posting_date', 'due_date','bill_date'], child_dates={'Payment Schedule': 'due_date'}, related_doctype='GL Entry')
setear_fechas('Period Closing Voucher', dates=['transaction_date','posting_date'])
setear_fechas('Accounting Period', dates=['start_date','end_date'])

What is the use case of script shared , can we build data and write this type to create various demo example ?

For demos, for internal test, for functionality research, etc.

First, create a bd with good data example, and then, anybody can pull up the original bd, and run the script on it, so that the states, consistency in reports, etc. are always maintained no matter when we pull up a new demo instance.

Thx, What do you mean by BD

I also think that a real demo base data can secure migration process and make unit test easier.
Actually the test are written feature by feature, but do not make them a complete usage of ERP. Check this issue : #26828 it “only” append on Purchase Order make from Material Request coming from Sales Order. I’ve no doubs that it is possible to write a unit test to test it, but it’s never done by Frappe (or the community, and I haven’t knowledge or time to do it), but it is a common use case.
Other private ERP provide a sample database, that allow prospect to try the software before go on it, and it can be a real decision making point.
After that I do the same as @federico_calvo, I make my own demo data base with some relevant datas

1 Like


I can certainly appreciate your sentiment. But your premise is wrong. I am not profiting from the system. And I have never met a single person face to face who is profiting from this In fact I am aware

I identified it as a technology that is very much needed. If it works. My point was that if one is unable to demonstrate that some technology works, it’s almost as if it does not. That is a lot of work to go through, creating an entire system, without any way of demonstrating that it works. There isn’t even a demonstration on youtube, as far as I know.

Right now, all I have is hopes and dreams that this could be what it claims to be. Nothing else.

Thank you for your response, I will review the code you offered. Thank you for that.

Ok, I understand.

If it is a punctual case, and it is not usual that you offer the service, it is true that you do not have many tools. If you are going to do it regularly, you have to internalize much more.

Apologies then for the misunderstanding on my part.

1 Like