Is there a limit to how many variants a product can have in V13?
4 回答
I think the question is about how many product variants are allowed to be created with one product.
I found the system alerted me when I tried to put a lot of product attribute values (80 for first attribute, 2 for second, and 6 for third = 80x2x6 variants (it's very special product). The system alerted it's too much and it cannot create, then I solved that by remove the 2 of second attribute and the system is Ok.
So, I think it would be good to know the limitation of the system the maximum product variants for each main product because we may need to think about this in some special case.
In odoo 13, the limit is hardcoded to 1000 variants per template.
See addons > product > models > product_template.py (line 608)
if len(current_variants_to_create) > 1000:
raise UserError(_(
'The number of variants to generate is too high. '
'You should either not generate variants for each combination or generate them on demand from the sales order. '
'To do so, open the form view of attributes and change the mode of *Create Variants*.'))
variants_to_create += current_variants_to_create
variants_to_activate += current_variants_to_activate
Hello Vijai,
We cannot limit the number of Variants in Odoo by default.
However, in Odoo 13 there are three options in product attributes that are:
1) Instantly: The variants are created as soon as the attributes and its values are added.
2) Dynamically: The variants are created when its combination is selected in any sale order.
3) Never: The variants are never created.
Hence, to limit the variant I would suggest you to use the attribute types Dynamically or never.
I hope this will help you!
Regards
--
Technical Content Writer (ODOO)
Hi,
You can create the variant of a product according to the attributes that you have given to that product
For example
If you have two attributes such as color and size, color have 3 items(black,white,red) and size have 4 items(2,4,6,8) then the number of variants of this product will be 12.
Regards