1- Khi mình vào Kế toán/Cấu hình/Tài khoản chọn một tài khoản và vào In/ Sổ quỹ (hoặc sổ cái). Một số tài khoản thì xuất ra báo cáo in bình thường, một số tài khoản thì bị lỗi như sau:
(Ví dụ mình chọn tài khoản: 1121, 13111 cũng bị tương tự…)
Odoo
Odoo Server Error
Traceback (most recent call last):
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/report/controllers/main.py", line 125, in report_download
response = self.report_routes(reportname, converter='pdf', **dict(data))
File "/opt/openerp/80/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/report/controllers/main.py", line 65, in report_routes
pdf = report_obj.get_pdf(cr, uid, docids, reportname, data=options_data, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/report/models/report.py", line 190, in get_pdf
html = self.get_html(cr, uid, ids, report_name, data=data, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/report/models/report.py", line 165, in get_html
return particularreport_obj.render_html(cr, uid, ids, data=data, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/openerp/80/openerp/api.py", line 363, in old_api
result = method(recs, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/tvtmaaddons/to_vn_legal_financial_reports/report/cash_book.py", line 41, in render_html
return report_obj.render('to_vn_legal_financial_reports.report_cashbook', docargs)
File "/opt/openerp/80/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/opt/openerp/80/openerp/api.py", line 546, in new_api
result = method(self._model, cr, uid, self.ids, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/website_report/report.py", line 47, in render
return super(Report, self).render(cr, uid, ids, template, values=values, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/report/models/report.py", line 151, in render
return view_obj.render(cr, uid, template, values, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/addons/website/models/ir_ui_view.py", line 172, in render
return super(view, self).render(cr, uid, id_or_xml_id, values=values, engine=engine, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/openerp/80/openerp/addons/base/ir/ir_ui_view.py", line 1028, in render
return self.pool[engine].render(cr, uid, id_or_xml_id, qcontext, loader=loader, context=context)
File "/opt/openerp/80/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 253, in render
return self.render_node(self.get_template(id_or_xml_id, qwebcontext), qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 292, in render_node
result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 430, in render_tag_call
d[0] = self.render_element(element, template_attributes, generated_attributes, d)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 292, in render_node
result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 416, in render_tag_foreach
ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 294, in render_node
result = self.render_element(element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 292, in render_node
result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 416, in render_tag_foreach
ru.append(self.render_element(element, template_attributes, generated_attributes, copy_qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 315, in render_element
g_inner.append(self.render_node(current_node, qwebcontext))
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 292, in render_node
result = self._render_tag[t_render](self, element, template_attributes, generated_attributes, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 378, in render_tag_foreach
enum = self.eval_object(expr, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 200, in eval_object
return self.eval(expr, qwebcontext)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 197, in eval
raise_qweb_exception(message="Could not evaluate expression %r" % expr, expression=expr, template=template)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 194, in eval
return qwebcontext.safe_eval(expr)
File "/opt/openerp/80/openerp/addons/base/ir/ir_qweb.py", line 80, in safe_eval
return eval(expr, None, locals_dict, nocopy=True, locals_builtins=True)
File "/opt/openerp/80/openerp/tools/safe_eval.py", line 314, in safe_eval
return eval(c, globals_dict, locals_dict)
File "", line 1, in
File "/opt/openerp/80/openerp/api.py", line 239, in wrapper
return new_api(self, *args, **kwargs)
File "/home/nmytz6hzufgbjkekmcvk7pxt7olcifj1/tvtmaaddons/to_vn_legal_financial_reports/models/account.py", line 1779, in get_report_move_lines
account_sum += l['debit'] - l['credit']
QWebException: "unsupported operand type(s) for -: 'NoneType' and 'NoneType'" while evaluating
'a.get_report_move_lines(data)'
2. Trong các bản PDF sổ quỹ hoặc sổ cái xuất ra, header của các bảng báo cáo bị lỗi (xem hình đính kèm)
Các bạn xem hộ nhé. Trân trọng!