Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
To pytanie zostało zamknięte z powodu: zduplikuj post
przez Constanze Becker na 06.06.2024 08:41:52

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 the variant:

 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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
cze 24
1149
1
lip 24
1701
0
sty 25
1015
1
kwi 24
1618
1
mar 24
962