Skip to Content
Menu
This question has been flagged
1 Reply
3590 Views

in odoo i get all the assigned values in context,but when i trying to fetch that values from context in reports i cant get the values,i am calling the values as "request.session.context" something like that,i think odoo reports updates the normal context and gives something like this "{'lang': u'en_US', 'tz': u'EST', 'uid': 13}" is there a any way to get the values i assigned in odoo context?

Avatar
Discard
Best Answer

Hello Sarang,

You can something like:

report = self.env.ref('module_name.report_name')
pdf = report.with_context({'key': 'value', 'key': 'value'}).render_qweb_pdf([ids])

You can use that key value in xml report file.

Hope it will helpful for you.

Thanks and regards

Haresh Kansara

Avatar
Discard