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

巧了我就是萌 提交于 2019-12-06 05:23:15

问题


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



来源:https://stackoverflow.com/questions/29225994/in-odoo-8-server-auto-reload-when-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!