Skip to Content
Menu
This question has been flagged
2 Replies
2639 Views

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
Discard

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
Discard