Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
7455 มุมมอง

Here's what I'm trying to do: if a user belongs to a certain group, then, the developer mode is activated.

But I can't get to understand which variable I should set. I don't want to reload the page but rather set some variable so that, in the next reload, the developer mode is activated.


Any ideas?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

So, now I know that the "debug" is JavaScript stuff only. There is a variable called "instance.session.debug" that has to be set.

Thus, the problem has become how to get the user's permissions using js. When the user logs in, I want to see if he is part of a certain group and, if so, set the instance.session.debug to true.

I'm building a module to help developers and this would be a really nice fature.


Alternatively, python could reload the page in some way, passing the "debug" parametre into the URL. Is this possible?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

To activate developer mode just add ?debug= param to the url. That's what the link to activate developer mode do. That's why a reload is needed. Developer mode also do not minify the assets, css and js source file will be readable after page reload

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

If you just need the Technical half of the Settings menu, use one of the modules that make that menu persistently available to user with Admin Settings permissions.

https://www.odoo.com/apps?search=technical+menu 

อวตาร
ละทิ้ง
ผู้เขียน

What I want is for every member of a "developer" group to automatically see the "developer" drop down (the one that shows views, etc), without having to go to "about + click on developer mode"

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 16
4040
4
มี.ค. 25
6955
1
พ.ย. 24
822
2
เม.ย. 17
5047
0
มิ.ย. 15
3366