500: Internal Server Error

QWeb

Error message:

Error to render compiling AST
TypeError: argument of type 'NoneType' is not iterable
Template: website_sale.products_item
Path: /t/form
Node: <form action="/shop/cart/update" method="post" class="card oe_product_cart" t-att-data-publish="(product.website_published and product.id in available_ids) and 'on' or 'off'" itemscope="itemscope" itemtype="http://schema.org/Product">
                <div class="card-body p-1 oe_product_image">
                    <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
                    <div t-if="product.label_line_ids">
                <t t-foreach="product.label_line_ids" t-as="labels">
                    <t t-if="labels.website_id.id == website.id">
                        <div class="te_ribbon-wrapper">
                            <div class="label_div">
                                <div class="p-1 te_label_name te_label_name" t-field="labels.label.name"/>
                            </div>
                        </div>
                    </t>
                </t>
            </div>
        <a t-att-href="product_href" class="d-block h-100" itemprop="url">
                        <span t-field="product.image_1920" t-options="{'widget': 'image', 'preview_image': 'image_1024' if product_image_big else 'image_256'}" class="d-flex h-100 justify-content-center align-items-center"/>
                    </a>
                </div>
                <div class="card-body p-0 text-center o_wsale_product_information">
                    <div class="p-2 o_wsale_product_information_text">
                        <h6 class="o_wsale_products_item_title">
                            <a itemprop="name" t-att-href="product_href" t-att-content="product.name" t-field="product.name"/>
                            <a role="button" t-if="not product.website_published" t-att-href="product_href" class="btn btn-sm btn-danger" title="This product is unpublished.">Nepublicat
                            </a>
                        </h6>
                        <div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
                            <del t-attf-class="text-danger mr-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
                            <span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
                            <span itemprop="price" style="display:none;" t-esc="combination_info['price']"/>
                            <span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/>
                        </div>
                    </div>
                    <div class="o_wsale_product_btn">
            <t t-set="in_wish" t-value="product._is_in_wishlist()"/>
            <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/>
            <button t-if="product_variant_id" type="button" role="button" class="btn btn-secondary o_add_wishlist" t-att-disabled="in_wish or None" title="Adaugă la favorite" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant_id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"/></button>
        
            <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/>
            <button t-if="product_variant_id" type="button" role="button" class="d-none d-md-inline-block btn btn-secondary o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant_id" data-action="o_comparelist"><span class="fa fa-exchange"/></button>
        </div>
                </div>
            </form>
        

The error occured while rendering the template website_sale.products_item and evaluating the following expression: <form action="/shop/cart/update" method="post" class="card oe_product_cart" t-att-data-publish="(product.website_published and product.id in available_ids) and 'on' or 'off'" itemscope="itemscope" itemtype="http://schema.org/Product"> <div class="card-body p-1 oe_product_image"> <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/> <div t-if="product.label_line_ids"> <t t-foreach="product.label_line_ids" t-as="labels"> <t t-if="labels.website_id.id == website.id"> <div class="te_ribbon-wrapper"> <div class="label_div"> <div class="p-1 te_label_name te_label_name" t-field="labels.label.name"/> </div> </div> </t> </t> </div> <a t-att-href="product_href" class="d-block h-100" itemprop="url"> <span t-field="product.image_1920" t-options="{'widget': 'image', 'preview_image': 'image_1024' if product_image_big else 'image_256'}" class="d-flex h-100 justify-content-center align-items-center"/> </a> </div> <div class="card-body p-0 text-center o_wsale_product_information"> <div class="p-2 o_wsale_product_information_text"> <h6 class="o_wsale_products_item_title"> <a itemprop="name" t-att-href="product_href" t-att-content="product.name" t-field="product.name"/> <a role="button" t-if="not product.website_published" t-att-href="product_href" class="btn btn-sm btn-danger" title="This product is unpublished.">Nepublicat </a> </h6> <div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer"> <del t-attf-class="text-danger mr-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> <span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> <span itemprop="price" style="display:none;" t-esc="combination_info['price']"/> <span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/> </div> </div> <div class="o_wsale_product_btn"> <t t-set="in_wish" t-value="product._is_in_wishlist()"/> <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/> <button t-if="product_variant_id" type="button" role="button" class="btn btn-secondary o_add_wishlist" t-att-disabled="in_wish or None" title="Adaugă la favorite" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant_id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"/></button> <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/> <button t-if="product_variant_id" type="button" role="button" class="d-none d-md-inline-block btn btn-secondary o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant_id" data-action="o_comparelist"><span class="fa fa-exchange"/></button> </div> </div> </form>

