Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
9274 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
7
сент. 20
7580
1
нояб. 17
4180
0
нояб. 16
4091
1
янв. 24
32694
3
дек. 15
6863