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

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
апр. 18
4543
1
мая 16
3926
2
мар. 15
13443
0
авг. 25
909
0
июл. 25
603