Skip to content
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

Open
wants to merge 1 commit into
base: 10.0
Choose a base branch
from

Conversation

bizzappdev
Copy link
Contributor

Impacted versions: 10.0

Steps to reproduce:
1) create configurable product-template
2) add variants
3) add restriction and keep domain-lines(RULES) blank
4) 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

… range, while configuring product having restriction with empty domain lines
@codecov-io
Copy link

codecov-io commented Apr 26, 2019

Codecov Report

Merging #164 into 10.0 will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             10.0    #164      +/-   ##
=========================================
+ Coverage   62.17%   62.2%   +0.02%     
=========================================
  Files          14      14              
  Lines        1351    1352       +1     
=========================================
+ Hits          840     841       +1     
  Misses        511     511
Impacted Files Coverage Δ
product_configurator/models/product_config.py 76.43% <100%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5aa66f...cc86776. Read the comment docs.

@bizzappdev
Copy link
Contributor Author

@PCatinean can you please check.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants