Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet

Hello I have a product, with 5000+ variants, so I used create variant dynamicly.
I use a survey and with the answers I create the variant. 
My code is in an automation action.

This is my code to create:

used_variant = env['product.product'].create({
            'product_tmpl_id'used_variant.id,'product_uom_qty': 1,'price_unit': used_variant.lst_price,
})

I've got this error:

Der Vorgang kann nicht ausgeführt werden: duplicate key value violates unique constraint "product_product_combination_unique" DETAIL: Key (product_tmpl_id, combination_indices)=(2208, ) already exists.

Can anyone help me please. Thank you.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Juni 24
1131
1
Juli 24
1775
0
Jan. 25
1051
1
Apr. 24
1671
1
März 24
1024