Importing data in Odoo 16 is crucial for businesses to improve efficiency and streamline processes. It allows for quick and accurate transfer of large amounts of information, saving time and resources. Importing data is especially valuable during system migrations and data integration from multiple sources. Because of its popularity as an ERP, Odoo makes it simple to export and import data. Any data can be exported from Odoo in the form of an Excel or CSV file. It can be product details, partner details, sale orders, transfers, stock, etc.
This blog covers how the product and the product categories can be imported into Odoo 16.
Importing products
In order to import any data to odoo it should require a template to import data. So the first step is to create a template and fill the template with the necessary information. Later it can import to Odoo.
Firstly, we need to understand data exporting from Odoo before we can move on to importing. Exporting a sample dataset from the model will provide you with a template with the necessary data fields.
Note: If you are at the initial stage of Odoo Implementation and have no product details at all in your database, Odoo will provide you an option to download a template.
Let’s see how!!!!!
Go to product form, under favorites > Import records, there you can see an option to download the “Import Template for Products”.
On downloading, you will get an XLSX template containing different fields to import with some demo data.
This template contains some basic information columns including External ID, Name, Product Type, Internal Reference, Barcode, Sales Price, Cost, Weight, and Sales Description. You can fill up the product details in the sheet and import. In this case, that is if you are importing a product first time there is no need to import the External ID.
Consider another scenario where you want to import details with more data information like product category, Unit of Measure, Purchase Unit of measure, Invoicing Policies etc. So while exporting data these fields need to be exported to the template.
To do this, go to the products first, switch the Kanban view to the list view, then choose the products you want to export.
Then select Actions->Export.
A pop-up window with many options for the data to export displays when you click on Export.
The system only displays the fields that can be import-compatible export when the “I want to update data” checkbox is selected. Means the exported field are understandable for odoo while importing the data. On importing fields are compatible to import and no need to map the fields with the fields mentione din the data sheet.
There are two formats available for exporting: .csv and .xls. While .xls files contain information about all worksheets in a file, including both text and formatting, .csv files divide items with commas.
There will be two columns, Available fields and fields to export. You can discover particular fields more quickly by using the search bar form the ‘Available fields’ and the + button is there to add fields to the “Field to export” list.
You can reorder the fields that must be presented in the exported file by dragging the “handles” next to the chosen fields up or down.
If you need to get rid of any fields, there is a delete icon nearby.
Once you add all the required fields from ‘available fields’ to ‘fields to import’, it can be possible to keep or save export presets for recurring reports. Click on the drop-down arrow at the end of the search bar and then click on the New template there, then give it a name. The next time you need to export the same list, just select the appropriate template.
Click ‘EXPORT’ when it is ready to be exported.
Open the Excel sheet or CSV file and, if wanted, add new fields or modify any that are already there. This sheet can be imported to Odoo.
The first column of the sheet defines the external id of the product. External id is used for uniquely identifying the product.
Columns can be added, deleted, and sorted. It is advised to maintain the id if you are updating the existing data without creating duplicate entries.
I’m modifying the name of the product here as an illustration. It converts a bacon burger to a veg burger. We can similarly alter other fields.
Once the adjustments were made and saved. Navigate to “import” in the “favorites” section and import the file we saved.
simply click the upload file.
Choose and open the file you want to import. Then click on the TEST button to test whether the data are correct and compatible. If any data that are not compatible with the particular field, it will show errors in red color and if the all data are good enough to import, it displays “Everthing seem valid” and thus you can import. Otherwise, you need to update the sheet with correct data and then import.
Here when tested, the error details appears.
If the label of a new column you add doesn’t match a field in Odoo, Odoo might not be able to map it automatically. During import When you test the import, new columns can be manually mapped. Find the relevant field by searching the list. There is a chance that we get errors if we don’t map properly.
The red fields can only be altered or removed.
While testing the errors, for values that cannot be matched, there exists options to manage:
1. Prevent import: to prevent the import of the whole column, so one can remove that particular column from the sheet
2. Set value as empty: this will set the values as empty and import the data
3. Skip record: skip the record that cannot be matched and import the data
4. create new value: This will create a new value for the respective record.
We can click the “Import” button if everything is correct and valid.
The process of importing product data is now complete.
Now, if we conduct a product search using the term “Bacon burger.” Products won’t be displayed. It is because we changed the name field earlier to make the product available as a “veg burger.”
Search for “veg burger”.
The data has been updated.
So this is all about importing product data in Odoo 16.
Importing Product Categories
We can similarly import product categories. Go to the Product categories first. Then choose the categories that we wanted to export from the list view, and export it.
Click the export button after selecting the fields we wish to export. The “I want to update data” option should be unchecked if you want to create a new entry.
Make the necessary adjustments to the Excel or CSV file.
After that, we can update the template and import it. The best method to make a template is to Combine a few of your previously created entries.
Here, I’ve changed the display name to ‘All/Food’.
Go to the “favorites” of product categories after saving the modifications. simply select “import the records”. Test the records and, if necessary, make the necessary corrections. It is to verify the Odoo configuration using the file that you submitted. The Cancel icon makes sure that the user’s imported data is deleted.
We will see an advanced tab on the left side. There are two choices underneath it. “Track history during import” and “Allow matching with subfields.”
When the check box “Use first row as header” is enabled, this will consider first row of the sheet as header.
Here, along with other categories, the new entry “All/Food” is added.
Suppose we are importing data, a sheet is shown below when the category ‘Office Appliances is not added as a parent category, but we are trying to import another category ‘Lamps’ under the ‘Office Appliances’.
In this case while testing the data, it will show as an error “No matching record found”. So while importing we can mention to create new value for the respective category by adding option “Create new values” when no value matched.
This will creat a category Office Appliances as parent category and put the category ‘Lamps’ under the office appliances category.
Here we discussed how data are importing. Users can seamlessly import large data to Odoo 16. For single import maximum 2000 entries can imported. Most of the business might have thousands of data. If the sheet consists more than 2000 entries Odoo will split it in to multiple sheets and are the import one by one.
With Odoo 16, we can import data into several files. Product transfers usually occur in bulk. For that, we have to frequently import data from other ERPs also. To speed up these processes and update data like the product name, price, and other specifics in Odoo, we use CSV or Excel files. Data import with Odoo 16 is incredibly simple and saves time and effort.