我想从 Odoo 中的报告中删除页眉和页脚。我尝试将布局更改为基本布局和外部布局,但没有成功。请问我怎样才能实现这个目标?
我该如何使用纸质格式?
您可以使用基本报告布局:
示例:
<template id="MODULE.report_no_hf">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.basic_layout">
<t t-call="MODULE.report_document" />
</t>
</t>
</t>
</template>
要调整报告间距,请创建自定义纸张格式:
<record id="paperformat_no_hf" model="report.paperformat">
<field name="margin_top">0</field>
<field name="margin_bottom">0</field>
...
</record>
并将其链接到举报操作:
<record id="action_report_no_hf" model="ir.actions.report">
<field name="paperformat_id" ref="MODULE.paperformat_no_hf"/>
...
</record>