Files
odoo_source/addons/product/models
Ivan Yelizariev 2da2f5d5dc [FIX] product: speed up _get_possible_combinations
Excluding non-active records decreases number of combinations generated in
_cartesian_product. The excluded combinations have to be rejected anyway [1], so
don't waste time on it.

STEPS:
* activate "Product Configurator"
* create a product with many attributes
* make some `product.template.attribute.value` inactive (ptav_active = False):

  ** create a sale order with that value (e.g. color "Black" in "Customizable Desk (CONFIG)")
  ** delete that value in `product.template` form (tab "Variants")

* add the product to a sale order
* RESULT: `_cartesian_product` doesn't generates combination with archived attribute

[1]

https://github.com/odoo/odoo/blob/f9d26509a714ecd290c42e1d58e416bb01268447/addons/product/models/product_template.py#L839-L841

---

opw-2540675

closes odoo/odoo#74310

X-original-commit: ce487c920c777735e5e7e46ee131cb18dfc5c9fc
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-07-27 11:05:17 +00:00
..