コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
12549 ビュー

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
4290
1
5月 16
3705
2
3月 15
13120
0
7月 25
16
1
7月 25
322