Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Odoo 12 Development Cookbook - Third Edition

You're reading from  Odoo 12 Development Cookbook - Third Edition

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789618921
Pages 774 pages
Edition 3rd Edition
Languages
Authors (4):
Parth Gajjar Parth Gajjar
Profile icon Parth Gajjar
Alexandre Fayolle Alexandre Fayolle
Profile icon Alexandre Fayolle
Holger Brunn Holger Brunn
Profile icon Holger Brunn
Daniel Reis Daniel Reis
Profile icon Daniel Reis
View More author details
Toc

Table of Contents (26) Chapters close

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

Activating the 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 advance configuration options and fields. These options and fields are hidden in Odoo for better usability because they are not used on a daily basis.

How to do it...

To activate developer mode in the web interface, follow these steps:

  1. Connect to your instance and authenticate as admin.
  2. Go to the Settings menu.
  3. Locate the Share the love card, which should be on the right-hand side of the screen:
  4. Click on the Activate the developer mode link.
  5. Wait for the UI to reload.
Alternative way: 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. Furthermore, if you want 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 do either of the following:

  • Edit the URL and remove that string
  • Use the Deactivate the developer mode link displayed in the Share the love card when the developer mode is active

Lots of developers are using browser extensions to toggle debug mode. By using this, you can toggle debug mode quickly without accessing the settings menu. These extensions are available for Firefox and Chrome. Take a look at the given screenshot, it will help you to identify the plugin in the Chrome store:

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 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

There is a variant of the developer mode: the Developer mode (with assets). This mode behaves like the normal developer mode, but additionally, the JavaScript and CSS code that's 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).

Caution!

Test your add-ons both with and without developer mode, as 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 12 Development Cookbook - Third Edition
Published in: Apr 2019 Publisher: Packt ISBN-13: 9781789618921
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 $15.99/month. Cancel anytime}