IMP sale_line_reconfigure Get _get_first_possible_combination faster by ordering by 'is_default'

This improves the performance greatly in ecommerce if you have MANY combinations and an exclusion on a high up attribute (as it will 'fail' potentially millions of combinations before coming to something that 'is_default' would have given you already).
This commit is contained in:
Jared Kipe
2019-10-28 09:38:46 -07:00
parent f1153815b4
commit d0e4def77a
3 changed files with 55 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ class ProductConfiguratorController(product_configurator.ProductConfiguratorCont
'sale_line': sale_line,
# get_attribute_exclusions deprecated, use product method
'get_attribute_exclusions': self._get_attribute_exclusions,
# get_attribute_value_defaults deprecated due to ecommerce templates
'get_attribute_value_defaults': self._get_attribute_value_defaults,
})