Search code examples
odoo

How to update template views in Odoo while developing?


Is there an easy way for updating changes made in a template view when developing a module? Or what's the best approach for having a preview of what I'm coding?

I currently upgrade the module each time I change the template, but it costs me a lot of time.


Solution

  • If you run Odoo with the command-line --dev option, you have the following additional arguments:

    all: all the features below are activated

    XML: read template qweb from XML file directly instead of a database. Once a template has been modified in the database, it will be not be read from the XML file until the next update/init.

    reload: restart the server when python file is updated (may not be detected depending on the text editor used)

    qweb: break in the evaluation of qweb template when a node contains t-debug='debugger'

    (i)p(u)db: start the chosen python debugger in the code when an unexpected error is raised before logging and returning the error.

    See this Click Here

    Thanks