In Odoo 17, properties or traits that can be applied to items are referred to as attributes. These characteristics can be used to set things apart from one another according to several different standards, including material, size, color, etc. Importing product attributes into Odoo makes it easier to manage, organize, and customize your product catalog. With product variant importing, different variants of products are imported to the Odoo 17 database accurately and efficiently. This enhances both your consumer’s shopping experiences and your company's operational efficiency.
In this blog, we are discussing importing product attributes and product variants in Odoo 17.
Importing product attribute in Odoo 17
For importing a product variant, the first step is to import product attributes. For importing product attributes, we want to create a template. So to create the product attribute template, go to the Configuration menu of the Sales module, and there we can find an Attribute submenu.
Click on the Attribute submenu, and there we can find all the attributes that are already created in Odoo. Select one of the attributes and click the Action button. and when we click the action button, there is an option to Export, which is used to export the selected data.
Then click on the Export button and reach a new popup window that has two sections, ‘Available fields’ and ‘Fields to export’.
*Available fields: these describe the different data fields that you can add to your exporting file to give details about the goods you are importing.
*Fields to export: these are the specific data fields that we want to include in the exporting file.
Thus, add all the required fields from the available fields to the export fields section and either save them in XLSX format or CSV format, which Odoo 17 supports both formats. The fields required to export and import product attributes in Odoo 17 are,
*Attribute: This refers to the attribute that we are creating
*Display Type: This refers to the visual representation of the attribute that we are creating
*Variant creation mode: Specifies how product variants should be created based on the attribute values provided in the import data.
*Values/value: Refers to the specific options or variations associated with each attribute.
There is an option that “I want to update data (import-compatible export)” in the popup window. When we enable that option, the exported sheet is filled with an external ID as well. And, we can update the existing data with the help of the external ID without creating duplicates. Also, When we try to import the data Odoo 17 the headings correctly map each field with the Odoo.
Then, after adding all of the fields to the ‘Fields to export’ section correctly, click on the Export button on the same popup window. Then, the data exporting process was done successfully, and that data was saved to our system, whether in XLSX format or CSV format. The saved file is shown below.
Then, we can make changes to the saved template. Add new attributes by giving the name to the new attribute in the Name column and the values of the attribute in the Value_id/name column. In Odoo 17, we can add multiple data at a time so that we can create one or more attributes at a time
Here we are creating new attributes, ‘Table top material’ with three different attribute values. Then again click the Attribute under the Configuration menu and choose the Action button in that window and there we can see an option to Import records. Click on the Import record option.
After that, click the Upload file button, then choose a sheet from our system that contains the details of newly created attributes and get a window for importing the file. There, click on the Test button, and if all the details that we provided are correct an “Everything seems valid” message will be sent by Odoo, after clicking on the Import button near the Test button.
So when we click the Import button, a new attribute has been created, and the data will be saved to the Odoo 17 database successfully. The imported records are shown in the screenshot below.
Now to open the newly created attribute, click on the newly imported attribute. When we open the attribute, all the attribute values for the attribute ‘Table top material’, its display type, variant creation mode, etc. can be found there.
So, we have completed the attribute importing process. Then we can import product variants using this product attribute.
Importing product variants in Odoo 17
Any particular configuration or variation of a product that is referred to as a product variant. Variants of a product are made using several sets of attribute values.
Importing product variants into Odoo 17 improves catalog management efficiency, precision, and consistency, all of which lead to more seamless operations and happier customers. For importing a product variant in the sales module of Odoo 17, under the product tab, there is a product variant sub-tab. Click that Product variant, and there we can see all the products with their variants.
Select one of the products from that list and click the Action button. When we clicked the action button, there was an option to export. Select the Export option found there.
When we clicked the Export option, a new popup window appeared, which had two sections, ‘Available fields’ and the ‘Fields to export’.
*Available fields: these describe the different data fields that you can add to your exporting file to give details about the goods you are importing.
*Fields to export: which is the specific data fields that we want to include in the exporting file
Thus add all the required fields from available fields to the export fields section and either save in XLSX format or CSV format in which Odoo 17 supports both of the formats. The fields required to export and import product variants in Odoo 17 are,
*Name: Refers to the name of the product for which we are creating the attribute.
*Can be sold: This is used to describe a boolean field that specifies whether or not a product variant is sold.
*Can be purchased: This is used to describe a boolean field that specifies whether or not a product variant is sold.
*Sales price: This refers to the price of the product when it is selling.
*Cost: This refers to the price when it is purchased.
*Product type: This is the classification or categorization of products based on their characteristics such as storable, consumable, etc.
*Product category: This is a way of organizing and classifying products based on common characteristics and features.
*Units of measure: The units provided for the product for which we are creating the variant.
*Purchase UOM: This is the default unit of measure used as the units of measure for purchase.
*Product attribute/attribute: This is the name of the attribute for which we are creating the attribute values.
*Product attribute/values: This refers to the attribute and its corresponding values that define the characteristics of the product variant.
*Variant values: Refers to a particular feature of a product. To appropriately reflect each product's properties when importing them into Odoo, we must define these variant values for each product variant.
After adding all of the required fields to the “Fields to export” section, click the Export button in the same popup window. If we want to use all these added fields again for exporting and importing purposes, make a new template with these fields and save them. Then click the Export button, and the exported data will be saved to our system successfully as an XLSX sheet.
Make edits in the sheet and add the required attributes and attribute values to the sheet that we want to import.
Again, go to the product variants list, click the Action button, and then click on the Import record option. Then click the Upload file button and choose the file that we have exported. After the file has been selected we reach a new window. From that window, we can test the file that we uploaded. Click the Test button, and if all the fields and terms are correctly assigned an “Everything seems valid” message will be provided by Odoo. When that message has come, we will be able to import this file to the Odoo 17 database. For that, click on the Import button near the Test button, and the data is successfully imported to the Odoo 17 database
Add a caption to enhance the meaning of this image. Then, after this process, choose Products under the Products menu in the sales app and choose the newly imported products that have new variants. Go to the form view of the product and there we can see the variant that we created is added to the product details successfully under the “Attributes and variants” tab.
Here in the above screenshot, we can see that for the product “conference table” we have imported variants and are able to use these while selling and purchasing these products. In the below screenshot, all three different variant values of the product that we imported are shown in different lines.
So the Odoo 17 product variant and product attribute importing feature help to import a lot of product variants and product attributes to Odoo 17 accurately and efficiently. Here in this blog, we have imported product attributes and product variants in Odoo 17 successfully. which will increase the accuracy and efficiency of the newly added data. To read more refer to How to Manage the Product Variants Using the Odoo 17 Sales App