콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
1349 화면

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



아바타
취소
베스트 답변

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

아바타
취소
베스트 답변

Same error no idea how to solve it

아바타
취소
작성자 베스트 답변

It works. the problem has been resolved

Many thanks!


imam

아바타
취소