【发布时间】:2018-01-31 08:21:23
【问题描述】:
我自定义 external_layout_header 以在 Purchase Order 中重复 vendor&shipping address。它的成功充分体现。但问题是,div class='page' 中的内容与标题重叠。我把margin-top:xx 给了class='page',但它不受影响。我怎样才能做到这一点?
*external_layout_inherit.xml
<template id="purchase_extrenal_layout" inherit_id="report.external_layout_header">
<xpath expr="//div[@class='row zero_min_height']" position="before">
<div class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"></div>
</div>
</div>
<div class="row">
<div class="" style="float:left; text-align:left; margin-left:50px;">
<strong>Customer address:</strong>
<div t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'/>
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
</div>
<div style="float:right; text-align:right; margin-right:50px;">
<strong>Shipping address:</strong>
<div t-if="o.dest_address_id">
<div t-field="o.dest_address_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'/>
</div>
<div t-if="not o.dest_address_id and o.picking_type_id and o.picking_type_id.default_location_dest_id">
<span t-field="o.picking_type_id.default_location_dest_id.partner_id.name"/>
<div t-field="o.picking_type_id.default_location_dest_id.partner_id"
t-options='{"widget": "contact", "fields": ["address", "phone", "fax"], "no_marker": True, "phone_icons": True}'/>
</div>
</div>
</div>
样本报告。
【问题讨论】: