Css Odoo 8 qweb报告样式修改
我正在尝试修改Oddo 8中的qweb报告内容,我正在使用div位置。我想在打印视图中隐藏传真字段。我该怎么办?它不工作。我正在尝试显示css一样没有 下面是我的代码 这是我的最终代码Css Odoo 8 qweb报告样式修改,css,xml,odoo,odoo-8,Css,Xml,Odoo,Odoo 8,我正在尝试修改Oddo 8中的qweb报告内容,我正在使用div位置。我想在打印视图中隐藏传真字段。我该怎么办?它不工作。我正在尝试显示css一样没有 下面是我的代码 这是我的最终代码 <openerp> <data> <template id="report_picking_inherit_demo" inherit_id="stock.report_picking"> <xpath expr="//div[hasclass('
<openerp>
<data>
<template id="report_picking_inherit_demo" inherit_id="stock.report_picking">
<xpath expr="//div[hasclass('page')]/div[hasclass('row')]" position="replace">
<div class="col-xs-6">
<div t-if="o.picking_type_id.code=='incoming' and o.partner_id">
<span>
<strong>Supplier Address:</strong>
</span>
</div>
<div t-if="o.picking_type_id.code=='internal' and o.partner_id">
<span>
<strong>Warehouse Address:</strong>
</span>
</div>
<div t-if="o.picking_type_id.code=='outgoing' and o.partner_id">
<span>
<strong>Customer Addresswww:</strong>
</span>
</div>
<div t-if="o.partner_id" name="partner_header">
<div t-field="o.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": true}'/>
</div>
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-if="o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
<span>
<strong>Delivery Address:</strong>
</span>
<div t-field="o.move_lines[0].partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone","fax"], "no_marker": true}'/>
</div>
<div t-if="o.picking_type_id.code != 'internal' and (not o.move_lines or not o.move_lines[0].partner_id) and o.picking_type_id.warehouse_id.partner_id">
<span>
<strong>Warehouse Address:</strong>
</span>
<div t-field="o.picking_type_id.warehouse_id.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone","fax"], "no_marker": true}'/>
</div>
</div>
</xpath>
</template>
</data>
供应商地址:
仓库地址:
客户地址www:
送货地址:
仓库地址:
在这里,我输入了传真示例
之后这个结果
从列表中删除字段“传真” *.xml
您需要从t-options
中删除fax
属性,如果我使用此行,您可以通过继承原始模板并覆盖来实现。它应该隐藏吗?我想在打印视图中隐藏传真是。你可以试试看。请查看我的更改。我在div中传真了。我放了。但没有工作更新了我的答案。没有工作。我只使用了我向你展示的xml文件。请检查是否有任何错误。
<div t-field="o.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": true}'/>
<template id="custom_report_picking" inherit_id="stock.report_picking">
<xpath expr="//t/t/t/t/div/div/div/div[2]/div" position="replace">
<div t-field="o.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": true}'/>
</xpath>
</template>