我正在尝试在代码下面的odoo 10中创建自定义报告(包括自定义页眉和页脚)。
custom_report.xml
<?xml version="1.0"?>
<odoo>
<record id="paperformat_euro_landscape"
model="report.paperformat">
<field name="name">European A4 Landscape</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Landscape</field>
<field name="margin_top">10</field>
<field name="margin_bottom">15</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">10</field>
<field name="dpi">90</field>
</record>
<report id="action_custom_layout"
string="Custom Report"
model="rep.oper"
report_type="qweb-pdf"
name="custom_report.report_custom_layout"
paperformat="paperformat_euro_landscape"/>
<template id="report_custom_layout" >
<xpath expr="//div[@class='header']" position='replace'>
<div class="page" style="font-size:11px ; width:100%;">
<div class="header">
<div class="row">
<div class="col-xs-13" style="text-align: right;">
<td>AHC.FOR.005.V01</td>
</div>
</div>
</div>
<div class="body">
<div class="row">
<div class="col-xs-100">
<t t-foreach="docs" t-as="o">
<div class="row-1">
</div>
</t>
</div>
</div>
</div>
<div class="footer">
<div class="row">
</div>
</div>
</div>
</xpath>
</template>
<t t-call="report.html_container">
</t>
[![Report][1]][1]</odoo>
但是,当我运行报告时,它会向我显示重复的值。
我怎么给我看一个值?
最诚挚的问候