This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
[FIX]product_configurator : fix issue- IndexError: tuple index out of range. #164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Impacted versions: 10.0
Steps to reproduce:
1) create configurable product-template
2) add variants
3) add restriction and keep domain-lines(
RULES
) blank4) go to sale > create sale order > and try to configure product created above
Current behaviour: it will raise an error with traceback
File "/home/shruti/odoo/v10/odoo_product_configurator/git_hub/odoo-product-configurator/product_configurator_wizard/wizard/product_configurator.py", line 735, in action_next_step
self.value_ids.ids, active_cfg_line_id)
File "/home/shruti/odoo/v10/odoo_product_configurator/git_hub/odoo-product-configurator/product_configurator/models/product.py", line 90, in get_adjacent_steps
open_step_lines = self.get_open_step_lines(value_ids)
File "/home/shruti/odoo/v10/odoo_product_configurator/git_hub/odoo-product-configurator/product_configurator/models/product.py", line 68, in get_open_step_lines
value_ids)
File "/home/shruti/odoo/v10/odoo_product_configurator/git_hub/odoo-product-configurator/product_configurator/models/product.py", line 433, in values_available
domains = config_lines.mapped('domain_id').compute_domain()
File "/home/shruti/odoo/v10/odoo_product_configurator/git_hub/odoo-product-configurator/product_configurator/models/product_config.py", line 47, in compute_domain
(lines[-1:].attribute_id.id,
File "/home/shruti/odoo/v10/odoo/odoo/models.py", line 5251, in getitem
return self._browse((self._ids[key],), self.env)
IndexError: tuple index out of range
Expected behaviour: No traceback should be there