Skip to Content
Menu
This question has been flagged
1 Reply
1151 Views

I need to import product prices with variants. Any idea how ?

Note: the variants already exist with their respective prices, so I have no idea if I need to add these prices for variants again in the Excel file to import.

Version: Odoo 17


Avatar
Discard
Best Answer

Hello Hans Coene,

Importing product prices with variants in Odoo 17 can be a bit tricky, especially when the variants and their base prices already exist. You don't need to include the base variant prices again in your import file if they are already set. You only need to import the extra price for each variant.

Here's a breakdown of how to do it, expanding on what you've already started:

Understanding Odoo's Price Structure

Odoo handles variant pricing through "Product Template Attribute Values." The base price is on the product template, and then extra prices are added for each attribute value combination that creates a variant.

The Process

  1. Export Existing Data (Crucial): This is the most important step. You must export the existing product variant data to get the correct External IDs. This is how Odoo will know which variants to update.
    • Go to Inventory -> Products -> Products.
    • Select the products you want to update.
    • Click Action -> Export.
    • Choose I want to export data (CSV or Excel).
    • In the export wizard:
      • Select Product Template Attribute Value as the model. This is the key!
      • Select the following fields (at a minimum):
        • External ID (This is absolutely essential)
        • Product Template ID (You might need this to identify the product if you're working with many)
        • Attribute ID (Helps you understand which attribute this price is for)
        • Attribute Value ID (Identifies the specific attribute value)
        • Price Extra (This is the field you'll be updating)
      • Export the file (CSV or Excel).
  2. Prepare Your Import File:
    • Open the exported file.
    • Crucially: Do not change the External IDs. These must remain exactly as they are in the export.
    • For each variant you want to update the price for, find the corresponding row in the exported file.
    • In the Price Extra column, enter the additional price for that variant. For example, if the base price is $10 and you want the variant to cost $12, enter 2 in the Price Extra column.
    • If you're not changing the price of a variant, you can leave the Price Extra column blank or set it to 0.
  3. Import the Data:
    • Go back to Inventory -> Products -> Products.
    • Click Action -> Import Records.
    • Upload your prepared CSV or Excel file.
    • In the import wizard:
      • Make sure the model is Product Template Attribute Value.
      • Odoo should automatically map the columns based on the headers in your file. Double-check that the External ID and Price Extra fields are correctly mapped.
      • Test the import first to catch any errors.
      • If the test is successful, validate and then import.


 
 


Thanks & Regards,

​

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209

Email: info@candidroot.com

Avatar
Discard
Related Posts Replies Views Activity
2
Aug 24
2784
1
Aug 22
3488
2
Jun 23
2888
1
Feb 23
1816
3
Aug 20
3215