Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to bulk import / remove (dynamic) variants?

Avatar
odoo
4 Comments
Avatar
Discard
Avatar
odoo
-

Thank you for the reply Alouna. There is no way to easily add attributes to products dynamically besides Products > Attributes & Variants > Add attributes? We have a lot of products that need dynamic variants and it would be helpful to add them in batch on a spreadsheet.

Avatar
odoo
-

Hi
do you mean by word "dynamically" -> create product with variant by importing them and create only one product template -> then when creating purchase / sale order it will create product variant?
OR you mean "dynamically" -> create product with variant by importing them and create only multiple variant for one /multiple product template ?

Avatar
odoo
-

Exactely this one:
"do you mean by word "dynamically" -> create product with variant by importing them and create only one product template -> then when creating purchase / sale order it will create product variant?"

Avatar
odoo
-

I edited my ansewr you could check it!

2 Answers
0
Avatar
odoo
Best Answer

I did use the suggested method dozens of times the last days with no succes. To be sure I did test again with the values you suggest, but also with these fields I get the same error.




The attributes I created previous to trying the import:


The attributes of Product1 were added manually in Odoo itself, the attributes of Product2 are only on the import file.


/EDIT 

With the help of Alouna I found out a way to import.

First export using the next values:


Next I removed the rows that already had the correct attributes, copied the values of attribute_line_ids/attribute_id_id and attribute_line_ids/attribute_id/name into the row that needed the attributes, and added the attributes to attribute_line_ids/value_ids

Notice the change of notation in attribute_line_ids/value_ids between export and import!


/EDIT2

When you want to remove certain attributes from a product, on the relevant row clear the cell in columns attribute_line_ids/value_ids, attribute_line_ids/attribute_id/id and attribute_line_ids/attribute_id/name.


/EDIT3 

When multiple attributes have corresponding values (for example 3 attributes have the value 2m), the column attribute_line_ids/value_ids should be replaced by column attribute_line_ids/value_ids/id. This way the values are identified with their unique ID instead of a name.


2 Comments
Avatar
Discard
Avatar
odoo
-

some tips to fix the issue:
1. try to add Product / ID value for first "Product1".
2. try to import without Product / ID column.
3. if it does not work try to except column by column while testing import in order to check which column causes the problem.

Avatar
odoo
-

if Product1 attributes is already on the system, why do you want to update it? it will double values ! ->it will add (1m,2m,3m..... even if they already there!

0
Avatar
odoo
Best Answer

Hello,


Product with dynamic creation variant will only created after purchasing/ selling that specific variant.

Edited:

you can import bulk of product with variants by simply separate Attribute values with comma 
Note: before starting to import -> create attributes with values or import them too.

use these excel template -> you can add more fields




hope this will help.

Avatar
Discard