Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Reset template: Where hold odoo website sale the user modified templates? File System or Database?

By
Vlad
on 10/3/14, 3:02 PM 4,116 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

3
Torsten Francke
On 10/7/14, 9:02 AM

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!

 

 

 

 

 

Thanks that works

Vlad
on 10/9/14, 9:36 AM

can you mark as answer?

initOS GmbH, Torsten Francke
on 10/9/14, 9:39 AM

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

Sai
on 10/27/15, 7:35 AM
-1
Vlad
On 10/5/14, 4:19 AM

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.

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/3/14, 3:02 PM
Seen: 4116 times
Last updated: 2/4/16, 3:44 AM