Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3243 Näkymät

I believe this is a bug because it used to work fine on v16. but maybe im doing something wrong

My specific situation is, uploading a file into the product import form I have a few items which contain new attribute values. the attribute and values fields I am trying to use here are  ' Product Attributes / Attribute' and 'Product Attributes / Values'

I click test, and as expected a red box appears allowing me to choose what should happen when a value cannot be matched. I select "Create new values"

then upon import, I receive the same blocking error, even though create new values is already selected. in order to move forward I have to go add the attribute values into the color attribute.

Am I using the wrong field(s) for this functionality? 

Avatar
Hylkää
Tekijä

Ive since discovered more information about this issue, here's a full report:

Environment:

Odoo version: 17
Clean Install no added modules

Steps to Reproduce:

-Prepare a CSV file for product import with columns for "product attributes / attribute" and "product attributes / values".
-Go to the product import interface in Odoo.
-Upload the CSV file and map the columns appropriately.
-Set the system to create non-existent attributes during the import. said attributes should be instant variant creating attributes
-Initiate the import process.

Expected Result:

-The system should create non-existent attributes and values specified in the CSV.
-Product variants should be automatically created based on the attributes.

Actual Result:

The import process fails with an error due to non-existent attribute values.
After manually creating attributes, the products are created but variants are not automatically generated.
In the product form, the 'Configure' option next to attribute lists shows an empty table despite having several attribute values listed.

Workaround:

Deleting the products and re-uploading the CSV with the attribute values field renamed to "attribute_line_ids/value_ids" (still mapped to the same field "Product Attributes / Values") surprisingly works and imports correctly.

There seems to be an inconsistency in how the system handles the mapping of attribute fields during the import process.

I'm trying to do the same, except for creating new variants of a product, and getting the same blocking error even though I've selected "Create new values".

Having to manually create all the variants is very time intensive and is not really feasable for companies that have a lot of products, when you can easily create new products on import if you don't use variants.

Paras vastaus

Hi,


You are experiencing a limitation in Odoo’s product import when dealing with product attributes and values. While the fields Product Attributes / Attribute and Product Attributes / Values are correct, and selecting “Create new values” during the test step should allow Odoo to create missing values, the import fails if the attribute itself does not already exist in the database. This differs from older versions like v16, where the system was sometimes more lenient. Essentially, Odoo expects the attribute record to exist first, and the auto-creation option only works for values under that attribute.


To work around this limitation, it is recommended to pre-create all necessary attributes before importing the values. Another approach is to split the import into two steps: first import the attributes, then import the products with their values. Additionally, ensure there are no typos or invisible characters in the attribute names or values, as these can prevent auto-creation. The behavior you are seeing is a known limitation in newer Odoo versions, not an error in your workflow.


Reference:-


- https://www.cybrosys.com/blog/how-to-import-product-attributes-and-product-variants-in-odoo-17


- https://www.odoo.com/documentation/19.0/applications/sales/sales/products_prices/products/import.html


Hope it helps

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
4
heinäk. 25
2523
2
kesäk. 25
3403
6
jouluk. 24
4758
4
lokak. 25
2558
2
syysk. 25
1699