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:
- 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
Data Import -> Item, Insert new -> Save -> Download template.
- Do not use the template from
Data Export, it has several rows and a populated first column that cause import errors.
- Column headers have moved around and there are a few new headers too
- You will need to do some spreadsheet trickery (filters, pivot tables, transpose, etc.) to make sense of your data
- Be careful about Item variants because they look like incomplete rows in the exported csv.
- 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.
| field items |