OmaL
OmaL

Reputation: 5044

Disabling developer mode or debugging feature in openerp?

How can I disable the debugging mode or developer mode for users other than admin? I tried to remove the button 'Activate developer mode', but the problem was, if I add '?debug' after the server address in the address bar, then again the user gets the developer mode.

Upvotes: 3

Views: 2263

Answers (2)

Sudhir Arya
Sudhir Arya

Reputation: 3743

Following code will disable debug mode (Drop-down box) if user is admin (admin ID must be 1. If not then change session.uid === admin_id):

Create one xml file inside your_module/static/src/xml folder and add following code:

<templates>
    <t t-extend="ViewManagerAction">
        <t t-jquery="select.oe_debug_view" t-operation="replace">
            <select t-if="widget.session.uid === 1 and widget.session.debug" class="oe_debug_view"/>
        </t>
    </t>
</templates>

Now go to __openerp__.py and add your xml like this:

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

Restart server, update your module and refresh the page.

You can refer this blog: OpenERP Web Changes.

Upvotes: 5

Priyan RockZ
Priyan RockZ

Reputation: 1615

You tried with logout. default is its remove when we log off.

Upvotes: 0

Related Questions