500: Internal Server Error
QWeb
Mensaje de error:
Error to render compiling AST TypeError: 'NoneType' object is not callable Template: website_sale.product Path: /t/t/div/section Node: <section t-attf-class="container mt8 oe_website_sale #{(compute_currency(product.lst_price) - product.website_price) > 0.01 and website.get_current_pricelist().discount_policy == 'without_discount' and 'discount'}" id="product_detail"> <div class="row"> <div class="col-md-4"> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a t-att-href="keep(category=0)">Productos</a> </li> <li t-if="category" class="breadcrumb-item"> <a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name"/> </li> <li class="active breadcrumb-item"> <span t-field="product.name"/> </li> </ol> </div> <div class="col-md-3 mb8"> <t t-call="website_sale.search"/> </div> <div id="website_published_button" class="col-md-3"> </div> <div class="col-md-2 text-right"> <t t-call="website_sale.pricelist_list"/> </div> </div> <div class="row"> <div class="col-md-7"> <span itemprop="image" t-attf-content="{{request.httprequest.url_root}}web/image/product.template/{{product.id}}/image" t-field="product.image" t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name', 'zoom': 'image'}" groups="!website_sale.group_website_multi_image"/> <t groups="website_sale.group_website_multi_image"> <t t-set="variant_img" t-value="any(product.mapped('product_variant_ids.image_variant'))"/> <t t-set="image_ids" t-value="product.product_image_ids"/> <div id="o-carousel-product" class="s_banner s_carousel_default slide carousel oe_custom_bg s_carousel" data-ride="carousel" data-interval="0" style="min-height:400px"> <div class="carousel-outer"> <div class="carousel-inner"> <div t-if="variant_img" class="active carousel-item" itemprop="image" t-field="product[:1].product_variant_id.image" t-options="{'widget': 'image', 'class': 'product_detail_img js_variant_img', 'alt-field': 'name', 'zoom': 'image', 'unique': product['__last_update'] + (product.product_variant_id['__last_update'] or '')}"/> <div t-attf-class="item#{'' if variant_img else ' active'}" itemprop="image" t-field="product.image" t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name', 'zoom': 'image', 'unique': product['__last_update']}"/> <t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg"> <div class="carousel-item" t-field="pimg.image" t-options="{"widget": "image", "class": "product_detail_img", "alt-field": "name", "zoom": "image" }"/> </t> </div> <t t-if="len(image_ids) or variant_img"> <a class="carousel-control-prev" href="#o-carousel-product" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"/> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#o-carousel-product" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"/> <span class="sr-only">Next</span> </a> </t> </div> <ol class="carousel-indicators" t-if="len(image_ids) or variant_img"> <li t-if="variant_img" data-target="#o-carousel-product" data-slide-to="0" class="active"> <img class="img-fluid img js_variant_img_small d-block" t-attf-src="/website/image/product.product/{{product.product_variant_id.id}}/image/90x90" t-att-alt="product.name"/> </li> <li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else '0'" t-att-class="'' if variant_img else 'active'"> <img class="img-fluid img d-block" t-attf-src="/website/image/product.template/{{product.id}}/image/90x90" t-att-alt="product.name"/> </li> <t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg"> <li data-target="#o-carousel-product" t-att-data-slide-to="pimg_index + (variant_img and 2 or 1)"> <img class="img-fluid img d-block" t-attf-src="/website/image/product.image/{{pimg.id}}/image/90x90" t-att-alt="pimg.name"/> </li> </t> </ol> </div> </t> </div> <div class="col-md-5 offset-xl-1 col-xl-4" id="product_details"> <h1 itemprop="name" t-field="product.name">Nombre del producto</h1> <span itemprop="url" style="display:none;" t-esc="'%sshop/product/%s' % (request.httprequest.url_root, slug(product))"/> <form action="/shop/cart/update" class="js_add_cart_variants" method="POST"> <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> <div class="js_product" t-if="product.product_variant_ids"> <t t-placeholder="select"> <input type="hidden" class="product_id" name="product_id" t-att-value="product.product_variant_id.id if len(product.product_variant_ids) == 1 else '0'"/> <t t-call="website_sale.variants"> <t t-set="ul_class" t-value="'nav-stacked'"/> </t> </t> <t t-call="website_sale.product_price"/> <p t-if="len(product.product_variant_ids) > 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Esta combinación no existe.</p> <div class="css_quantity input-group" contenteditable="false"> <div class="input-group-prepend"> <a t-attf-href="#" class="btn btn-secondary js_add_cart_json" aria-label="Quitar uno" title="Quitar uno"> <i class="fa fa-minus"/> </a> </div> <input type="text" class="form-control quantity" data-min="1" name="add_qty" t-att-value="add_qty or 1"/> <div class="input-group-append"> <a t-attf-href="#" class="btn btn-secondary float_left js_add_cart_json" aria-label="Agregue uno" title="Agregue uno"> <i class="fa fa-plus"/> </a> </div> </div> <a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a> <div class="availability_messages o_not_editable"/> </div> </form> <hr t-if="product.description_sale"/> <div class="o_not_editable"> <p t-field="product.description_sale" class="text-muted"/> </div> <hr/> <p class="text-muted"/> <p class="text-muted"> <a href="/shop/terms">Términos y condiciones</a><br/> Garantía de devolución de 30 días<br/> Envío: 2-3 días laborales </p> </div> </div> </section>
Error ocurrido durante la creación de la plantilla website_sale.product
y evalua la siguiente expresión: <section t-attf-class="container mt8 oe_website_sale #{(compute_currency(product.lst_price) - product.website_price) > 0.01 and website.get_current_pricelist().discount_policy == 'without_discount' and 'discount'}" id="product_detail">
<div class="row">
<div class="col-md-4">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a t-att-href="keep(category=0)">Productos</a>
</li>
<li t-if="category" class="breadcrumb-item">
<a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name"/>
</li>
<li class="active breadcrumb-item">
<span t-field="product.name"/>
</li>
</ol>
</div>
<div class="col-md-3 mb8">
<t t-call="website_sale.search"/>
</div>
<div id="website_published_button" class="col-md-3">
</div>
<div class="col-md-2 text-right">
<t t-call="website_sale.pricelist_list"/>
</div>
</div>
<div class="row">
<div class="col-md-7">
<span itemprop="image" t-attf-content="{{request.httprequest.url_root}}web/image/product.template/{{product.id}}/image" t-field="product.image" t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name', 'zoom': 'image'}" groups="!website_sale.group_website_multi_image"/>
<t groups="website_sale.group_website_multi_image">
<t t-set="variant_img" t-value="any(product.mapped('product_variant_ids.image_variant'))"/>
<t t-set="image_ids" t-value="product.product_image_ids"/>
<div id="o-carousel-product" class="s_banner s_carousel_default slide carousel oe_custom_bg s_carousel" data-ride="carousel" data-interval="0" style="min-height:400px">
<div class="carousel-outer">
<div class="carousel-inner">
<div t-if="variant_img" class="active carousel-item" itemprop="image" t-field="product[:1].product_variant_id.image" t-options="{'widget': 'image', 'class': 'product_detail_img js_variant_img', 'alt-field': 'name', 'zoom': 'image', 'unique': product['__last_update'] + (product.product_variant_id['__last_update'] or '')}"/>
<div t-attf-class="item#{'' if variant_img else ' active'}" itemprop="image" t-field="product.image" t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name', 'zoom': 'image', 'unique': product['__last_update']}"/>
<t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg">
<div class="carousel-item" t-field="pimg.image" t-options="{"widget": "image", "class": "product_detail_img", "alt-field": "name", "zoom": "image" }"/>
</t>
</div>
<t t-if="len(image_ids) or variant_img">
<a class="carousel-control-prev" href="#o-carousel-product" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"/>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#o-carousel-product" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"/>
<span class="sr-only">Next</span>
</a>
</t>
</div>
<ol class="carousel-indicators" t-if="len(image_ids) or variant_img">
<li t-if="variant_img" data-target="#o-carousel-product" data-slide-to="0" class="active">
<img class="img-fluid img js_variant_img_small d-block" t-attf-src="/website/image/product.product/{{product.product_variant_id.id}}/image/90x90" t-att-alt="product.name"/>
</li>
<li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else '0'" t-att-class="'' if variant_img else 'active'">
<img class="img-fluid img d-block" t-attf-src="/website/image/product.template/{{product.id}}/image/90x90" t-att-alt="product.name"/>
</li>
<t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg">
<li data-target="#o-carousel-product" t-att-data-slide-to="pimg_index + (variant_img and 2 or 1)">
<img class="img-fluid img d-block" t-attf-src="/website/image/product.image/{{pimg.id}}/image/90x90" t-att-alt="pimg.name"/>
</li>
</t>
</ol>
</div>
</t>
</div>
<div class="col-md-5 offset-xl-1 col-xl-4" id="product_details">
<h1 itemprop="name" t-field="product.name">Nombre del producto</h1>
<span itemprop="url" style="display:none;" t-esc="'%sshop/product/%s' % (request.httprequest.url_root, slug(product))"/>
<form action="/shop/cart/update" class="js_add_cart_variants" method="POST">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<div class="js_product" t-if="product.product_variant_ids">
<t t-placeholder="select">
<input type="hidden" class="product_id" name="product_id" t-att-value="product.product_variant_id.id if len(product.product_variant_ids) == 1 else '0'"/>
<t t-call="website_sale.variants">
<t t-set="ul_class" t-value="'nav-stacked'"/>
</t>
</t>
<t t-call="website_sale.product_price"/>
<p t-if="len(product.product_variant_ids) > 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Esta combinación no existe.</p>
<div class="css_quantity input-group" contenteditable="false">
<div class="input-group-prepend">
<a t-attf-href="#" class="btn btn-secondary js_add_cart_json" aria-label="Quitar uno" title="Quitar uno">
<i class="fa fa-minus"/>
</a>
</div>
<input type="text" class="form-control quantity" data-min="1" name="add_qty" t-att-value="add_qty or 1"/>
<div class="input-group-append">
<a t-attf-href="#" class="btn btn-secondary float_left js_add_cart_json" aria-label="Agregue uno" title="Agregue uno">
<i class="fa fa-plus"/>
</a>
</div>
</div>
<a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>
<div class="availability_messages o_not_editable"/>
</div>
</form>
<hr t-if="product.description_sale"/>
<div class="o_not_editable">
<p t-field="product.description_sale" class="text-muted"/>
</div>
<hr/>
<p class="text-muted"/>
<p class="text-muted">
<a href="/shop/terms">Términos y condiciones</a><br/>
Garantía de devolución de 30 días<br/>
Envío: 2-3 días laborales
</p>
</div>
</div>
</section>
Traza
Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/opt/odoo/custom/src/odoo/odoo/http.py", line 813, in dispatch r = self._call_function(**self.params) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 370, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 361, in checked_call result.flatten() File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1239, in flatten self.response.append(self.render()) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1232, in render return env["ir.ui.view"]._render_template(self.template, self.qcontext) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1725, in _render_template return self.browse(self.get_view_id(template))._render(values, engine) File "/opt/odoo/auto/addons/website/models/ir_ui_view.py", line 423, in _render return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo/auto/addons/web_editor/models/ir_ui_view.py", line 28, in _render return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1733, in _render return self.env[engine]._render(self.id, qcontext) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/qweb.py", line 254, in _render self.compile(template, options)(self, body.append, values or {}) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) Exception The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/opt/odoo/custom/src/odoo/odoo/http.py", line 813, in dispatch r = self._call_function(**self.params) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 370, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 361, in checked_call result.flatten() File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1239, in flatten self.response.append(self.render()) File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1232, in render return env["ir.ui.view"]._render_template(self.template, self.qcontext) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1725, in _render_template return self.browse(self.get_view_id(template))._render(values, engine) File "/opt/odoo/auto/addons/website/models/ir_ui_view.py", line 423, in _render return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo/auto/addons/web_editor/models/ir_ui_view.py", line 28, in _render return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1733, in _render return self.env[engine]._render(self.id, qcontext) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/qweb.py", line 254, in _render self.compile(template, options)(self, body.append, values or {}) File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/qweb.py", line 334, 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: 'NoneType' object is not callable Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/qweb.py", line 327, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_sale_product_3749 File "<template>", line 1, in body_call_content_3747 TypeError: 'NoneType' object is not callable Error to render compiling AST TypeError: 'NoneType' object is not callable Template: website_sale.product Path: /t/t/div/section Node: <section t-attf-class="container mt8 oe_website_sale #{(compute_currency(product.lst_price) - product.website_price) > 0.01 and website.get_current_pricelist().discount_policy == 'without_discount' and 'discount'}" id="product_detail"> <div class="row"> <div class="col-md-4"> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a t-att-href="keep(category=0)">Productos</a> </li> <li t-if="category" class="breadcrumb-item"> <a t-att-href="keep('/shop/category/%s' % slug(category), category=0)" t-field="category.name"/> </li> <li class="active breadcrumb-item"> <span t-field="product.name"/> </li> </ol> </div> <div class="col-md-3 mb8"> <t t-call="website_sale.search"/> </div> <div id="website_published_button" class="col-md-3"> </div> <div class="col-md-2 text-right"> <t t-call="website_sale.pricelist_list"/> </div> </div> <div class="row"> <div class="col-md-7"> <span itemprop="image" t-attf-content="{{request.httprequest.url_root}}web/image/product.template/{{product.id}}/image" t-field="product.image" t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name', 'zoom': 'image'}" groups="!website_sale.group_website_multi_image"/> <t groups="website_sale.group_website_multi_image"> <t t-set="variant_img" t-value="any(product.mapped('product_variant_ids.image_variant'))"/> <t t-set="image_ids" t-value="product.product_image_ids"/> <div id="o-carousel-product" class="s_banner s_carousel_default slide carousel oe_custom_bg s_carousel" data-ride="carousel" data-interval="0" style="min-height:400px"> <div class="carousel-outer"> <div class="carousel-inner"> <div t-if="variant_img" class="active carousel-item" itemprop="image" t-field="product[:1].product_variant_id.image" t-options="{'widget': 'image', 'class': 'product_detail_img js_variant_img', 'alt-field': 'name', 'zoom': 'image', 'unique': product['__last_update'] + (product.product_variant_id['__last_update'] or '')}"/> <div t-attf-class="item#{'' if variant_img else ' active'}" itemprop="image" t-field="product.image" t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name', 'zoom': 'image', 'unique': product['__last_update']}"/> <t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg"> <div class="carousel-item" t-field="pimg.image" t-options="{"widget": "image", "class": "product_detail_img", "alt-field": "name", "zoom": "image" }"/> </t> </div> <t t-if="len(image_ids) or variant_img"> <a class="carousel-control-prev" href="#o-carousel-product" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"/> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#o-carousel-product" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"/> <span class="sr-only">Next</span> </a> </t> </div> <ol class="carousel-indicators" t-if="len(image_ids) or variant_img"> <li t-if="variant_img" data-target="#o-carousel-product" data-slide-to="0" class="active"> <img class="img-fluid img js_variant_img_small d-block" t-attf-src="/website/image/product.product/{{product.product_variant_id.id}}/image/90x90" t-att-alt="product.name"/> </li> <li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else '0'" t-att-class="'' if variant_img else 'active'"> <img class="img-fluid img d-block" t-attf-src="/website/image/product.template/{{product.id}}/image/90x90" t-att-alt="product.name"/> </li> <t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg"> <li data-target="#o-carousel-product" t-att-data-slide-to="pimg_index + (variant_img and 2 or 1)"> <img class="img-fluid img d-block" t-attf-src="/website/image/product.image/{{pimg.id}}/image/90x90" t-att-alt="pimg.name"/> </li> </t> </ol> </div> </t> </div> <div class="col-md-5 offset-xl-1 col-xl-4" id="product_details"> <h1 itemprop="name" t-field="product.name">Nombre del producto</h1> <span itemprop="url" style="display:none;" t-esc="'%sshop/product/%s' % (request.httprequest.url_root, slug(product))"/> <form action="/shop/cart/update" class="js_add_cart_variants" method="POST"> <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> <div class="js_product" t-if="product.product_variant_ids"> <t t-placeholder="select"> <input type="hidden" class="product_id" name="product_id" t-att-value="product.product_variant_id.id if len(product.product_variant_ids) == 1 else '0'"/> <t t-call="website_sale.variants"> <t t-set="ul_class" t-value="'nav-stacked'"/> </t> </t> <t t-call="website_sale.product_price"/> <p t-if="len(product.product_variant_ids) > 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Esta combinación no existe.</p> <div class="css_quantity input-group" contenteditable="false"> <div class="input-group-prepend"> <a t-attf-href="#" class="btn btn-secondary js_add_cart_json" aria-label="Quitar uno" title="Quitar uno"> <i class="fa fa-minus"/> </a> </div> <input type="text" class="form-control quantity" data-min="1" name="add_qty" t-att-value="add_qty or 1"/> <div class="input-group-append"> <a t-attf-href="#" class="btn btn-secondary float_left js_add_cart_json" aria-label="Agregue uno" title="Agregue uno"> <i class="fa fa-plus"/> </a> </div> </div> <a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a> <div class="availability_messages o_not_editable"/> </div> </form> <hr t-if="product.description_sale"/> <div class="o_not_editable"> <p t-field="product.description_sale" class="text-muted"/> </div> <hr/> <p class="text-muted"/> <p class="text-muted"> <a href="/shop/terms">Términos y condiciones</a><br/> Garantía de devolución de 30 días<br/> Envío: 2-3 días laborales </p> </div> </div> </section>