Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Disable Export

8.0
By
Patrick Placentino
on 10/14/14, 5:28 AM 1,416 views

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,

 

0
spring55156
On 10/17/14, 10:03 PM

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

Pau Ubach
on 10/23/14, 5:18 AM
0
Carlos Liébana Anero
On 11/24/14, 7:01 AM

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

0
Pau Ubach
On 10/14/14, 5:54 AM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/14/14, 5:28 AM
Seen: 1416 times
Last updated: 3/16/15, 8:10 AM