Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Odoo Development Cookbook

You're reading from   Odoo Development Cookbook Build effective business applications using the latest features in Odoo 17

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781805124276
Length 774 pages
Edition 5th Edition
Languages
Tools
Arrow right icon
Authors (6):
Arrow left icon
Holger Brunn Holger Brunn
Author Profile Icon Holger Brunn
Holger Brunn
Husen Daudi Husen Daudi
Author Profile Icon Husen Daudi
Husen Daudi
Daniel Reis Daniel Reis
Author Profile Icon Daniel Reis
Daniel Reis
Jay Vora Jay Vora
Author Profile Icon Jay Vora
Jay Vora
Parth Gajjar Parth Gajjar
Author Profile Icon Parth Gajjar
Parth Gajjar
Alexandre Fayolle Alexandre Fayolle
Author Profile Icon Alexandre Fayolle
Alexandre Fayolle
+2 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (28) Chapters Close

Preface 1. Chapter 1: Installing the Odoo Development Environment FREE CHAPTER 2. Chapter 2: Managing Odoo Server Instances 3. Chapter 3: Creating Odoo Add-On Modules 4. Chapter 4: Application Models 5. Chapter 5: Basic Server-Side Development 6. Chapter 6: Managing Module Data 7. Chapter 7: Debugging Modules 8. Chapter 8: Advanced Server-Side Development Techniques 9. Chapter 9: Backend Views 10. Chapter 10: Security Access 11. Chapter 11: Internationalization 12. Chapter 12: Automation, Workflows, Emails, and Printing 13. Chapter 13: Web Server Development 14. Chapter 14: CMS Website Development 15. Chapter 15: Web Client Development 16. Chapter 16: The Odoo Web Library (OWL) 17. Chapter 17: In-App Purchasing with Odoo 18. Chapter 18: Automated Test Cases 19. Chapter 19: Managing, Deploying, and Testing with Odoo.sh 20. Chapter 20: Remote Procedure Calls in Odoo 21. Chapter 21: Performance Optimization 22. Chapter 22: Point of Sale 23. Chapter 23: Managing Emails in Odoo 24. Chapter 24: Managing the IoT Box 25. Chapter 25: Web Studio 26. Index 27. Other Books You May Enjoy

Activating Odoo developer tools

When using Odoo as a developer, you need to know how to activate developer mode in the web interface so that you can access the technical settings menu and developer information. Enabling debug mode will expose several advanced configuration options and fields. These options and fields are hidden in Odoo for better usability because they are not used daily.

How to do it...

To activate developer mode in the web interface, perform the following steps:

  1. Connect to your instance and authenticate as admin.
  2. Go to the Settings menu.
  3. Scroll to the bottom and locate the Developer Tools section:
Figure 1.12 – Links to activate different developer modes

Figure 1.12 – Links to activate different developer modes

  1. Click Activate the developer mode.
  2. Wait for the UI to reload.

Alternative way

It is also possible to activate developer mode by editing the URL. Before the # sign, insert ?debug=1. For example, if your current URL is http://localhost:8069/web#menu_id=102&action=94 and you want to enable developer mode, then you need to change that URL to http://localhost:8069/web?debug=1#menu_id=102&action=94. Furthermore, if you want to use debug mode with assets, then change the URL to http://localhost:8069/web?debug=assets#menu_id=102&action=94.

To exit developer mode, you can perform any one of the following operations:

  • Edit the URL and write ?debug=0 in the query string
  • Use Deactivate the developer mode from the same place in the Settings menu
  • Click on the bug icon in the top menu and click on the Leave Developer Tools option

Lots of developers are using browser extensions to toggle debug mode. By doing this, you can toggle debug mode quickly without accessing the Settings menu. These extensions are available for Firefox and Chrome. The following screenshot shows one such plugin you can use and find in the Chrome store:

Figure 1.13 – Browser extension for debug mode

Figure 1.13 – Browser extension for debug mode

Note

The behavior of the debug mode has changed since Odoo v13. Since v13, the status of debug mode is stored in the session, implying that even if you have removed ?debug from the URL, debug mode will still be active.

How it works...

In developer mode, two things happen:

  • You get tooltips when hovering over a field in a form view or over a column in a list view. These provide 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 you access to technical information about the model being displayed, the various related view definitions, the workflow, custom filter management, and so on.

There is a variant of developer mode called Developer mode (with assets). This mode behaves like the normal developer mode, but the JavaScript and CSS code that’s sent to the browser is not minified, which means that the web development tools of your browser can easily be used to debug the JavaScript code (more on this in Chapter 15, Web Client Development).

Caution!

Test your add-ons both with and without developer mode since the unminified versions of the JavaScript libraries can hide bugs that only bite you in the minified version.

You have been reading a chapter from
Odoo Development Cookbook - Fifth Edition
Published in: May 2024
Publisher: Packt
ISBN-13: 9781805124276
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image