Skip to Content
Menú
This question has been flagged
3705 Vistes

I have a list of products, and each have multiple variants. I look into product.template and product.product models, in which product.product inherits from product.template.

I want to program the script to insert those product:

for product in product list:

     Create a product to product.template

     Add all its variants to product.product

Is it the correct way to do this?

However, why can't we insert product to the template model, but only add extra info to the product model? Is there any document explaining how to do it?

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 24
1548
1
de febr. 22
4401
0
d’ag. 21
2551
1
de març 21
11974
2
de des. 19
15781