Skip to Content
Menu
This question has been flagged
3 Replies
1017 Views

Hi masters,

I’m beginner in odoo , need advice and solution

I installed 3rd party app, when I click ‘export xls ‘ button and gave me the below error.

OS : Ubuntu Server 22.04. LTS
Odoo ver : 16 CE


RPC_ERROR

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo16/odoo16/custom/inventory_report_generator/controllers/main.py", line 48, in get_report_xlsx
    report_obj.get_inventory_xlsx_report(options, response,
  File "/opt/odoo16/odoo16/custom/inventory_report_generator/models/inventory_report.py", line 283, in get_inventory_xlsx_report
    for rec in report_data_main[0]:
IndexError: list index out of range

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPCError@http://localhost:8069/web/assets/193-43c510d/web.assets_backend.min.js:988:274
    makeErrorFromResponse@http://localhost:8069/web/assets/193-43c510d/web.assets_backend.min.js:992:163
    rpc_error@http://localhost:8069/web/assets/193-43c510d/web.assets_backend.min.js:6863:318
    _trigger_up@http://localhost:8069/web/assets/193-43c510d/web.assets_backend.min.js:9231:99
    _trigger_up@http://localhost:8069/web/assets/193-43c510d/web.assets_backend.min.js:6674:891
    _trigger_up@http://localhost:8069/web/assets/120-aa282bb/web.assets_common.min.js:5917:462
    trigger_up@http://localhost:8069/web/assets/120-aa282bb/web.assets_common.min.js:5917:280
    call@http://localhost:8069/web/assets/120-aa282bb/web.assets_common.min.js:5970:372
    error@http://localhost:8069/web/assets/193-43c510d/web.assets_backend.min.js:14557:1367
    get_file/xhr.onload/decoder.onload@http://localhost:8069/web/assets/120-aa282bb/web.assets_common.min.js:5756:9

Can help to solved this issue ?

Thank you



Avatar
Discard
Best Answer

Hi

Hope everything well

As i review above error I find error is in the variable report_data_main.

Basically this error we face when we have a empty variable and we try to fetch value from the Variable like in your code you are trying to run a loop on report_data_main on 0 index but if this variable having empty list then you see this type of error.

Thanks

Avatar
Discard
Best Answer

Same error no idea how to solve it

Avatar
Discard
Author Best Answer

It works. the problem has been resolved

Many thanks!


imam

Avatar
Discard