Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3792 Weergaven

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 24
1668
1
feb. 22
4542
0
aug. 21
2677
1
mrt. 21
12138
2
dec. 19
15961