Skip to Content
Menu
This question has been flagged
1 Reply
1821 Views

Hi

I finally managed to upgrade my odoo 8 to odoo 10. Now when I create an invoice an try to create the report, I get this error:

Traceback (most recent call last):
  File "/home/developer/odoo/odoo/addons/report/controllers/main.py", line 96, in report_download
    response = self.report_routes(reportname, docids=docids, converter='pdf')
  File "/home/developer/odoo/odoo/odoo/http.py", line 504, in response_wrap
    response = f(*args, **kw)
  File "/home/developer/odoo/odoo/addons/report/controllers/main.py", line 45, in report_routes
    pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data)
  File "/home/developer/odoo/odoo/addons/report/models/report.py", line 178, in get_pdf
    html = self.with_context(context).get_html(docids, report_name, data=data)
  File "/home/developer/odoo/odoo/addons/report/models/report.py", line 144, in get_html
    return self.render(report.report_name, docargs)
  File "/home/developer/odoo/odoo/addons/report/models/report.py", line 120, in render
    return view_obj.render_template(template, values)
  File "/home/developer/odoo/odoo/odoo/addons/base/ir/ir_ui_view.py", line 1036, in render_template
    return self.browse(self.get_view_id(template)).render(values, engine)
  File "/home/developer/odoo/odoo/addons/website/models/ir_ui_view.py", line 110, in render
    return super(View, self).render(values, engine=engine)
  File "/home/developer/odoo/odoo/addons/web_editor/models/ir_ui_view.py", line 26, in render
    return super(IrUiView, self).render(values=values, engine=engine)
  File "/home/developer/odoo/odoo/odoo/addons/base/ir/ir_ui_view.py", line 1056, in render
    return self.env[engine].render(self.id, qcontext)
  File "/home/developer/odoo/odoo/odoo/addons/base/ir/ir_qweb/ir_qweb.py", line 53, in render
    return super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
  File "/home/developer/odoo/odoo/odoo/addons/base/ir/ir_qweb/qweb.py", line 248, in render
    self.compile(template, options)(self, body.append, values or {})
  File "/home/developer/odoo/odoo/odoo/addons/base/ir/ir_qweb/qweb.py", line 317, in _compiled_fn
    raise e
QWebException: tuple index out of range
Traceback (most recent call last):
  File "/home/developer/odoo/odoo/odoo/addons/base/ir/ir_qweb/qweb.py", line 315, in _compiled_fn
    return compiled(self, append, values, options, log)
  File "<template>", line 1, in template_account_report_invoice_document_168
  File "<template>", line 3, in body_call_content_167
  File "<template>", line 173, in foreach_157
IndexError: tuple index out of range

Error to render compiling AST
IndexError: tuple index out of range
Template: account.report_invoice_document
Path: /templates/t/t/div/div[3]/div/table/t/tr/td[2]/span
Node: <span t-esc="amount_by_group[2]"/>


Any ideas what could be causing this issue?

Avatar
Discard
Author Best Answer

ok, I found the solution:

I went to Reports/Invoices/Q-Web Views/report_invoice_document and did this change:

orginal:

                                <td><span t-esc="amount_by_group[0] if len(o.tax_line_ids) &gt; 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/></td>
                                <td class="text-right">
                                    <span t-esc="amount_by_group[2]"/>
                                </td>

new:


 
                                <td><span t-esc="amount_by_group[0] if len(o.tax_line_ids) &gt; 1 else (o.tax_line_ids.tax_id.description or o.tax_line_ids.tax_id.name)"/></td>
                                <td class="text-right">
                                    <span t-esc="amount_by_group[1]"/>
                                </td>
                 

Avatar
Discard
Related Posts Replies Views Activity
1
Jan 18
4531
0
Jul 17
3448
0
May 17
1777
3
Jun 23
9361
1
Nov 23
8168