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

I wanna detect debug mode in python side of openerp. How to to that?

아바타
취소
베스트 답변

In odoo 13, use

request.session.debug

instead of 

request.debug
아바타
취소
베스트 답변

To enable OpenERP server debug mode, add flag --debug to start parameters. For example:

$ openerp-server -c .your_config --debug

To read more about python and OpenERP debugging, visit these links:

아바타
취소
베스트 답변

Hi,

This is another way. I am not sure in the older versions.

self.user_has_groups('base.group_no_one')

Regards


Global Creative Concepts Tech Co Ltd.


아바타
취소
베스트 답변

This method returns True if debug mode is on, False otherwise :

from odoo.http import request
from odoo import models, api
class SomeClass(models.Model):
     _name = "some.class"
     @api.multi
     def debug_mode(self):
          return request.debug

아바타
취소
관련 게시물 답글 화면 활동
1
4월 18
4547
1
5월 16
3935
2
3월 15
13454
0
8월 25
912
0
7월 25
608