Traceback

Traceback (most recent call last):
  File "/opt/odoo13/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_products_item_29963
TypeError: argument of type 'NoneType' is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo13/odoo/addons/base/models/ir_http.py", line 229, in _dispatch
    result = request.dispatch()
  File "/opt/odoo13/odoo/http.py", line 803, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo13/odoo/http.py", line 345, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo13/odoo/service/model.py", line 93, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo13/odoo/http.py", line 341, in checked_call
    result.flatten()
  File "/opt/odoo13/odoo/http.py", line 1230, in flatten
    self.response.append(self.render())
  File "/opt/odoo13/odoo/http.py", line 1223, in render
    return env["ir.ui.view"].render_template(self.template, self.qcontext)
  File "/opt/odoo13/odoo/addons/base/models/ir_ui_view.py", line 1154, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/var/www/laceaun_odoo13/addons/addons/website/models/ir_ui_view.py", line 335, in render
    return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/var/www/laceaun_odoo13/addons/addons/web_editor/models/ir_ui_view.py", line 25, in render
    return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo13/odoo/addons/base/models/ir_ui_view.py", line 1162, in render
    return self.env[engine].render(self.id, qcontext)
  File "/opt/odoo13/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/odoo/addons/base/models/qweb.py", line 259, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/opt/odoo13/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo13/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_products_29936
  File "<template>", line 2, in body_call_content_29934
  File "<template>", line 112, in foreach_29930
  File "<template>", line 113, in foreach_29929
  File "/opt/odoo13/odoo/addons/base/models/qweb.py", line 338, 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: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/opt/odoo13/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_website_sale_products_item_29963
TypeError: argument of type 'NoneType' is not iterable

Error to render compiling AST
TypeError: argument of type 'NoneType' is not iterable
Template: website_sale.products_item
Path: /t/form
Node: <form action="/shop/cart/update" method="post" class="card oe_product_cart" t-att-data-publish="(product.website_published and product.id in available_ids) and 'on' or 'off'" itemscope="itemscope" itemtype="http://schema.org/Product">
                <div class="card-body p-1 oe_product_image">
                    <input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
                    <div t-if="product.label_line_ids">
                <t t-foreach="product.label_line_ids" t-as="labels">
                    <t t-if="labels.website_id.id == website.id">
                        <div class="te_ribbon-wrapper">
                            <div class="label_div">
                                <div class="p-1 te_label_name te_label_name" t-field="labels.label.name"/>
                            </div>
                        </div>
                    </t>
                </t>
            </div>
        <a t-att-href="product_href" class="d-block h-100" itemprop="url">
                        <span t-field="product.image_1920" t-options="{'widget': 'image', 'preview_image': 'image_1024' if product_image_big else 'image_256'}" class="d-flex h-100 justify-content-center align-items-center"/>
                    </a>
                </div>
                <div class="card-body p-0 text-center o_wsale_product_information">
                    <div class="p-2 o_wsale_product_information_text">
                        <h6 class="o_wsale_products_item_title">
                            <a itemprop="name" t-att-href="product_href" t-att-content="product.name" t-field="product.name"/>
                            <a role="button" t-if="not product.website_published" t-att-href="product_href" class="btn btn-sm btn-danger" title="This product is unpublished.">Nepublicat
                            </a>
                        </h6>
                        <div class="product_price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer">
                            <del t-attf-class="text-danger mr-2 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
                            <span t-if="combination_info['price']" t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
                            <span itemprop="price" style="display:none;" t-esc="combination_info['price']"/>
                            <span itemprop="priceCurrency" style="display:none;" t-esc="website.currency_id.name"/>
                        </div>
                    </div>
                    <div class="o_wsale_product_btn">
            <t t-set="in_wish" t-value="product._is_in_wishlist()"/>
            <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/>
            <button t-if="product_variant_id" type="button" role="button" class="btn btn-secondary o_add_wishlist" t-att-disabled="in_wish or None" title="Adaugă la favorite" t-att-data-product-template-id="product.id" t-att-data-product-product-id="product_variant_id" data-action="o_wishlist"><span class="fa fa-heart" role="img" aria-label="Add to wishlist"/></button>
        
            <t t-set="product_variant_id" t-value="product._get_first_possible_variant_id()"/>
            <button t-if="product_variant_id" type="button" role="button" class="d-none d-md-inline-block btn btn-secondary o_add_compare" title="Compare" aria-label="Compare" t-att-data-product-product-id="product_variant_id" data-action="o_comparelist"><span class="fa fa-exchange"/></button>
        </div>
                </div>
            </form>