首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Odoo 8 qweb报表样式的修改

Odoo 8 qweb报表样式的修改
EN

Stack Overflow用户
提问于 2018-07-03 09:21:07
回答 2查看 359关注 0票数 0

我试图修改我的qweb报告的内容,在奥多8,我使用的是div位置。我想隐藏打印视图中的传真字段。我该怎么做?它不起作用,我试着像显示任何css一样。

下面是我的代码,这是我的最后代码

代码语言:javascript
复制
<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>

在这里,我输入了传真样例https://i.stack.imgur.com/iIUCo.png

在那之后这个结果

https://i.stack.imgur.com/ukxTI.png](https://i.stack.imgur.com/ukxTI.png])

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-07-03 09:31:24

从列表中删除“传真”字段,

*.xml

代码语言:javascript
复制
   <div t-field="o.partner_id"
                         t-field-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": true}'/>
票数 0
EN

Stack Overflow用户

发布于 2018-07-03 13:29:40

您需要从fax中删除t-options属性,并且可以通过继承原始模板和重写<div t-field="o.partner_id"...元素来实现这一点。

代码语言:javascript
复制
<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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51150899

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档