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

Anyone can solve this please, I get this error on printing report from my custom module.
Traceback (most recent call last):
  File "/stephen/stephen-server/odoo/addons/base/models/qweb.py", line 346, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_web_external_layout_1487
AttributeError: 'int' object has no attribute 'external_report_layout_id'

Error to render compiling AST
AttributeError: 'int' object has no attribute 'external_report_layout_id'
Template: web.external_layout
Path: /templates/t/t[3]
Node: <t t-if="company.external_report_layout_id" t-call="{{company.external_report_layout_id.key}}"><t t-raw="0"/></t>         

아바타
취소

Hi Stephen, maybe you got the solution for this error, I am having the same error in my website custom module, thanks anyway.

I am facing same issue.

Did anyone found how to fix this ?

Regards

Can anybody help me please.
I am also getting this same error.


베스트 답변

Hi,

Maybe you are receiving the integer value ID in the company instead of getting the object. So it will not get an attribute from the integer value.


Try the below:

 <t t-if="o.company.external_report_layout_id" t-call="{{o.company.external_report_layout_id.key}}"><t t-raw="0"/></t>


In all default templates in odoo O is set as the objects in templates or use doc or docs, It may be helpful


아바타
취소