Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3 Antworten
9295 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Beste Antwort

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

Thanks very much!

Avatar
Verwerfen

Just edited my answer with the content of the web

Beste Antwort

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

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
7
Sept. 20
7593
1
Nov. 17
4220
0
Nov. 16
4106
1
Jan. 24
32737
3
Dez. 15
6905