Hi
Hope someone can help me with this error
I'm able to print invoices except for one particular invoice I don't know why
the following is the error I got when clicking on print button:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 348, in _compiled_fn
return compiled(self, append, new, options, log)
File "", line 1, in template_account_report_invoice_document_with_payments_114
File "", line 2, in body_call_content_113
File "", line 88, in foreach_94
ZeroDivisionError: float division by zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1686, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter)
File "/home/odoo/src/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1627, in report_routes
pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0]
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 730, in render_qweb_pdf
html = self.with_context(context).render_qweb_html(res_ids, data=data)[0]
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 770, in render_qweb_html
return self.render_template(self.report_name, data), 'html'
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions_report.py", line 543, in render_template
return view_obj.render_template(template, values)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1338, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/home/odoo/src/odoo/addons/web_editor/models/ir_ui_view.py", line 29, in render
return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 1347, in render
return self.env[engine].render(self.id, qcontext)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 59, in render
result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 275, in render
self.compile(template, options)(self, body.append, values or {})
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 350, in _compiled_fn
raise e
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 348, in _compiled_fn
return compiled(self, append, new, options, log)
File "", line 1, in template_985_62
File "", line 2, in body_call_content_61
File "", line 3, in foreach_60
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 355, 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: float division by zero
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/qweb.py", line 348, in _compiled_fn
return compiled(self, append, new, options, log)
File "", line 1, in template_account_report_invoice_document_with_payments_114
File "", line 2, in body_call_content_113
File "", line 88, in foreach_94
ZeroDivisionError: float division by zero
Error to render compiling AST
ZeroDivisionError: float division by zero
Template: account.report_invoice_document_with_payments
Path: /templates/t/t/div/table/tbody/t[3]/tr/t[1]/td[5]/t[3]
Node:
The error is self self-explained, float division by zero. You have float in your report divided by zero in your template report_invoice_document_with_payments