跳至内容
菜单
此问题已终结
3 回复
9279 查看

Hi,

Version 8.0

Goal: disable export of records for users

Issue: Working on ACL's for restricting access to ir.exports will display a non modal window reminding that you are not allowed to export. But clicking on the Top right corner X, will close the non modal window, and let you export as much as you want.

How to fix?

 

regards,

 

形象
丢弃
最佳答案

The answer to your question can be found on:

http://change-openerp-web.blogspot.com/2013/08/hide-export-in-more-option-in-openerp-7.html

 

Create XML File Under **static/src/base.xml** in your module and add this code:

    <templates>
            <t t-extend="Sidebar">
                <t t-jquery="a.oe_sidebar_action_a" t-operation="replace">
                    <t t-if="widget.session.uid !== 1">
                    <a t-if="item.label !== 'Export'" 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>
                    </t>
                    <t t-if="widget.session.uid === 1">
                        <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>
                    </t>
                </t>
            </t>
    </templates>

Add this in File **__openerp__.py**:

    'qweb': [ 
        "static/src/base.xml", 
    ]

 

Now restart the server and update your database and refresh the page.

形象
丢弃
最佳答案

We were limited to visit this website, can the content is copied to this forum?

Thanks very much!

形象
丢弃

Just edited my answer with the content of the web

最佳答案

You can take a look to remove_openerp_export from anybox. Not enough karma to post link.

形象
丢弃
相关帖文 回复 查看 活动
7
9月 20
7588
1
11月 17
4212
0
11月 16
4096
1
1月 24
32719
3
12月 15
6895