In odoo 8 server “--auto-reload” when work

2020-07-13 06:57发布

问题:

  • Actually In the command of start odoo 8 server.
  • It will provide "--auto-reload" option
  • But actually i don't know how it works and when to work.
  • Please if give me some guideline for that

回答1:

Normally if you change your python code means, you need to restart the server in order to apply the new changes.

--auto-reload parameter is enabled means, you don't need to restart the server. It enables auto-reloading of python files and xml files without having to restart the server. It required pyinotify. It is a Python module for monitoring filesystems changes.

Just add --auto-reload in your configuration file. By default the value will be "false". You don't need to pass any extra arguments. --auto-reload is enough. If everything setup and works properly you will get

openerp.service.server: Watching addons folder /opt/odoo/v8.0/addons
openerp.service.server: AutoReload watcher running

in the server log. Don't forget to install pyinotify package.



回答2:

I found this looking for the same thing, but for odoo 10. Someone will follow the same route, so:

This has been changed in odoo 10 to --dev=reload. BUT you can't specify that in /etc/init.d/odoo itself. Only from the command line.



标签: odoo-8