콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
5442 화면

Hi all,

I'm going into a production state with my odoo. I would like to know how to disable entirely debug mode.

Not debug_mode = False nor debug = False into odoo.conf is working, still if I write ?debug into url I obtain debug data in page.

Thank you in advance


아바타
취소
베스트 답변

try these.. make it available to ADMIN only. been using this one.

<!-- Debug mode -->

    <t t-extend="UserMenu.about">

        <t t-jquery="a.oe_activate_debug_mode" t-operation="replace" />

    </t>


    <!-- DebugView -->

    <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>

아바타
취소
작성자 베스트 답변


EDIT: thank you F.P.

for those who need complete code:

you need to add below lines to /your_module/__openerp__.py

'qweb': [
'static/src/xml/base.xml',
],

then you must add xml file /your_module/static/src/xml/base.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- This will not completely remove debug mode,
simply will not show debug dropdown to non admin users -->

<templates id="remove_debug" xml:space="preserve">

<t t-extend="UserMenu.about">
<t t-jquery="a.oe_activate_debug_mode" t-operation="replace" />
</t>

<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>


아바타
취소
관련 게시물 답글 화면 활동
4
5월 16
9075
6
7월 15
32619
0
8월 25
901
0
7월 25
599
1
7월 25
448