How upgrading of a Odoo module works?
There is 2 step for upgrading an addons in Odoo,
First, restarting the service. it will upgrade your .py files.
Second, click upgrade button in Apps>youraddonsname. it will upgrade your .xml files.
i create a script for upgrading the XML files. the name is upgrade.sh
#!/bin/sh
for db in $(cat /opt/odoo/scripts/yourlistdbfiles);
do
odoo --addons-path=/opt/odoo/youraddonspath -d $db -u youraddonsname --no-xmlrpc > /opt/odoo/logs/yourlogfiles.log 2>&1 &
sleep 20s && exit &
done
so you just run sh /opt/odoo/script/upgrade.sh after editing your addons and no need to click the upgrade button anymore.
hope this help
I have two databases in odoo DB1 and DB2. I made some changes to existing modules(say module1 and module2) in DB1 through GUI(web client). All those changes were stored to DB1 and were working correctly when I am logged in through DB1.
Now, I made some changes in few files(in same two modules module1 and module2). These modules need to be upgraded in order to load those changes. So, i logged in from DB2 and upgraded those modules. My changes in file loaded correctly and were working correctly when I am logged in through DB2.
But those file changes were loaded only for DB2 and not for DB1.
So, I wanted to know:

How upgrading of a module works?? Does it upgrades only for the database through which the user is logged in and upgraded the module?
And if it is so. Then, is there a way that I can Upgrade my module while retaining all the previous changes that i made through the GUI in that same module?
What are the things that are changed when a module is upgraded?