Odoo Help


IndexError: list index out of range from Customer Portal from invoice

on 6/12/16, 7:53 PM 1,583 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

On 2/13/17, 1:39 PM

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


Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 3 3 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 9/18/16, 11:41 AM

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 !

peter p
On 9/17/16, 4:38 PM

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




| 4 4 6
Hyderabad, India

On 6/13/16, 6:36 AM


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!    

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/12/16, 7:53 PM
Seen: 1583 times
Last updated: 2/13/17, 1:39 PM