Skip to Content
Menu
This question has been flagged
The question has been closed priežastis: duplicate post
by Constanze Becker nuo 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.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
birž. 24
1250
1
liep. 24
1819
0
saus. 25
1146
1
bal. 24
1754
1
kov. 24
1117