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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Nov 16
|
6229 | ||
|
0
Des 23
|
1961 | ||
[v10] Open Form from Action in Readonly Mode
Diselesaikan
|
|
2
Jan 21
|
6341 | |
Report in custom module
Diselesaikan
|
|
2
Mar 20
|
5295 | |
How can I create a Store Credit for a Customer?
Diselesaikan
|
|
1
Okt 18
|
5351 |
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