Skip to Content
Menú
This question has been flagged
2 Respostes
2886 Vistes

Hello Community,


I'm having an issue with the account.invoice report i'm trying to get data from another module I've used this parser from the official documentation it does not work for account.invoice for my custom module it seem to work, is there another way to declare parser report for account.invoice ?

Avatar
Descartar

which version do you use

Best Answer

 Hi,

If you want to access data from other models in the report template, you can try this without using the parser.

Format,

<t t-foreach="request.env['model_name'].search([])" t-as="obj">
<t t-esc="obj"/>
</t>

Sample,

<t t-foreach="request.env['hr.employee'].search([('user_id', '=', user.id)])" t-as="obj">
<t t-esc="obj.job_id.name"/>
</t>

Thanks



Avatar
Descartar