update module or xml without server restart

1/. according to odoo-mate, watchdog is one of the good solution. Of course you need know how to set it up. (pip3 install watchdog)

https://www.youtube.com/watch?v=SKwl_pSBy9c  

 

2/. another choice would be Pyinotify (sudo pip3 install inotify​)

https://github.com/seb-m/pyinotify/wiki

--auto-reload

 

3/. or add --dev reload (odoo-bin --dev reload)

https://www.odoo.com/documentation/12.0/reference/cmdline.html

 

Here are some conditions on the server restart requirment if above 3 options don't apply

 

1/. For the change of .py file, any coding changes without modifing any fields in the database, you need to restart web server

2/. For the change of .py file, any coding changes with modifing any fields in the database such as change the field name or adding a new field, you need to restart web server and database server  

3/. For the change of .xml file, Upgrade your module in App store, if it is involving a newly added field, you need to restart database server as well.

4/. For the change of .js file, just press Ctrl F5 or clear cache in the browser if nothing happened.

 

ValueError: Field 'nameofthefield' does not exist. This problem is most like xml syntax problem. The way to solve it is comment out the newly added xml code. Go to model to see if the field is changed or added.