500: Internal Server Error

QWeb

Mensaje de Error:

Error to render compiling AST
IndexError: tuple index out of range
Template: website_sale.products_item
Path: /t/form/div[2]/div[2]/t[1]
Node: <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()" t-if="len(product.product_variant_ids) == 1"/>
            

Error ocurrido durante el dibujado de la plantilla website_sale.products_item y evaluando la siguiente expresión: <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()" t-if="len(product.product_variant_ids) == 1"/>

Traza

Traceback (most recent call last):
  File "/opt/odoo13/13.0/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo13/13.0/odoo/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo13/13.0/odoo/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: ('product.template', <function ProductTemplate._get_first_possible_variant_id at 0x7f32f3f53510>, 1495)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_products_item_6462
  File "<decorator-gen-150>", line 2, in _get_first_possible_variant_id
  File "/opt/odoo13/13.0/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1002, in _get_first_possible_variant_id
    return self._create_first_product_variant().id
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 977, in _create_first_product_variant
    return self._create_product_variant(self._get_first_possible_combination(), log_warning)
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1015, in _get_first_possible_combination
    return next(self._get_possible_combinations(parent_combination, necessary_values), self.env['product.template.attribute.value'])
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1141, in _get_possible_combinations
    for partial_combination in self._cartesian_product(product_template_attribute_values_per_line, parent_combination):
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1063, in _cartesian_product
    current_ptav = current_line_values[current_ptav_index]
  File "/opt/odoo13/13.0/odoo/odoo/models.py", line 5770, in __getitem__
    return self.browse((self._ids[key],))
IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/ir_http.py", line 234, in _dispatch
    result = request.dispatch()
  File "/opt/odoo13/13.0/odoo/odoo/http.py", line 809, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo13/13.0/odoo/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo13/13.0/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo13/13.0/odoo/odoo/http.py", line 342, in checked_call
    result.flatten()
  File "/opt/odoo13/13.0/odoo/odoo/http.py", line 1259, in flatten
    self.response.append(self.render())
  File "/opt/odoo13/13.0/odoo/odoo/http.py", line 1252, in render
    return env["ir.ui.view"].render_template(self.template, self.qcontext)
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/ir_ui_view.py", line 1201, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/opt/odoo13/13.0/odoo/addons/website/models/ir_ui_view.py", line 347, in render
    return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo13/13.0/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
    return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/ir_ui_view.py", line 1209, in render
    return self.env[engine].render(self.id, qcontext)
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/ir_qweb.py", line 58, in render
    result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/qweb.py", line 261, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/qweb.py", line 336, in _compiled_fn
    raise e
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_products_6442
  File "<template>", line 2, in body_call_content_6440
  File "<template>", line 133, in foreach_6436
  File "<template>", line 134, in foreach_6435
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/qweb.py", line 341, in _compiled_fn
    raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: tuple index out of range
Traceback (most recent call last):
  File "/opt/odoo13/13.0/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo13/13.0/odoo/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo13/13.0/odoo/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: ('product.template', <function ProductTemplate._get_first_possible_variant_id at 0x7f32f3f53510>, 1495)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo13/13.0/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_products_item_6462
  File "<decorator-gen-150>", line 2, in _get_first_possible_variant_id
  File "/opt/odoo13/13.0/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1002, in _get_first_possible_variant_id
    return self._create_first_product_variant().id
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 977, in _create_first_product_variant
    return self._create_product_variant(self._get_first_possible_combination(), log_warning)
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1015, in _get_first_possible_combination
    return next(self._get_possible_combinations(parent_combination, necessary_values), self.env['product.template.attribute.value'])
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1141, in _get_possible_combinations
    for partial_combination in self._cartesian_product(product_template_attribute_values_per_line, parent_combination):
  File "/opt/odoo13/13.0/odoo/addons/product/models/product_template.py", line 1063, in _cartesian_product
    current_ptav = current_line_values[current_ptav_index]
  File "/opt/odoo13/13.0/odoo/odoo/models.py", line 5770, in __getitem__
    return self.browse((self._ids[key],))
IndexError: tuple index out of range

Error to render compiling AST
IndexError: tuple index out of range
Template: website_sale.products_item
Path: /t/form/div[2]/div[2]/t[1]
Node: <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()" t-if="len(product.product_variant_ids) == 1"/>