Odoo Help

1

How to detect debug mode in python side?

By
sepdau
on 7/15/13, 8:52 AM 2,694 views

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

2
Antanas
On 7/15/13, 9:16 AM

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:

0
Dan Raoelinarivo
On 1/14/17, 10:49 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 7/15/13, 8:52 AM
Seen: 2694 times
Last updated: 1/14/17, 10:49 AM