I'm using Odoo 9.
I want to add a new field to my model, and also add that field to my model's form view. Everything goes fine if I do it in two steps :
- add the field to the model
- restart the Odoo server
- ask Odoo to update my module (1)
- add the field to my form view
- ask Odoo to update my module again (2)
At step (1) the field gets created in the database table, and only at step (2) the view is modified to use the new field.
Problem occurs when I want to update the module on another database. I always have a "500 Internal Server Error" and when I look at the log it says that my new field (used by the view) does not exist (because in Odoo's perpective, the module is not updated yet).
That's not much of a problem since I can stop the server and issue this command:
odoo.py -d <name_of_database> -u <name_of_module>
This will update the module in my other database without the need to access the module's page in Odoo. Then I restart the Odoo service and it works like a charm.
THIS IS WHERE THE PROBLEM BEGINS :
My final client runs Odoo on a Window server. I know how to start / stop / restart the Odoo service, but that will not let me update my module. I'd like to issue the same command using odoo.py but I didn't find where and how to do that.
My question is :
- Looking at the way I update my module in two steps, do you think I'm doing it the right way, or is there a better way ?
- Could someone point me to a tutorial about advanced use of Odoo in a Windows environment, as I didn't find anything ?
Many thanks for your help :-)