I wanna detect debug mode in python side of openerp. How to to that?
Pertanyaan ini telah diberikan tanda
4
Replies
14549
Tampilan
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
1
Apr 18
|
8492 | ||
|
|
1
Mei 16
|
5099 | ||
|
|
2
Mar 15
|
15106 | ||
|
|
0
Apr 26
|
22 | ||
|
|
0
Apr 26
|
4 |