Skip to Content
Menu
This question has been flagged
4 Replies
6940 Views

When a customer clicks on the invoice in their customer portal, I get this:


IndexError: list index out of range


I am using Odoo9 Enterprise.

Full log:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/openerp/addons/website/models/ir_http.py", line 243, 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 157, in _handle_exception

return request._handle_exception(exception)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 781, 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 182, in _dispatch

result = request.dispatch()

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 840, in dispatch

r = self._call_function(**self.params)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper

return f(dbname, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 309, in checked_call

result = self.endpoint(*a, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 959, in __call__

return self.method(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 509, in response_wrap

response = f(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/controllers/main.py", line 45, in report_routes

pdf = report_obj.get_pdf(cr, uid, docids, reportname, data=data, context=context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 157, in get_pdf

html = self.get_html(cr, uid, ids, report_name, data=data, context=context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 123, in get_html

report = self._get_report_from_name(cr, uid, report_name)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/report/models/report.py", line 476, in _get_report_from_name

idreport = report_obj.search(cr, uid, conditions)[0]

IndexError: list index out of range

Avatar
Discard
Best Answer

Hi can anyone provide solution for above error tried to re install the base POS module but unable to resolve the issue,

Is there any one who could resolve this for POS module I am usinf odoo 9.0 version

Avatar
Discard
Best Answer

Seems like you have renamed the default report...

Can you reproduce you bug on runbot ? if yes, don't hesitate to open an issue on github !



Avatar
Discard
Best Answer

We are having the same issue, is there an answer to this?

Avatar
Discard
Best Answer

Sean,

the result of search on report_obj is an empty list(there is no report found as per the 'condition') <br/>and from empty list the code is trying to fetch the first record..

you can remove [0] from the end of report_obj.search(cr, uid, conditions)[0] and check the returned value..

Hope it helps!    

Avatar
Discard
Related Posts Replies Views Activity
1
Jul 19
5261
0
Nov 16
2564
0
Oct 24
105
1
Jul 24
410
1
May 24
692