Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6887 Vistas

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>         

Avatar
Descartar

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.


Mejor respuesta

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


Avatar
Descartar