500: Internal Server Error

QWeb

Error message:

Error to render compiling AST
TypeError: 'NoneType' object is not callable
Template: website_sale.product
Path: /t/t/div/section[2]
Node: <section t-attf-class="container oe_website_sale #{(compute_currency(product.lst_price) - product.price) &gt; 0.1 and 'discount'}" id="product_detail">
        <div class="row">
          <div class="col-xl-7 col-md-7 col-lg-7">
            <span itemprop="image" t-field="product.image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;product_detail_img&quot;}"/>
          </div>
          <div class="col-xl-4 col-lg-5 col-md-5 offset-xl-1">
            <h1 itemprop="name" t-field="product.name">Product Name</h1>
            <span itemprop="url" style="display:none;" t-esc="'/shop/product/%s' % slug(product)"/>
            <form t-att-action="keep('/shop/cart/update')" class="js_add_cart_variants" method="POST">
              <div class="js_product">
                <t t-placeholder="select">
                  <input type="hidden" class="product_id" name="product_id" t-att-value="int(product.product_variant_ids[0]) 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) &gt; 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Product not available</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="Remove one" title="Remove one">
                    <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="Add one" title="Add one">
                    <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>
              <p t-field="product.description_sale" class="text-muted"/>
            </div>
            <hr/>
            <p class="text-muted"/>
          </div>
        </div>
      </section>
      

The error occured while rendering the template website_sale.product and evaluating the following expression: <section t-attf-class="container oe_website_sale #{(compute_currency(product.lst_price) - product.price) &gt; 0.1 and 'discount'}" id="product_detail"> <div class="row"> <div class="col-xl-7 col-md-7 col-lg-7"> <span itemprop="image" t-field="product.image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;product_detail_img&quot;}"/> </div> <div class="col-xl-4 col-lg-5 col-md-5 offset-xl-1"> <h1 itemprop="name" t-field="product.name">Product Name</h1> <span itemprop="url" style="display:none;" t-esc="'/shop/product/%s' % slug(product)"/> <form t-att-action="keep('/shop/cart/update')" class="js_add_cart_variants" method="POST"> <div class="js_product"> <t t-placeholder="select"> <input type="hidden" class="product_id" name="product_id" t-att-value="int(product.product_variant_ids[0]) 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) &gt; 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Product not available</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="Remove one" title="Remove one"> <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="Add one" title="Add one"> <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> <p t-field="product.description_sale" class="text-muted"/> </div> <hr/> <p class="text-muted"/> </div> </div> </section>

Traceback

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_product_2107423
  File "<template>", line 2, in body_call_content_2107421
TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 234, in _dispatch
    result = request.dispatch()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 809, in dispatch
    r = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in checked_call
    result.flatten()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1236, in flatten
    self.response.append(self.render())
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1229, in render
    return env["ir.ui.view"].render_template(self.template, self.qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1191, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 344, in render
    return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1199, in render
    return self.env[engine].render(self.id, qcontext)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 58, in render
    result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 260, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 340, 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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_product_2107423
  File "<template>", line 2, in body_call_content_2107421
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[2]
Node: <section t-attf-class="container oe_website_sale #{(compute_currency(product.lst_price) - product.price) &gt; 0.1 and 'discount'}" id="product_detail">
        <div class="row">
          <div class="col-xl-7 col-md-7 col-lg-7">
            <span itemprop="image" t-field="product.image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;product_detail_img&quot;}"/>
          </div>
          <div class="col-xl-4 col-lg-5 col-md-5 offset-xl-1">
            <h1 itemprop="name" t-field="product.name">Product Name</h1>
            <span itemprop="url" style="display:none;" t-esc="'/shop/product/%s' % slug(product)"/>
            <form t-att-action="keep('/shop/cart/update')" class="js_add_cart_variants" method="POST">
              <div class="js_product">
                <t t-placeholder="select">
                  <input type="hidden" class="product_id" name="product_id" t-att-value="int(product.product_variant_ids[0]) 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) &gt; 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Product not available</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="Remove one" title="Remove one">
                    <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="Add one" title="Add one">
                    <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>
              <p t-field="product.description_sale" class="text-muted"/>
            </div>
            <hr/>
            <p class="text-muted"/>
          </div>
        </div>
      </section>