500: Internal Server Error
QWeb
Hata mesajı:
Error to render compiling AST AttributeError: 'website' object has no attribute 'website_show_price' Template: website_sale.product_price Path: /t/div Node: <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16" t-if=" website.website_show_price "> <h4 class="oe_price_h4 css_editable_mode_hidden"> <span class="oe_price" style="white-space: nowrap;" 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"/> <small t-attf-class="text-body ml-1 oe_default_price {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through; white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> </h4> <h4 class="css_non_editable_mode_hidden decimal_precision" t-att-data-precision="str(website.currency_id.decimal_places)"> <span t-field="product.list_price" t-options="{ "widget": "monetary", "display_currency": product.currency_id, }"/> </h4> </div>
Şablonu oluşturulurken hata oluştu website_sale.product_price
ve aşağıdaki ifade değerlendirme: <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16" t-if=" website.website_show_price ">
<h4 class="oe_price_h4 css_editable_mode_hidden">
<span class="oe_price" style="white-space: nowrap;" 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"/>
<small t-attf-class="text-body ml-1 oe_default_price {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through; white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/>
</h4>
<h4 class="css_non_editable_mode_hidden decimal_precision" t-att-data-precision="str(website.currency_id.decimal_places)">
<span t-field="product.list_price" t-options="{ "widget": "monetary", "display_currency": product.currency_id, }"/>
</h4>
</div>
Traceback
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 806, in dispatch r = self._call_function(**self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, 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 350, in checked_call result.flatten() File "/usr/lib/python3/dist-packages/odoo/http.py", line 1273, in flatten self.response.append(self.render()) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1266, 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 1718, 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 423, 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 28, 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 1726, in _render return self.env[engine]._render(self.id, qcontext) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 55, 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 258, in _render self.compile(template, options)(self, body.append, values or {}) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn raise e File "/usr/lib/python3/dist-packages/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_product_4100 File "<template>", line 7, in body_call_content_4098 File "/usr/lib/python3/dist-packages/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) Exception The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 806, in dispatch r = self._call_function(**self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, 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 350, in checked_call result.flatten() File "/usr/lib/python3/dist-packages/odoo/http.py", line 1273, in flatten self.response.append(self.render()) File "/usr/lib/python3/dist-packages/odoo/http.py", line 1266, 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 1718, 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 423, 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 28, 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 1726, in _render return self.env[engine]._render(self.id, qcontext) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 55, 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 258, in _render self.compile(template, options)(self, body.append, values or {}) File "/usr/lib/python3/dist-packages/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn raise e File "/usr/lib/python3/dist-packages/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_product_4100 File "<template>", line 7, in body_call_content_4098 File "/usr/lib/python3/dist-packages/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: 'website' object has no attribute 'website_show_price' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/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_product_price_4114 AttributeError: 'website' object has no attribute 'website_show_price' Error to render compiling AST AttributeError: 'website' object has no attribute 'website_show_price' Template: website_sale.product_price Path: /t/div Node: <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16" t-if=" website.website_show_price "> <h4 class="oe_price_h4 css_editable_mode_hidden"> <span class="oe_price" style="white-space: nowrap;" 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"/> <small t-attf-class="text-body ml-1 oe_default_price {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="text-decoration: line-through; white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"/> </h4> <h4 class="css_non_editable_mode_hidden decimal_precision" t-att-data-precision="str(website.currency_id.decimal_places)"> <span t-field="product.list_price" t-options="{ "widget": "monetary", "display_currency": product.currency_id, }"/> </h4> </div>