我已经定制了我的销售报告以查看:

对此:

我评论了显示公司信息内部external_layout_header
视图的代码部分:
<?xml version="1.0"?>
<t t-name="report.external_layout_header">
<div class="header">
<div class="row">
<div class="col-xs-3">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
</div>
<div class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"/>
</div>
</div>
<!-- COMMENTED
<div class="row">
<div class="col-xs-3">
<div t-field="company.partner_id" t-field-options="{'widget': 'contact', 'fields': ['address', 'name'], 'no_marker': true}" style="border-bottom: 1px solid black;"/>
</div>
</div>
-->
</div>
</t>
不知何故,我希望减少标题和报告正文之间的空间。我一直在尝试不同的方法,但没有运气。Odoo 论坛中有一个类似的问题,但这是针对带有 RML 的 v7(已弃用)。我正在使用 Odoo v8 QWeb 报告。
编辑1:
我已经尝试过@Paulo 的解决方案:

但这不是我要找的。我需要通过将身体移动到标题附近而不是相反来获得空间
编辑2(解决方案):
正如@Paulo 的评论所建议的那样,玩弄字段组合margin_top
并header_spacing
成功了。我margin_top
从40
to20
和header_spacing
from 35
to减少15
。