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

v8: Error when print BoM

By
hanhoe
on 10/1/14, 4:00 AM 1,151 views

Hello!

 

When I try to print a Bom Structure I get the following error:

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 596, in _handle_exception return super(HttpRequest, self)._handle_exception(exception) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_http.py", line 126, in _dispatch result = request.dispatch() File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 614, in dispatch r = self._call_function(**self.params) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 283, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 280, in checked_call return self.endpoint(*a, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 733, in __call__ return self.method(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 376, in response_wrap response = f(*args, **kw) File "/usr/lib/python2.7/dist-packages/openerp/addons/report/controllers/main.py", line 61, in report_routes html = report_obj.get_html(cr, uid, docids, reportname, data=options_data, 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/report/models/report.py", line 156, in get_html return particularreport_obj.render_html(cr, uid, ids, data=data, 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/report/models/abstract_report.py", line 64, in render_html return self.pool['report'].render(cr, uid, [], self._template, docargs, 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/report/models/report.py", line 142, in render return view_obj.render(cr, uid, template, values, 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/website/models/ir_ui_view.py", line 173, 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 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 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 393, in render_tag_foreach ru.append(self.render_element(element, template_attributes, generated_attributes, copy_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 360, in render_tag_foreach enum = self.eval_object(expr, qwebcontext) File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_qweb.py", line 203, in eval_object return self.eval(expr, 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 313, in safe_eval return eval(c, globals_dict, locals_dict) File "", line 1, in <module> File "/usr/lib/python2.7/dist-packages/openerp/addons/mrp/report/bom_structure.py", line 57, in get_children children = _get_rec(object,level) File "/usr/lib/python2.7/dist-packages/openerp/addons/mrp/report/bom_structure.py", line 41, in _get_rec res['name'] = l.name QWebException: "'mrp.bom.line' object has no attribute 'name'" while evaluating 'get_children(o.bom_line_ids)'

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/1/14, 4:00 AM
Seen: 1151 times
Last updated: 3/16/15, 8:10 AM