Skip to Content
Menu
This question has been flagged
3 Replies
16842 Views

Hi am new by odoo.

I changed the template on the website-shop (ecommerce) modul with "customize / html editor" and put some stuff:

500: Internal Server Error

Error

Error message:

"'product.template' object has no attribute 'product_variant_idsaa'" while evaluating "int(product.product_variant_idsaa[0]) if len(product.product_variant_idsaa) == 1 else '0'"

with traceback

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_http.py", line 204, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_http.py", line 100, in _handle_exception return request._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 595, in _handle_exception return super(HttpRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1292, in get_response result.flatten() File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1165, in flatten self.response.append(self.render()) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1159, in render context=request.context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_ui_view.py", line 170, in render return super(view, self).render(cr, uid, id_or_xml_id, values=values, engine=engine, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 1007, in render return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context) File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 247, in render return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 282, in render_node result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 403, in render_tag_call d[0] = self.render_element(element, template_attributes, generated_attributes, d) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 284, in render_node result = self.render_element(element, template_attributes, generated_attributes, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 305, in render_element g_inner.append(self.render_node(current_node, qwebcontext)) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 267, in render_node att, val = self._render_att[attribute](self, element, attribute_name, attribute_value, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_qweb.py", line 59, in render_att_att att, val = super(QWeb, self).render_att_att(element, attribute_name, attribute_value, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 340, in render_att_att att, val = attribute_name[6:], self.eval(attribute_value, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 200, in eval raise_qweb_exception(message="Could not evaluate expression %r" % expr, expression=expr, template=template) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 197, in eval return qwebcontext.safe_eval(expr) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 80, in safe_eval return eval(expr, None, locals_dict, nocopy=True, locals_builtins=True) File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 319, in safe_eval return eval(c, globals_dict, locals_dict) File "", line 1, in <module> QWebException: "'product.template' object has no attribute 'product_variant_idsaa'" while evaluating "int(product.product_variant_idsaa[0]) if len(product.product_variant_idsaa) == 1 else '0'"

 

I understand that my modification like "product.product_variant_idsaa" is not ok but normaly I can reset the template by exception.  In current situation a do not see any reset buttons.

Where is the place(database table? oder filesystem?)  odoo save the user modified templates?
For the moment I use deb packages.

Thanks

Vlad

Avatar
Discard
Best Answer

Go to: Settings -> Technical (need technical settings enable for admin) -> User Interface -> Views

then filter: "View Type" = QWeb

then you see all side and change the view!

 

 

 

 

 

Avatar
Discard
Author

Thanks that works

can you mark as answer?

I have registered an account just to say thank you! That really helped!

Thanks, That works! :)

Author Best Answer

Nobody knows?

This is realy important because if I made an error by template modification my shop will go down. And there is no opportunity to reset the templates from interface.

 

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
2
1
Sep 22
1322
0
May 20
1484
3
Mar 15
9067
0
Mar 15
2905