Ajuda

0

How to post a qweb-report in oe_chatter?

Avatar
Rick

Hi

I need a button that every time anyone presses it, it returns a qweb report in pdf and also post that pdf in oe_chatter.

I've tried to use message_post_with_template(anser.report_declaration) but it doesn't work...

I've also tried with message_post(attachment=[(anser.report_declaration)]) , can anyone help me?

Avatar
Descartar
1 Resposta
-2
Avatar
Paresh Wagh
Best Answer

Hi Rick:

QWeb Reports can be accessed directly via a URL. You can put the URL in the chatter. When someone clicks on it, it will generate the report and open it in the browser.

The URL formats are:

HTML mode: http(s)://<server:port>/report/html/<template name of the report>/<id of the record>

PDF Report: http(s)://<server:port>/report/pdf/<template name of the report>/<id of the record>

You can find the template name of the report by activating developer mode and going to Settings > Technical > Reports

Hope that helps.

Avatar
Descartar