Hi, i want to check if developer mode is active inside a function, so if is active i will send a more descriptive error message inside a function that can raise and exception, and if is not active i will only show a simple error to user.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Two options that come to mind are using has_group('base.group_no_one') on the logged in user, or checking if the URL contains debug=.
Good Luck,
Jake Robinson
Hello
Reinhart
Here you can get your solution.
Write bellow code in your method you can easily get active mode status.
from openerp.http import request
and check weather debug mode active or not.
print "====Checking Debug mode active or not=====", request.debug
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
0
nov. 16
|
6222 | ||
|
0
dec. 23
|
1955 | ||
|
2
jan. 21
|
6333 | ||
Report in custom module
Opgelost
|
|
2
mrt. 20
|
5279 | |
|
1
okt. 18
|
5333 |
Hello
Reinhart
Here you can get your solution.
Write bellow code in your method you can easily get active mode status.
from openerp.http import request
and check weather debug mode active or not.
print "====Checking Debug mode active or not=====", request.debug