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:
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
you can restart the server and start the server by python odoo-bin -d database_name -u module_name
or -u all to update all module
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With