Skip to Content
Menu
This question has been flagged

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








Avatar
Discard
Related Posts Replies Views Activity
1
Aug 21
3164
2
Jan 24
15982
0
May 23
448
0
Apr 21
2466
2
Dec 19
2879