2

as mentionned in the title, I need to open a report in a new window. I know that we can do so using target with act_window but I am stuck on how implement that to open a report.

<template id="myTemplate">
 <!--template-->
</template>

<report
    id="my_report_partner"
    string="Graphe"
    model="res.partner"
    report_type="qweb-html"
    file="myModule.myTemplate"
    name="myModule.myTemplate"
/>

button:

<button name="%(myModule.my_report_partner)d" type='action' string="open graph"/>
Bashir
  • 2,057
  • 5
  • 19
  • 44

1 Answers1

1

Try this, It could help you to archive your task.

return {
        'type': 'ir.actions.act_url',
        'target': 'new',
        'url': '/report/html/%s/%s?enable_editor' % ('event.event_event_report_template_badge', self.id),
    }
Saumil gauswami
  • 665
  • 5
  • 16