In document reports (QWeb) you usually got doc
or o
which represents the record you want to print/render. That's usually (except in very less situations) a normal Odoo recordset with all the things you can use in Odoo's python business logic code. So just try:
<span t-esc="o.env.context.get('allowed_company_ids', 'sorry nothing here')" />
That should print/render the list of company IDs. If that's working you can also use it in t-if
s and other QWeb control elements.
In business intelligence reports (QWeb again) it depends on how the report is called. In the comment the template account_reports.line_template
is mentioned, which uses context.get()
already. But that must not mean that this context is the normal context. But it's worth a try. You have to dig into the report python code, to find out what is present in the context or how to manipulate it.