Author: |
IT-Projects LLC, Ivan Yelizariev |
License: |
Other OSI approved licence |
Branch: |
12.0-sync_woo |
Repository: |
yelizariev/sync-addons |
Dependencies: |
base,
base_automation,
http_routing,
mail,
queue_job,
and
website |
Languages: |
HTML (101, 2.2%),
Python (1800, 39.5%),
XML (2089, 45.9%),
and
reStructuredText (563, 12.4%) |
Other branches: |
11.0-new-website5,
11.0-new-website6,
11.0-rebrand,
11.0-vesion-version,
11.0-zero-price5,
11.0-zero-price6,
12.0-new-website5,
12.0-new-website6,
12.0-rebrand,
12.0-sync-logs,
12.0-sync-no-imports,
12.0-sync-no-imports-2,
12.0-sync-studio-original,
12.0-vesion-version,
12.0-zero-price5,
12.0-zero-price6,
13.0-new-website5,
13.0-new-website6,
13.0-rebrand,
13.0-sync-logs,
13.0-vesion-version,
13.0-zero-price5,
13.0-zero-price6,
14.0-facebook-doc,
14.0-fix-links.odoo,
14.0-fr,
14.0-multi_livechat,
14.0-new-website5,
14.0-new-website6,
14.0-pablo,
14.0-pablo-updates-unlink,
14.0-pre-commit,
14.0-rebrand,
14.0-sync,
14.0-sync-backup,
14.0-sync_facebook,
14.0-sync_facebook-dev,
14.0-sync_task_id-ondelete-cascade,
14.0-sync_telegram,
14.0-sync_telegram-channel-settings,
14.0-sync_telegram-fix,
14.0-sync_viber,
14.0-vesion-version,
15.0-fr,
15.0-links-names,
15.0-multi_livechat-cleanup,
15.0-openapi-fix-access,
15.0-openapi-fix-empty-selection-fields,
15.0-release,
15.0-sync_whatsapp,
sync-studio,
and
sync_1c |
Other repositories: |
SeuMarco/sync-addons,
brain-tec/sync-addons,
em230418/sync-addons,
itpp-labs/sync-addons,
and
trojikman/sync-addons |
<a class="reference external image-reference" href="https://itpp.dev"><img alt="Tested and maintained by IT Projects Labs" src="https://itpp.dev/images/infinity-readme.png" /></a>
<a class="reference external image-reference" href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg">
</a>
<a name="sync-studio"></a>
<h2>Sync Studio</h2>
<p>Synchronize anything with anything:</p>
<ul class="simple">
<li>System X ↔ Odoo</li>
<li>Odoo 1 ↔ Odoo 2</li>
<li>System X ↔ System Y</li>
</ul>
<p>Provides a single place to handle synchronization trigered by one of the following events:</p>
<ul class="simple">
<li><strong>Cron</strong> -- provided by <code>ir.cron</code></li>
<li><strong>DB Event</strong> -- provided by <code>base.automation</code></li>
<li><strong>Incoming webhook</strong> -- provided by <code>ir.actions.server::website_published</code> (search for <code>/website/action</code> in <code>website</code> module)</li>
<li><strong>Manual Triggering</strong> -- provided by <code>ir.actions.server</code>. User needs to click a button to run this action</li>
</ul>
<p>Difference with built-in code evaluation:</p>
<ul class="simple">
<li>Allows to use json format for incomming webhooks</li>
<li>Provides helpers for resource linking. See <em>Links</em> section in <a class="reference external" href="doc/index.rst">doc/index.rst</a></li>
<li>Uses queue_job module as a job broker</li>
<li>Asynchronous calls to split big task into few small ones</li>
<li>Allows repeat job on temporary fails (e.g. when external API is not available)</li>
</ul>
<a name="roadmap"></a>
<h3>Roadmap</h3>
<ul class="simple">
<li>Code widget: show line numbers</li>
<li>Webhooks: add a possibility to retry failed webhook (e.g. to debug code)</li>
</ul>
<a name="developer-hints"></a>
<h3 class="with-subtitle">Developer Hints</h3>
<h3 class="section-subtitle" id="public-webhook-address"><span class="section-subtitle">Public webhook address</span></h3>
<p>If you run Odoo locally and need to test webhook, you can use ssh tunneling:</p>
<ul>
<li><p class="first">Connect your server:</p>
<ul>
<li><p class="first">Edit file <code>/etc/ssh/sshd_config</code>:</p>
<ul class="simple">
<li>Find <code>GatewayPorts</code> attribute and set value to <code>yes</code></li>
</ul>
</li>
<li><p class="first">Restart ssh daemon:</p>
<pre>
<code>service ssh restart</code>
</pre>
</li>
</ul>
</li>
<li><p class="first">Connect to your server with <code>-R</code> attribute:</p>
<pre>
<code>ssh user@yourserver.example -R 0.0.0.0:8069:localhost:8069</code>
</pre>
</li>
</ul>
<p>Now you can set <code>http://yourserver.example:8069</code> as a value for <code>web.base.url</code> in Odoo (menu <code>[[ Settings ]] >> System Parameters</code>). Also, you need to set any value to parameter <a class="reference external" href="https://odoo-source.com/?q=web.base.url.freeze&i=nope&files=&excludeFiles=po%24%7Cpot%24%7Cyml%24%7Cyaml%24%7Ccss%24%7C%2Fstatic%2Flib%2F&repos=odoo">web.base.url.freeze</a></p>
<p>Few more steps requires to use https connection (e.g. telegram api works with https only). In your server do as following:</p>
<ul>
<li><p class="first">Install nginx in your server</p>
</li>
<li><p class="first">Add nginx config:</p>
<pre>
<code>server {
listen 80;
server_name yourserver.example;
location / {
proxy_set_header Host $host;
proxy_pass http://localhost:8069;
}
}</code>
</pre>
</li>
<li><p class="first">Install <a class="reference external" href="https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx.html">certbot</a></p>
</li>
<li><p class="first">Run</p>
<pre>
<code>sudo certbot --nginx</code>
</pre>
</li>
<li><p class="first">Done!</p>
</li>
</ul>
<p>Now set corresponding <code>https://...</code> value for <code>web.base.url</code> parameter.</p>
<a name="questions"></a>
<h3>Questions?</h3>
<p>To get an assistance on this module contact us by email :arrow_right: <a class="reference external" href="mailto:help@itpp.dev">help@itpp.dev</a></p>
<a name="contributors"></a>
<h3>Contributors</h3>
<ul>
<li><p class="first"><a class="reference external" href="https://twitter.com/yelizariev">Ivan Yelizariev</a>:</p>
<blockquote>
<ul class="simple">
<li><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">one::two:</th><td class="field-body">init version of the module</td>
</tr>
</tbody>
</table>
</li>
<li><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">one::two:</th><td class="field-body">redesign module to prevent odoo container escapes</td>
</tr>
</tbody>
</table>
</li>
</ul>
</blockquote>
</li>
</ul>
<a name="further-information"></a>
<h3>Further information</h3>
<p>Odoo Apps Store: <a class="reference external" href="https://apps.odoo.com/apps/modules/12.0/sync/">https://apps.odoo.com/apps/modules/12.0/sync/</a></p>
<p>Notifications on updates: <a class="reference external" href="https://github.com/itpp-labs/sync-addons/commits/12.0/sync.atom">via Atom</a>, <a class="reference external" href="https://blogtrottr.com/?subscribe=https://github.com/itpp-labs/sync-addons/commits/12.0/sync.atom">by Email</a></p>
<p>Tested on <a class="reference external" href="https://github.com/odoo/odoo/commit/3fbfa87df85d6463dfcba47416f360fcdef4448e">Odoo 12.0</a></p>