How it works...

Check the following list for all --dev options and their purposes:

  • reload: Whenever you make changes in Python, you need to restart the server to reflect those changes in Odoo. The --dev=reload option will reload the Odoo server automatically when you make changes in any Python file. This feature will not work if you haven't installed the Python watchdog package.
  • qweb: You can create dynamic website pages in Odoo using QWeb templates. In Chapter 15, CMS Website Development, we will see how to develop a web page with the QWeb template. You can debug issues in the QWeb template with the t-debug attribute. The t-debug options will only work if you enable the dev mode with --dev=qweb.
  • werkzeug: Odoo uses werkzeug to handle HTTP requests. Internally, Odoo will catch all exceptions generated by werkzeug. If you use --dev=werkzeug, werkzeug's interactive debugger will be displayed on the web page when the exception is generated.
  • xml: Whenever you make changes in the view structure, you need to reload the server and update the module to apply those changes. With the --dev=xml option, you just need to reload Odoo from the browser; there is no need to restart the server or update the module.
  • pudb|wdb|ipdb|pdb: You can use the Python debugger (PDB) to get more information about the errors. When you use the --dev=pdb option, it will activate the PDB whenever an exception is genarated in Odoo. Odoo supports four Python debuggers: pudb, wdb, ipdb, and pdb.
  • all: If you use --dev=all, all of the preceding options will be enabled.
If you have made changes to the database structure, such as if you have added new fields, the --dev=reload option will not reflect these in the database schema. You need to update the module manually; it only works for Python business logic.

If you add a new view or menu, the --dev=xml option will not reflect this in the user interface. You need to update the module manually. This is very helpful when you are designing the structure of the view or the website page.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset