odoo - 在新窗口中打开 ir.actions.report
问题描述
正如标题中提到的,我需要在新窗口中打开一个报告。我知道我们可以使用target
act_window 来做到这一点,但我一直坚持如何实现它来打开报告。
<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 name="%(myModule.my_report_partner)d" type='action' string="open graph"/>
解决方案
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),
}
推荐阅读
- android - Wix 的 React Native Navigation - bottomTabs 不起作用
- python - Django删除总和为给定值的记录
- json - 如何在 Go 中传递 Elasticsearch 文档中的值?
- elasticsearch - ElasticSearch:如何对数据进行建模以分析用户旅程的流程
- sql - 当序列发生变化时,根据列中的序列计算持续时间
- c# - 获取调用函数、调用或任务执行的来源
- reactjs - navigator.share (Web Share api) 共享 React App 文本而不是我的自定义文本
- javascript - exceljs条件格式的单元格
- django - 关于将创建的新闻/团队分配给创建它的用户的 Django 问题
- markdown - 链接后的内部链接