İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
9282 Görünümler

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,

 

Avatar
Vazgeç
En İyi Yanıt

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.

Avatar
Vazgeç
En İyi Yanıt

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

Thanks very much!

Avatar
Vazgeç

Just edited my answer with the content of the web

En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
7
Eyl 20
7589
1
Kas 17
4213
0
Kas 16
4098
1
Oca 24
32722
3
Ara 15
6895