تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1164 أدوات العرض

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
يونيو 24
1069
1
يوليو 24
1715
0
يناير 25
1017
1
أبريل 24
1623
1
مارس 24
969