Try ERPNext Buy Support Partners Foundation

Data Import template changed?

Hi,

We’ve developed an app on the following version of ERPNext:
ERPNext: v12.7.1 (version-12)
Frappe Framework: v12.5.1 (version-12)

We’ve exported the Stock->Item and Stock->Item Price data as .csv files to be imported on a new install. When trying to upload it to the latest version-12 branch installation, we get errors in the template.

We tried downloading the new template file for Item and Item Price (all fields) and it looks markedly different than the one we exported from v12.7.1.

Is there a migration tool or a writeup of what needs to be done to migrate from the old template to the new one?

Thanks in advance.

As the underlying tables change, the template has to be adjusted to match. If you export to CSV and use a utility that allows you to see the DIFFS (eg. VScode and many other similar tools), you might be able to adjust it to match/work.
Best is to export with records, and then test and compare previous data

Thanks for your response @trentmu. The underlying tables haven’t changed for us. We’re just trying to import the data into a newer version of erpnext.

Are you saying that the underlying tables have changed in erpnext core between 12.7 and 12.10?

What would be a better way to export and reimport this data? Use fixtures?

For posterity, if anybody tries this in the future:

  1. The data formats changed slightly sometime between 12.7 and 12.10. The best way to see the difference is to download just the templates for Stock->Item from Data Import -> Item, Insert new -> Save -> Download template.
  2. Do not use the template from Data Export, it has several rows and a populated first column that cause import errors.
  3. Column headers have moved around and there are a few new headers too
  4. You will need to do some spreadsheet trickery (filters, pivot tables, transpose, etc.) to make sense of your data
  5. Be careful about Item variants because they look like incomplete rows in the exported csv.
  6. If you keep the ID field empty, a new import will fill those in automatically

How do you import a document that has multiple item rows? I am having this challenge with importing sales invoices using the new data import tool as it says certain data which ought to be tied to the parent document is compulsory for every row. Entering those data creates multiple records for same customer instead of single document with multiple item rows.

Can you elaborate what you mean by multiple item rows with an example?

I’m not exactly sure! But usally in other software this is what you do.

Example:

| field items        |
|"item1,item2,item3" |