Odoo中文网|Odoo实施培训

 找回密码
 立即注册
搜索
热搜: Odoo OpenERP 实施
查看: 7743|回复: 0
打印 上一主题 下一主题

crm模块 如何把‘更多’按钮下的导出和删除功能去掉?

[复制链接]

2

主题

2

帖子

25

积分

新手上路

Rank: 1

积分
25
跳转到指定楼层
楼主
发表于 2016-8-12 17:55:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本想通过继承的方法,来隐藏 ‘导出’ 和 ‘删除’ 两个字段,找到该按钮所在源码,这叫人如何继承呀!!!
源码路径:

[img]file:///C:\Users\杨其文\AppData\Roaming\Tencent\Users\2537571302\QQ\WinTemp\RichOle\Z[RB_HC7]47{_BD}UW`)Y2M.png[/img]
[img]file:///C:\Users\杨其文\AppData\Roaming\Tencent\Users\2537571302\QQ\WinTemp\RichOle\Z[RB_HC7]47{_BD}UW`)Y2M.png[/img]
<t t-name="Sidebar">
    <div class="oe_sidebar">
        <t t-foreach="widget.sections" t-as="section">
            <div class="oe_form_dropdown_section">
                <button class="oe_dropdown_toggle oe_dropdown_arrow" t-if="section.name != 'buttons'">
                    <t t-if="section.name == 'files'" t-raw="widget.items[section.name].length || ''"/>
                    <t t-esc="section.label"/>
                    <i class="fa fa-caret-down"/>
                </button>
                <t t-if="section.name == 'buttons'" t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
                    <button t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url"
                        target="_blank" class="oe_sidebar_button oe_highlight">
                        <t t-raw="item.label"/>
                    </button>
                </t>
                <ul class="oe_dropdown_menu">
                    <li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
                        <t t-if="section.name == 'files'">
                            <t t-set="item.title">
                                <b>Attachment : </b><br/>
                                <t t-raw="item.name"/>
                            </t>
                            <t t-if="item.create_uid and item.create_uid[0]" t-set="item.title">
                                <t t-raw="item.title"/><br/>
                                <b>Created by : </b><br/>
                                <t t-raw="item.create_uid[1] + ' ' + item.create_date"/>
                            </t>
                            <t t-if="item.create_uid and item.write_uid and item.create_uid[0] != item.write_uid[0]" t-set="item.title">
                                <t t-raw="item.title"/><br/>
                                <b>Modified by : </b><br/>
                                <t t-raw="item.write_uid[1] + ' ' + item.write_date"/>
                            </t>
                        </t>
                        <a class="oe_sidebar_action_a" t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
                            <t t-raw="item.label"/>
                        </a>
                         <a t-if="widget.view.is_action_enabled('edit') &amp;&amp; section.name == 'files' and !item.callback" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a>
                    </li>
                    <li t-if="widget.view.is_action_enabled('edit') &amp;&amp; section.name == 'files'" class="oe_sidebar_add_attachment">
                        <t t-call="HiddenInputFile">
                            <t t-set="fileupload_id" t-value="widget.fileupload_id"/>
                            <t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
                            <input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/>
                            <input type="hidden" name="id" t-att-value="widget.model_id"/>
                            <input type="hidden" name="session_id" t-att-value="widget.session.session_id" t-if="widget.session.override_session"/>
                            <span>Add...</span>
                        </t>
                    </li>
                </ul>
            </div>
        </t>
    </div>
</t>

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|技术支持|开发手册|Odoo中文网-远鼎旗下odoo培训网站 ( 苏ICP备15039516号 )

GMT+8, 2024-4-20 18:32 , Processed in 0.014124 second(s), 15 queries , Xcache On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表