تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال

Dear all,

I'm having trouble with migrating odoo 10 code to the new odoo 14 with product attributes because I don't have product.product.attribute anymore on product.product.

Let me explain:

I have about 700.000 products in the database. Now I receive JSON files with additional info about products ( Color, Size, Year, etc ).

So created products (product.product) have each their corresponding product template already created in generation of product.product in script used as in odoo 10. Now I would like to archive or totally delete product.template which is not the right one and append the right one to it. So the only one which has the correct attributes. Does anyone have an example of how is this done?

I figured how to append product.attribute.value to the product, but I don't know how to add all attributes to the template and unlink old product.templates.

Example now:

product.template.id    product.product.id    product.product.default_code     product.attribute.value

1    70213    B20-FT116-E1-0L    Size: L , Color: Blue
2    70214    B20-FT116-E1-1S    Size: XS , Color: Blue
3    70215    B20-FT116-1E-0L    Size: L , Color: Red
4    70216    B20-FT116-1E-1S    Size: XS , Color: Red

Wanted result:

product.template.id    product.product.id    product.product.default_code     product.attribute.value

1    70213    B20-FT116-E1-0L    Size: L , Color: Blue
1    70214    B20-FT116-E1-1S     Size: XS , Color: Blue
3    70215    B20-FT116-1E-0L    Size: L , Color: Red
3    70216    B20-FT116-1E-1S    Size: XS , Color: Red


Kind regards,
Marko








الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 21
4732
1
فبراير 25
1377
2
يناير 24
19955
0
مايو 23
448
0
أبريل 21
3574