Search 1.9 billion lines of Odoo code on GitHub

multi_livechat

Author: IT Projects Labs, Ivan Yelizariev
License: Other OSI approved licence
Branch: 15.0-sync_viber
Repository: brain-tec/sync-addons
Dependencies: mail, and sync
Languages: JavaScript (191, 37.7%), Python (206, 40.6%), XML (67, 13.2%), and reStructuredText (43, 8.5%)
Other branches: 13.0, 13.0-exodus-17, 13.0-exodus-19, 14.0, 14.0-exodus-17, 14.0-exodus-19, 15.0, 15.0-sync_odoo2odoo, 15.0-sync_telegram, and 16.0
Other repositories: SeuMarco/sync-addons, em230418/sync-addons, itpp-labs/sync-addons, trojikman/sync-addons, and yelizariev/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="multichannel-live-chat"></a> <h2>Multichannel Live Chat</h2> <p>Base module to implement Live Chat through different channels (Telegram, WhatsApp, Instragram, etc.).</p> <a name="usage"></a> <h3>Usage</h3> <p>Add following code to your module. Replace MODULE and NAME for your custom values, e.g.</p> <ul class="simple"> <li><cite>MODULE</cite> is <cite>sync_telegram</cite></li> <li><cite>NAME</cite> is <cite>telegram</cite></li> </ul> <a name="module-manifest-py"></a> <h4>MODULE/__manifest__.py</h4> <pre> <code lang="py">&quot;depends&quot;: [&quot;multi_livechat&quot;], &quot;assets&quot;: { &quot;web.assets_backend&quot;: [ &quot;MODULE/static/src/models/discuss/discuss.js&quot;, &quot;MODULE/static/src/models/discuss_sidebar_category/discuss_sidebar_category.js&quot;, ], },</code> </pre> <a name="module-models-init-py"></a> <h4>MODULE/models/__init__.py</h4> <pre> <code lang="py">from . import res_users_settings from . import mail_channel</code> </pre> <a name="module-models-res-users-settings-py"></a> <h4>MODULE/models/res_users_settings.py</h4> <pre> <code lang="py">from odoo import fields, models class ResUsersSettings(models.Model): _inherit = 'res.users.settings' is_discuss_sidebar_category_NAME_open = fields.Boolean(&quot;Is category NAME open&quot;, default=True)</code> </pre> <a name="module-models-mail-channel-py"></a> <h4>MODULE/models/mail_channel.py</h4> <pre> <code lang="py">from odoo import fields, models class MailChannel(models.Model): _inherit = &quot;mail.channel&quot; channel_type = fields.Selection( selection_add=[(&quot;multi_livechat_NAME&quot;, &quot;Channel Description&quot;)], ondelete={&quot;multi_livechat_NAME&quot;: &quot;cascade&quot;} )</code> </pre> <a name="module-static-src-models-discuss-discuss-js"></a> <h4>MODULE/static/src/models/discuss/discuss.js</h4> <pre> <code lang="js">/** &#64;odoo-module **/ import { registerFieldPatchModel } from '&#64;mail/model/model_core'; import { one2one } from '&#64;mail/model/model_field'; registerFieldPatchModel('mail.discuss', 'MODULE/static/src/models/discuss/discuss.js', { categoryMLChat_NAME: one2one('mail.discuss_sidebar_category', { inverse: 'discussAsMLChat_NAME', isCausal: true, }), });</code> </pre> <a name="module-static-src-models-discuss-sidebar-category-discuss-sidebar-category-js"></a> <h4>MODULE/static/src/models/discuss_sidebar_category/discuss_sidebar_category.js</h4> <pre> <code lang="js">/** &#64;odoo-module **/ import { registerFieldPatchModel, registerIdentifyingFieldsPatch } from '&#64;mail/model/model_core'; import { one2one } from '&#64;mail/model/model_field'; registerFieldPatchModel('mail.discuss_sidebar_category', 'MODULE', { discussAsMLChat_NAME: one2one('mail.discuss', { inverse: 'categoryMLChat_NAME', readonly: true, }), }); registerIdentifyingFieldsPatch('mail.discuss_sidebar_category', 'MODULE', identifyingFields =&gt; { identifyingFields[0].push('discussAsMLChat_NAME'); });</code> </pre> <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&#64;itpp.dev">help&#64;itpp.dev</a></p> <a name="further-information"></a> <h3>Further information</h3> <p>Apps store: <a class="reference external" href="https://apps.odoo.com/apps/modules/14.0/multi_livechat/">https://apps.odoo.com/apps/modules/14.0/multi_livechat/</a></p> <p>Notifications on updates: <a class="reference external" href="https://github.com/itpp-labs/sync-addons/commits/14.0/multi_livechat.atom">via Atom</a>, <a class="reference external" href="https://blogtrottr.com/?subscribe=https://github.com/itpp-labs/sync-addons/commits/14.0/multi_livechat.atom">by Email</a></p> <p>Tested on <a class="reference external" href="https://github.com/odoo/odoo/commit/3780fa2af5d5f6cac91e419bcab69a253db280bd">Odoo 14.0</a></p>