Author: |
GRAP |
License: |
AGPL-3 |
Branch: |
12.0-REF-pin-ubuntu-20-pre-commit-test |
Repository: |
legalsylvain/grap-odoo-incubator |
Dependencies: |
queue_job |
Languages: |
PO File (148, 12.7%),
Python (709, 60.7%),
XML (236, 20.2%),
and
reStructuredText (75, 6.4%) |
Other branches: |
12.0-ADD-account_invoice_attachment_count,
12.0-ADD-account_invoice_invoice2data,
12.0-ADD-database_synchronization,
12.0-ADD-light-ci,
12.0-ADD-name_search_reset_res_partner,
12.0-ADD-product_uom_package,
12.0-ADD-stock_inventory_disabled_product,
12.0-ADD-stock_picking_report_summary,
12.0-BACKPORT-l10n_fr_pos_cert_v14,
12.0-BACKPORT-wallet,
12.0-CI-FIX-flake-gitlab-github,
12.0-DOC-mobile_kiosk_modules,
12.0-DOC-various-module,
12.0-FIX-CI-flake8,
12.0-FIX-CI-pre-commit-cache,
12.0-FIX-base_company_legal_info-demo-data,
12.0-FIX-database_synchronization-module-uninstalled-disable-monkey-patch,
12.0-FIX-demo-data-uniq,
12.0-FIX-mobile_kiosk_modules,
12.0-FIX-mobile_kiosk_modules-2,
12.0-FIX-name_search_reset_res_partner-search-by-display-name,
12.0-FIX-product_print_category-warning,
12.0-FIX-product_simple_pricelist-display-pricelist-name-in-action,
12.0-FIX-pylint-reloud,
12.0-FIX-stock_internal_use_of_products-bad-company-sequence,
12.0-FIX-stock_picking_quick_quantity_done-action_confirm-multi,
12.0-FIX-various-fixes-joint-buying,
12.0-FIX-various-fixes-joint-buying-2,
12.0-IMP-database_synchronization-add-queue-job,
12.0-IMP-database_synchronization-some-refactor,
12.0-IMP-database_synchronization-various-improvment,
12.0-IMP-database_synchronization-warning-test-readme,
12.0-IMP-product_default_code_res_company_code-disable-feature-for-global-product,
12.0-IMP-product_print_category-adapt-to-template-coop-it-easy,
12.0-IMP-product_simple_pricelist-recursive-pricelist,
12.0-IMP-stock_internal_use_of_products-add-view-line,
12.0-IMP-stock_inventory_valuation-tree-view-valuation,
12.0-META-CI-reduce-execution,
12.0-REF-CI-FULL,
12.0-REF-MOVE-purchase_package_qty,
12.0-REF-copier-2023-03-09,
12.0-REF-database_synchronization-queue_job-refactoring,
12.0-REF-github-action,
12.0-REF-pre-commit,
12.0-REF-replace-purchase_package_qty-by-product_supplierinfo_qty_multiplier,
12.0-REF-website-in-manifest,
12.0-REM-oca_dependencies,
12.0-REM-product_category_type,
12.0-REM-stock_picking_report_summary,
12.0-TEST-CI-failing,
12.0-database-synchronization-IMP,
12.0-database_synchronization-handle-many2many,
12.0-imp-product_print_category-FIX-flake8,
12.0-pos_sector-sector-group-dont-intherit-pos-manager,
12.0-product_print_category-raise-to-print-when-new-category,
12.0-product_simple_pricelist-IMP-ADD-group-to-edit-dates,
12.0-stock_internal_use_of_products-allow-use-case-from-virtual,
and
12.0-test-ci-on-pos_sector |
Other repositories: |
coopiteasy/grap-odoo-incubator,
grap/grap-odoo-incubator,
initOS/grap-odoo-incubator,
and
quentinDupont/grap-odoo-incubator |
<h1 class="title">Database Synchronization</h1>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/grap/grap-odoo-incubator/tree/12.0/database_synchronization"><img alt="grap/grap-odoo-incubator" src="https://img.shields.io/badge/github-grap%2Fgrap--odoo--incubator-lightgray.png?logo=github" /></a></p>
<p>This module can be used to synchronize two Odoo database that shares the
same code base.</p>
<p>It provides two features:</p>
<ul class="simple">
<li>a cron task to synchronize the module installed.</li>
<li>an interface to synchronize data and create IDs mapping, between two instance;</li>
</ul>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<a name="configuration"></a>
<h2><a class="toc-backref" href="#id1">Configuration</a></h2>
<ul class="simple">
<li>Go to "Settings > Technical > Parameters > System parameters" and
set information regarding the target Odoo instance, and the credencials,
with the following keys :</li>
</ul>
<ol class="arabic simple">
<li><code>database_synchronization.host</code> : host of the target Odoo instance, without <code>http://</code>. set only <code>localhost</code> or the <code>myerp.mywebsite.tld</code>.</li>
<li><code>database_synchronization.port</code>: port the target Odoo instance. Typically <code>8069</code> for dev instance, or <code>443</code> for test or production instance.</li>
<li><code>database_synchronization.database</code>: name of the database.</li>
<li><code>database_synchronization.login</code> and <code>database_synchronization.password</code>: credential used for the authentication.</li>
</ol>
<ul class="simple">
<li>This module depends on <code>queue_job</code> module that requires specific
configuration to works properly. Make sure your config file is correctly set.
See <a class="reference external" href="https://github.com/OCA/queue/tree/12.0/queue_job">https://github.com/OCA/queue/tree/12.0/queue_job</a></li>
</ul>
<p>You should update your <code>odoo.cfg</code> file to add a new channel named
<code>root.database_synchronization_install_module</code>:</p>
<pre class="code">
<code class="code">[queue_job]
channels = root:2,root.database_synchronization_install_module:1</code>
</pre>
<p>Otherwise, you'll have a non blocking warning in your log, like this one.</p>
<pre class="code">
<code class="code">WARNING ? odoo.addons.queue_job.jobrunner.channels: unknown channel root.database_synchronization_install_module, using root channel for job 23f6b872-1d2c-4003-bd38-a8486bbec664</code>
</pre>
<a name="usage"></a>
<h2><a class="toc-backref" href="#id2">Usage</a></h2>
<p>TODO</p>
<a name="known-issues-roadmap"></a>
<h2><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h2>
<p>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.</p>
<pre class="code">
<code class="code">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.', '')</code>
</pre>
<a name="bug-tracker"></a>
<h2><a class="toc-backref" href="#id4">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/grap/grap-odoo-incubator/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/grap/grap-odoo-incubator/issues/new?body=module:%20database_synchronization%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
<a name="credits"></a>
<h2><a class="toc-backref" href="#id5">Credits</a></h2>
<a name="authors"></a>
<h3><a class="toc-backref" href="#id6">Authors</a></h3>
<ul class="simple">
<li>GRAP</li>
</ul>
<a name="contributors"></a>
<h3><a class="toc-backref" href="#id7">Contributors</a></h3>
<ul class="simple">
<li>Sylvain LE GAL (<a class="reference external" href="https://www.twitter.com/legalsylvain">https://www.twitter.com/legalsylvain</a>)</li>
</ul>
<a name="maintainers"></a>
<h3><a class="toc-backref" href="#id8">Maintainers</a></h3>
<p>This module is part of the <a class="reference external" href="https://github.com/grap/grap-odoo-incubator/tree/12.0/database_synchronization">grap/grap-odoo-incubator</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>