Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
12828 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

In odoo 13, use

request.session.debug

instead of 

request.debug
Avatar
Abbandona
Risposta migliore

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:

Avatar
Abbandona
Risposta migliore

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.


Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 18
4555
1
mag 16
3947
2
mar 15
13464
0
ago 25
914
0
lug 25
609