This module can be used to synchronize two Odoo database that shares the same code base.
It provides two features:
- a cron task to synchronize the module installed.
- an interface to synchronize data and create IDs mapping, between two instance;
Table of contents
- Go to "Settings > Technical > Parameters > System parameters" and set information regarding the target Odoo instance, and the credencials, with the following keys :
database_synchronization.host
: host of the target Odoo instance, withouthttp://
. set onlylocalhost
or themyerp.mywebsite.tld
.database_synchronization.port
: port the target Odoo instance. Typically8069
for dev instance, or443
for test or production instance.database_synchronization.database
: name of the database.database_synchronization.login
anddatabase_synchronization.password
: credential used for the authentication.
- This module depends on
queue_job
module that requires specific configuration to works properly. Make sure your config file is correctly set. See https://github.com/OCA/queue/tree/12.0/queue_job
You should update your odoo.cfg
file to add a new channel named
root.database_synchronization_install_module
:
[queue_job] channels = root:2,root.database_synchronization_install_module:1
Otherwise, you'll have a non blocking warning in your log, like this one.
WARNING ? odoo.addons.queue_job.jobrunner.channels: unknown channel root.database_synchronization_install_module, using root channel for job 23f6b872-1d2c-4003-bd38-a8486bbec664
TODO
When synchronizing module installation for the first time, it can take a big while. During the installation, some task could be failed. In that case, simply restart the jobs.
File "/home/sylvain/grap_dev/grap-odoo-env-12.0/src/odoo/odoo/addons/base/models/ir_module.py", line 446, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "/home/sylvain/grap_dev/grap-odoo-env-12.0/src/odoo/odoo/addons/base/models/ir_module.py", line 556, in _button_immediate_function raise UserError(_("The server is busy right now, module operations are not possible at" odoo.exceptions.UserError: ('The server is busy right now, module operations are not possible at this time, please try again later.', '')
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
- GRAP
- Sylvain LE GAL (https://www.twitter.com/legalsylvain)
This module is part of the grap/grap-odoo-incubator project on GitHub.
You are welcome to contribute.