官术网_书友最值得收藏!

Activating the Odoo developer tools

When using Odoo as a developer, you need to know how to activate Developer Mode in the web interface to access the advanced settings menu and developer information.

How to do it...

To activate Developer Mode in the web interface:

  1. Connect to your instance and authenticate (not necessarily as admin; this function is available to all users, but the Administrator has more tools available).
  2. Click on the down arrow next to your user name in the top right corner of the page .
    How to do it...
  3. In the drop-down menu, click on About.
  4. In the dialog box which is displayed, click on Activate the developer mode in the top right corner.
    How to do it...

    Note

    It is also possible to activate the developer mode by editing the URL: before the # sign, insert ?debug=. For instance, if you are starting from: http://localhost:8069/web#menu_id=102&action=94, then you need to change this to: http://localhost:8069/web?debug=#menu_id=102&action=94.

  5. To exit developer mode, you can edit the URL and remove that string, close your browser tab and open a new one, or use the Leave Debug Mode option at the bottom of the debug drop-down menu next to the user menu in the top right of the screen.
    How to do it...

How it works...

When in developer mode, three things happen:

  • The JavaScript and CSS code sent to the browser is not minified, which means that the web development tools of your browser are easy to use for debugging the JavaScript code (more on this in Chapter 15, Web Client Development).
  • You get tooltips when hovering over a field in a form view or over a column in list view providing technical information about the field (internal name, type, and so on).
  • A drop-down menu with a Bug icon is displayed next to the user's menu in the top right corner giving access to technical information about the model being displayed, the various related view definitions, the workflow, custom filter management, and so on.

Note

Caution!

Test your addons both with and without developer mode, as the unminified versions of the JavaScript libraries can hide bugs which only bite you in the minified version.

主站蜘蛛池模板: 乐清市| 克什克腾旗| 宕昌县| 庆云县| 镇巴县| 水城县| 绥芬河市| 阜城县| 金昌市| 宁夏| 栾川县| 台前县| 县级市| 赫章县| 肇州县| 龙岩市| 余江县| 庐江县| 江永县| 惠安县| 屏山县| 浑源县| 原阳县| 闻喜县| 镇坪县| 抚顺市| 秭归县| 峨边| 朝阳县| 新乡县| 聂荣县| 靖西县| 三江| 蕲春县| 水富县| 诸城市| 都安| 赤壁市| 黄石市| 香港 | 林甸县|