Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In odoo 8 server "--auto-reload" when work

Tags:

odoo-8

  • 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
like image 399
Virbhadrasinh Avatar asked Mar 24 '15 06:03

Virbhadrasinh


2 Answers

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.

like image 198
no coder Avatar answered Jan 04 '23 12:01

no coder


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.

like image 33
WeeDom Avatar answered Jan 04 '23 11:01

WeeDom