Xml 报告标题与页面内容重叠
我被要求为Odoo 14中的采购订单开发定制报告 此报告的标题必须位于所有页面中。在第一页,表格显示在正确的位置,但在第二页,标题位于表格标题上方。请看图片: 第一页: 第二页: 模板代码的定义方式如下:Xml 报告标题与页面内容重叠,xml,odoo,qweb,odoo-14,Xml,Odoo,Qweb,Odoo 14,我被要求为Odoo 14中的采购订单开发定制报告 此报告的标题必须位于所有页面中。在第一页,表格显示在正确的位置,但在第二页,标题位于表格标题上方。请看图片: 第一页: 第二页: 模板代码的定义方式如下: <?xml version="1.0" encoding="utf-8"?> <odoo> <template id="report_purchaseorder" inherit_id=&quo
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_purchaseorder" inherit_id="purchase.report_purchaseorder">
<xpath expr="//t[@t-call='purchase.report_purchaseorder_document']" position="replace">
<div class="header" t-att-style="report_header_style" style="font-family:Arial, Helvetica, sans-serif;">
<div class="row" style="margin-left:8px; margin-right:8px;">
<t t-if="not o and doc">
<t t-set="o" t-value="doc"/>
</t>
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id.sudo()"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
</div>
<div class="row" style="margin-left:8px; margin-right:8px;">
<table class="table" style="margin-top:-30px !important; ">
<tbody>
<tr>
<td style="padding:0px !important;">
<div style="text-align:justify; font-size:10px;">
<p style="float:left;">
<span><strong>Señores:</strong></span> <br/>
<span><strong>Atención:</strong></span>
<span t-field="o.partner_id.name"/><br/>
<span><strong>Dirección:</strong></span>
<span t-field="o.partner_id.city"/><br/>
<span><strong>Teléfonos:</strong></span>
<span t-field="o.partner_id.phone"/><br/>
<span><strong>Email:</strong></span>
<span t-field="o.partner_id.email"/><br/>
<span><strong>Atendido por:</strong></span>
     
<span t-field="o.user_id.name"/>
<i class="fa fa-phone" role="img" aria-label="Phone" title="Phone"/><span t-field="o.user_id.phone"/>
<i class="far fa-envelope" role="img" aria-label="Email" title="Email"/>  <span t-field="o.user_id.email"/>
</p>
</div>
</td>
<td style="padding:0px !important; width:30%;">
<div style="text-align:justify; font-size:10px; padding-left:40%;">
<p style="float:left;">
<span><strong>N° de Página:</strong></span> <span class="page"/> de <span class="topage"/><br/>
<span><strong>Cotización N°:</strong></span>
<span t-field="o.name"/> <br/>
<span><strong>F. de Emisión:</strong></span>
<span t-field="o.create_date" t-options='{"widget": "date"}'/> <br/>
<span><strong>Vigente Hasta:</strong></span>
<span t-field="o.date_order" t-options='{"widget": "date"}'/>
<br/>
<span><strong>Condic. Pago:</strong></span>
</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<t t-call="web.external_layout">
<div class="page" style="font-family:Arial, Helvetica, sans-serif;">
<div class="row" style="margin-top:10px; min-width:100px;">
<table class="table" style="text-align:left; font-size:10px; ">
<thead>
<tr>
<th class="text-center">Imagen</th>
<th class="text-center">Código</th>
<th class="text-center">Descripción</th>
<th class="text-center">Cant.</th>
<th class="text-center">Precio U.</th>
<th class="text-center">Desc.</th>
<th class="text-center">Total Neto</th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.order_line" t-as="line">
<div>
<td class="text-center"><img t-if="line.product_id.image_1920" t-att-src="'data:image/png;base64,%s' % to_text(line.product_id.image_1920)" style="max-height: 80px;width: 100px;margin: auto;"/></td>
<td class="text-center"><span t-field="line.product_id.default_code"/></td>
<td class="text-center" ><span t-field="line.name"/></td>
<td class="text-center">
<span t-field="line.product_qty"/>
<span t-field="line.product_uom.name" groups="uom.group_uom"/>
</td>
<td class="text-right" ><span t-field="line.price_unit"/></td>
<td class="text-right" ></td>
<td class="text-right" >
<span t-field="line.price_subtotal" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</div>
</tr>
<tr>
<td class="text-right">
<br/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</t>
</xpath>
</template>
</odoo>
硒矿石:
Atención:
Dirección:
Teléfonos:
电子邮件:
Atendido por:
N°de Página:de
Cotización°:
F.de Emision:
Vigente Hasta:
Condic。帕戈:
图像
科迪戈
描述
伪善说教
普瑞西奥大学。
描述。
总净收入
我尝试过使用CSS中的padding或margin属性,但如果我使用它,它也会从第一页移动表格。
<record id="paperformat_euro" model="report.paperformat">
<field name="name">European A4</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">Portrait</field>
<field name="margin_top">0</field>
<field name="margin_bottom">23</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">35</field>
<field name="dpi">90</field>
</record>
欧洲A4
A4
0
0
肖像画
0
23
7.
7.
35
90
这并不能回答这个问题。一旦你有足够的钱,你将能够;相反谢谢您的时间@majid