コンテンツへスキップ
メニュー
この質問にフラグが付けられました
質問は終了しました 理由: 投稿が重複しています
次により: Constanze Becker on 2024年06月06日 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.

アバター
破棄
関連投稿 返信 ビュー 活動
0
6月 24
1193
1
7月 24
1734
0
1月 25
1026
1
4月 24
1646
1
3月 24
978