0
votes

New Odoo user here.

It's been a few days since I started messing around with Odoo(v12). I managed to build a module, including creating models, views and menus. It's working like a charm, though there is one issue that is really bothering me.

I've read that running odoo-bin with the --dev=all arg -- which requires watchdog, by the way -- is supposed to trigger a server restart whenever .py or .xml files are changed inside one of the addons folders.

The server does restart when I modify PYTHON files, but so far, even after trying it out for hours, I can't seem to make the same thing work for XML files.

For reference, I'm building the openacademy module from the official documentation, and I'd like for the server to read the views from the XML files instead of the database and reload on change, so I can customize the forms and views and see the result without having to upgrade my module every single time.

--dev=all, unfortunately, doesn't seem to work.

Can anyone help?

Edit: here's the full command I'm using to start up Odoo:

py odoo-bin -c odoo.conf --dev=all

P.S: I'm running Odoo 12 source on Windows 10 64bit

1
have you tried? -u <module_name>MohitGhodasara
@MohitGhodasara I have. It doesn't work either.Kyle Sentient
sometimes those things happened because of cache try to do with disabled cacheMohitGhodasara
@kyle-sentient can you show as a command that you using? also, directory permissions and what particular file are you modifying in odoo 12MohitGhodasara
@kyle-sentient looks perfect but one more thing I want to mention is the security file (CSV) if your view or menu is not showing that is because of it.. keep trying and let us know the solution.MohitGhodasara

1 Answers

1
votes

--dev=all actually works in conjunction with watchdog, so if you have watchdog package installed in your running odoo python environment, any change in your addons .py file with cause watchdog to notify running server and the server will reload automatically. You can actually see those messages if you have loglevel set to info. In case view update, changes in xml file doesn't actually reload the server but causing a refresh in the browser automatically updates the view. But, if there is any error in the view definitions, i faced this situation that odoo is not updating the changes. So make sure that there is no error in the xml views and update should be done automatically after page refresh.