Hallo Community,
This is the second time that I encounter this problem. I upgrade my modules multiple times a day when working on them, but sometimes for no apparent reason a view-xml is not loading.
In the logging of the server I get the message that the view is actually loaded, but when I get the error message, or lookup the view in the database, the old xml is still present.
I tried two ways of upgrading modules: using the command line and -u module or using the user interface and select the module and upgrade manually. Both give the same problem.
The only way I manage to work around this problem is uninstalling the module and reinstalling. But this should not be necessary. Certainly because with some modules you can have data loss.
The weird thing for me is that the logging actually confirms that the file is getting loaded, but the xml is not updated to the database. And because the module installs flawlessly after uninstallation sounds to me like the code is correct and is not the problem.
Does anybody had the same problem and knows what causes this? Thank you for your response.
This is not default behavior, I have done thousands of times. It only hapoens to me if the new view has errors. You may check if you also change python files in the same update, in this case you should restart the Odoo service (not server).
I know, this is not the way it should be. Next time this happens (i hope not) i am going to try to remove the view-xml that causes the error so that all the view-records in the database are removed and try after that to reinstall the module. Hope that that does the trick. Because the problem with uninstalling and reinstalling is that you lose all the data in the fields that are in the module.