odoo-addon-mail-gateway 16.0.1.2.0__py3-none-any.whl → 17.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-mail-gateway might be problematic. Click here for more details.
- odoo/addons/mail_gateway/README.rst +36 -25
- odoo/addons/mail_gateway/__init__.py +0 -1
- odoo/addons/mail_gateway/__manifest__.py +6 -14
- odoo/addons/mail_gateway/controllers/discuss.py +2 -2
- odoo/addons/mail_gateway/controllers/gateway.py +3 -0
- odoo/addons/mail_gateway/hooks.py +3 -3
- odoo/addons/mail_gateway/i18n/es.po +6 -309
- odoo/addons/mail_gateway/i18n/it.po +5 -336
- odoo/addons/mail_gateway/i18n/mail_gateway.pot +149 -84
- odoo/addons/mail_gateway/models/__init__.py +4 -3
- odoo/addons/mail_gateway/models/{mail_channel.py → discuss_channel.py} +30 -8
- odoo/addons/mail_gateway/models/ir_websocket.py +1 -1
- odoo/addons/mail_gateway/models/mail_gateway.py +4 -4
- odoo/addons/mail_gateway/models/mail_gateway_abstract.py +2 -2
- odoo/addons/mail_gateway/models/mail_message.py +9 -8
- odoo/addons/mail_gateway/models/mail_notification.py +3 -3
- odoo/addons/mail_gateway/models/mail_thread.py +39 -7
- odoo/addons/mail_gateway/models/res_partner.py +10 -18
- odoo/addons/mail_gateway/models/res_users.py +0 -1
- odoo/addons/mail_gateway/models/res_users_settings.py +12 -0
- odoo/addons/mail_gateway/readme/CONTRIBUTORS.md +2 -0
- odoo/addons/mail_gateway/readme/{CREDITS.rst → CREDITS.md} +2 -1
- odoo/addons/mail_gateway/readme/DESCRIPTION.md +8 -0
- odoo/addons/mail_gateway/readme/USAGE.md +12 -0
- odoo/addons/mail_gateway/security/ir.model.access.csv +4 -2
- odoo/addons/mail_gateway/security/security.xml +9 -9
- odoo/addons/mail_gateway/static/description/index.html +39 -26
- odoo/addons/mail_gateway/static/src/components/chatter/chatter.esm.js +15 -0
- odoo/addons/mail_gateway/static/src/components/chatter/chatter.xml +36 -22
- odoo/addons/mail_gateway/static/src/components/composer/composer.esm.js +108 -0
- odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.esm.js +35 -22
- odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.xml +3 -5
- odoo/addons/mail_gateway/static/src/components/message/message.xml +15 -15
- odoo/addons/mail_gateway/static/src/components/message/message_patch.esm.js +67 -0
- odoo/addons/mail_gateway/static/src/components/message_notification_popover_content/message_notification_popover_content.xml +3 -7
- odoo/addons/mail_gateway/static/src/core/common/composer_model_patch.esm.js +23 -0
- odoo/addons/mail_gateway/static/src/core/common/discuss_app_model_patch.esm.js +31 -0
- odoo/addons/mail_gateway/static/src/core/common/message_actions.esm.js +23 -0
- odoo/addons/mail_gateway/static/src/core/common/message_model_patch.esm.js +21 -0
- odoo/addons/mail_gateway/static/src/core/common/notification_model_patch.esm.js +35 -0
- odoo/addons/mail_gateway/static/src/core/common/persona_model_patch.esm.js +12 -0
- odoo/addons/mail_gateway/static/src/core/common/store_service_patch.esm.js +14 -0
- odoo/addons/mail_gateway/static/src/core/common/thread_model_patch.esm.js +49 -0
- odoo/addons/mail_gateway/static/src/core/common/thread_service_patch.esm.js +19 -0
- odoo/addons/mail_gateway/static/src/core/web/discuss_app_category_model_patch.esm.js +21 -0
- odoo/addons/mail_gateway/static/src/core/web/discuss_sidebar_categories.esm.js +16 -0
- odoo/addons/mail_gateway/static/src/core/web/discuss_sidebar_category_item_patch.xml +12 -0
- odoo/addons/mail_gateway/static/src/core/web/gateway_core_web_service.esm.js +40 -0
- odoo/addons/mail_gateway/static/src/models/gateway.esm.js +21 -14
- odoo/addons/mail_gateway/static/src/models/gateway_channel.esm.js +21 -13
- odoo/addons/mail_gateway/static/src/models/gateway_follower.esm.js +24 -0
- odoo/addons/mail_gateway/views/mail_gateway.xml +4 -4
- odoo/addons/mail_gateway/views/mail_guest_views.xml +15 -0
- odoo/addons/mail_gateway/wizards/mail_compose_gateway_message.py +19 -4
- odoo/addons/mail_gateway/wizards/mail_compose_gateway_message.xml +1 -2
- odoo/addons/mail_gateway/wizards/mail_guest_manage.py +2 -3
- odoo/addons/mail_gateway/wizards/mail_guest_manage.xml +2 -2
- odoo/addons/mail_gateway/wizards/mail_message_gateway_link.py +0 -1
- odoo/addons/mail_gateway/wizards/mail_message_gateway_send.py +0 -1
- {odoo_addon_mail_gateway-16.0.1.2.0.dist-info → odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info}/METADATA +43 -31
- odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info/RECORD +74 -0
- {odoo_addon_mail_gateway-16.0.1.2.0.dist-info → odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info}/WHEEL +1 -1
- odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
- odoo/addons/mail_gateway/readme/CONTRIBUTORS.rst +0 -2
- odoo/addons/mail_gateway/readme/DESCRIPTION.rst +0 -5
- odoo/addons/mail_gateway/readme/USAGE.rst +0 -9
- odoo/addons/mail_gateway/static/src/components/composer/composer.xml +0 -24
- odoo/addons/mail_gateway/static/src/components/discuss_sidebar/discuss_sidebar.xml +0 -17
- odoo/addons/mail_gateway/static/src/models/channel.esm.js +0 -33
- odoo/addons/mail_gateway/static/src/models/channel_member_view.esm.js +0 -39
- odoo/addons/mail_gateway/static/src/models/chatter.esm.js +0 -41
- odoo/addons/mail_gateway/static/src/models/composer.esm.js +0 -32
- odoo/addons/mail_gateway/static/src/models/composer_gateway_follower.esm.js +0 -32
- odoo/addons/mail_gateway/static/src/models/composer_view.esm.js +0 -103
- odoo/addons/mail_gateway/static/src/models/discuss.esm.js +0 -51
- odoo/addons/mail_gateway/static/src/models/discuss_sidebar_category.esm.js +0 -128
- odoo/addons/mail_gateway/static/src/models/discuss_sidebar_category_item.esm.js +0 -51
- odoo/addons/mail_gateway/static/src/models/gateway_channel_view.esm.js +0 -15
- odoo/addons/mail_gateway/static/src/models/guest.esm.js +0 -10
- odoo/addons/mail_gateway/static/src/models/message.esm.js +0 -76
- odoo/addons/mail_gateway/static/src/models/message_action.esm.js +0 -45
- odoo/addons/mail_gateway/static/src/models/message_action_list.esm.js +0 -37
- odoo/addons/mail_gateway/static/src/models/message_action_view.esm.js +0 -91
- odoo/addons/mail_gateway/static/src/models/message_view.esm.js +0 -13
- odoo/addons/mail_gateway/static/src/models/messaging_initializer.esm.js +0 -24
- odoo/addons/mail_gateway/static/src/models/notification.esm.js +0 -20
- odoo/addons/mail_gateway/static/src/models/partner.esm.js +0 -11
- odoo/addons/mail_gateway/static/src/models/thread.esm.js +0 -77
- odoo_addon_mail_gateway-16.0.1.2.0.dist-info/RECORD +0 -77
- odoo_addon_mail_gateway-16.0.1.2.0.dist-info/top_level.txt +0 -1
|
@@ -15,21 +15,21 @@
|
|
|
15
15
|
string="Integrate Webhook"
|
|
16
16
|
icon="fa-plug"
|
|
17
17
|
name="set_webhook"
|
|
18
|
-
|
|
18
|
+
invisible="not can_set_webhook or integrated_webhook_state"
|
|
19
19
|
/>
|
|
20
20
|
<button
|
|
21
21
|
type="object"
|
|
22
22
|
string="Update Webhook"
|
|
23
23
|
name="update_webhook"
|
|
24
24
|
icon="fa-refresh"
|
|
25
|
-
|
|
25
|
+
invisible="not can_set_webhook or integrated_webhook_state != 'integrated'"
|
|
26
26
|
/>
|
|
27
27
|
<button
|
|
28
28
|
type="object"
|
|
29
29
|
string="Remove Webhook"
|
|
30
30
|
name="remove_webhook"
|
|
31
31
|
icon="fa-remove"
|
|
32
|
-
|
|
32
|
+
invisible="not integrated_webhook_state"
|
|
33
33
|
/>
|
|
34
34
|
</div>
|
|
35
35
|
<field name="can_set_webhook" invisible="1" />
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<field name="arch" type="xml">
|
|
74
74
|
<tree>
|
|
75
75
|
<field name="name" />
|
|
76
|
-
<field name="token" />
|
|
76
|
+
<field name="token" password="True" />
|
|
77
77
|
</tree>
|
|
78
78
|
</field>
|
|
79
79
|
</record>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<odoo>
|
|
3
|
+
<record id="mail_guest_view_form" model="ir.ui.view">
|
|
4
|
+
<field name="inherit_id" ref="mail.mail_guest_view_form" />
|
|
5
|
+
<field name="model">mail.guest</field>
|
|
6
|
+
<field name="arch" type="xml">
|
|
7
|
+
<group position="inside">
|
|
8
|
+
<group name="gateway_info" invisible="not gateway_id">
|
|
9
|
+
<field name="gateway_id" />
|
|
10
|
+
<field name="gateway_token" password="1" readonly="1" />
|
|
11
|
+
</group>
|
|
12
|
+
</group>
|
|
13
|
+
</field>
|
|
14
|
+
</record>
|
|
15
|
+
</odoo>
|
|
@@ -61,10 +61,25 @@ class MailComposeGatewayMessage(models.TransientModel):
|
|
|
61
61
|
string="Bcc",
|
|
62
62
|
)
|
|
63
63
|
|
|
64
|
-
def
|
|
64
|
+
def _partner_ids_domain(self):
|
|
65
|
+
return [("id", "in", self.env.context.get("default_partner_ids", []))]
|
|
66
|
+
|
|
67
|
+
def _prepare_mail_values_dynamic(self, res_ids):
|
|
65
68
|
self.ensure_one()
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
values = super()._prepare_mail_values_dynamic(res_ids)
|
|
70
|
+
values[res_ids[0]]["gateway_notifications"] = [
|
|
71
|
+
{
|
|
72
|
+
"partner_id": channel.partner_id.id,
|
|
73
|
+
"channel_type": "gateway",
|
|
74
|
+
"gateway_channel_id": channel.id,
|
|
75
|
+
}
|
|
76
|
+
for channel in self.wizard_channel_ids
|
|
77
|
+
]
|
|
78
|
+
return values
|
|
79
|
+
|
|
80
|
+
def _prepare_mail_values_static(self):
|
|
81
|
+
values = super()._prepare_mail_values_static()
|
|
82
|
+
values["gateway_notifications"] = [
|
|
68
83
|
{
|
|
69
84
|
"partner_id": channel.partner_id.id,
|
|
70
85
|
"channel_type": "gateway",
|
|
@@ -72,4 +87,4 @@ class MailComposeGatewayMessage(models.TransientModel):
|
|
|
72
87
|
}
|
|
73
88
|
for channel in self.wizard_channel_ids
|
|
74
89
|
]
|
|
75
|
-
return
|
|
90
|
+
return values
|
|
@@ -5,7 +5,6 @@ from odoo import fields, models
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class MailGuestManage(models.TransientModel):
|
|
8
|
-
|
|
9
8
|
_name = "mail.guest.manage"
|
|
10
9
|
_description = "Assign gateway guest to a partner"
|
|
11
10
|
|
|
@@ -31,10 +30,10 @@ class MailGuestManage(models.TransientModel):
|
|
|
31
30
|
"gateway_token": self.guest_id.gateway_token,
|
|
32
31
|
}
|
|
33
32
|
)
|
|
34
|
-
for member in self.env["
|
|
33
|
+
for member in self.env["discuss.channel.member"].search(
|
|
35
34
|
[("guest_id", "=", self.guest_id.id)]
|
|
36
35
|
):
|
|
37
|
-
self.env["
|
|
36
|
+
self.env["discuss.channel.member"].create(
|
|
38
37
|
self._channel_member_vals(member, partner)
|
|
39
38
|
)
|
|
40
39
|
member.unlink()
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
string="Create new partner"
|
|
18
18
|
class="btn-primary"
|
|
19
19
|
type="object"
|
|
20
|
-
|
|
20
|
+
invisible="partner_id"
|
|
21
21
|
/>
|
|
22
22
|
<button
|
|
23
23
|
name="merge_partner"
|
|
24
24
|
string="Merge"
|
|
25
25
|
class="btn-primary"
|
|
26
|
-
|
|
26
|
+
invisible="not partner_id"
|
|
27
27
|
type="object"
|
|
28
28
|
/>
|
|
29
29
|
<button string="Cancel" class="btn-default" special="cancel" />
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-mail_gateway
|
|
3
|
-
Version:
|
|
4
|
-
|
|
3
|
+
Version: 17.0.1.0.0.2
|
|
4
|
+
Requires-Python: >=3.10
|
|
5
|
+
Requires-Dist: odoo>=17.0a,<17.1dev
|
|
6
|
+
Summary: Base module for gateway communications
|
|
5
7
|
Home-page: https://github.com/OCA/social
|
|
8
|
+
License: AGPL-3
|
|
6
9
|
Author: Creu Blanca,Dixmit,Odoo Community Association (OCA)
|
|
7
10
|
Author-email: support@odoo-community.org
|
|
8
|
-
License: AGPL-3
|
|
9
11
|
Classifier: Programming Language :: Python
|
|
10
12
|
Classifier: Framework :: Odoo
|
|
11
|
-
Classifier: Framework :: Odoo ::
|
|
13
|
+
Classifier: Framework :: Odoo :: 17.0
|
|
12
14
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
Description-Content-Type: text/x-rst
|
|
16
|
+
|
|
17
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
18
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
19
|
+
:alt: Odoo Community Association
|
|
15
20
|
|
|
16
21
|
============
|
|
17
22
|
Mail Gateway
|
|
@@ -22,32 +27,35 @@ Mail Gateway
|
|
|
22
27
|
!! This file is generated by oca-gen-addon-readme !!
|
|
23
28
|
!! changes will be overwritten. !!
|
|
24
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
25
|
-
!! source digest: sha256:
|
|
30
|
+
!! source digest: sha256:090c115a21a87266ff44c47592dc84c631afe5c2d4780e17abc731f918ae6c38
|
|
26
31
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
32
|
|
|
28
33
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
29
34
|
:target: https://odoo-community.org/page/development-status
|
|
30
35
|
:alt: Beta
|
|
31
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
36
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
32
37
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
33
38
|
:alt: License: AGPL-3
|
|
34
39
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
|
|
35
|
-
:target: https://github.com/OCA/social/tree/
|
|
40
|
+
:target: https://github.com/OCA/social/tree/17.0/mail_gateway
|
|
36
41
|
:alt: OCA/social
|
|
37
42
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
38
|
-
:target: https://translation.odoo-community.org/projects/social-
|
|
43
|
+
:target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_gateway
|
|
39
44
|
:alt: Translate me on Weblate
|
|
40
45
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
41
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=
|
|
46
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=17.0
|
|
42
47
|
:alt: Try me on Runboat
|
|
43
48
|
|
|
44
49
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
45
50
|
|
|
46
|
-
This module will allow you to integrate an external chat system in your
|
|
47
|
-
It requires extra modules with the specific configuration
|
|
51
|
+
This module will allow you to integrate an external chat system in your
|
|
52
|
+
Odoo system. It requires extra modules with the specific configuration
|
|
53
|
+
of each chat system, like mail_gateway_telegram or
|
|
54
|
+
mail_gateway_whatsapp.
|
|
48
55
|
|
|
49
|
-
This way, a group of users can respond customers or any other set
|
|
50
|
-
|
|
56
|
+
This way, a group of users can respond customers or any other set of
|
|
57
|
+
partners within Odoo, but the messages will be sent through the external
|
|
58
|
+
chat system.
|
|
51
59
|
|
|
52
60
|
**Table of contents**
|
|
53
61
|
|
|
@@ -57,15 +65,18 @@ of partners within Odoo, but the messages will be sent through the external chat
|
|
|
57
65
|
Usage
|
|
58
66
|
=====
|
|
59
67
|
|
|
60
|
-
When external messages are received, they will be directly sent to the
|
|
61
|
-
Answering to these messages will send the answer to the
|
|
62
|
-
We can assign this messages to any record using the
|
|
63
|
-
Also, we can assign the sender to a partner using the
|
|
68
|
+
When external messages are received, they will be directly sent to the
|
|
69
|
+
discuss menu. Answering to these messages will send the answer to the
|
|
70
|
+
external contact. We can assign this messages to any record using the
|
|
71
|
+
message actions. Also, we can assign the sender to a partner using the
|
|
72
|
+
followers menu and selecting the partner.
|
|
64
73
|
|
|
65
|
-
On a standard record associated to a partner with external chat, we can
|
|
66
|
-
|
|
74
|
+
On a standard record associated to a partner with external chat, we can
|
|
75
|
+
send messages to the external contact directly selecting the methods of
|
|
76
|
+
the partner. To use this, we just need to use the
|
|
67
77
|
|
|
68
|
-
It is recomended to enable chatter notification to all users that will
|
|
78
|
+
It is recomended to enable chatter notification to all users that will
|
|
79
|
+
receive messages from gateways.
|
|
69
80
|
|
|
70
81
|
Bug Tracker
|
|
71
82
|
===========
|
|
@@ -73,7 +84,7 @@ Bug Tracker
|
|
|
73
84
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
|
|
74
85
|
In case of trouble, please check there if your issue has already been reported.
|
|
75
86
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
76
|
-
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_gateway%0Aversion:%
|
|
87
|
+
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_gateway%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
77
88
|
|
|
78
89
|
Do not contact contributors directly about support or help with technical issues.
|
|
79
90
|
|
|
@@ -81,24 +92,25 @@ Credits
|
|
|
81
92
|
=======
|
|
82
93
|
|
|
83
94
|
Authors
|
|
84
|
-
|
|
95
|
+
-------
|
|
85
96
|
|
|
86
97
|
* Creu Blanca
|
|
87
98
|
* Dixmit
|
|
88
99
|
|
|
89
100
|
Contributors
|
|
90
|
-
|
|
101
|
+
------------
|
|
91
102
|
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
- Enric Tobella
|
|
104
|
+
- Olga Marco
|
|
94
105
|
|
|
95
106
|
Other credits
|
|
96
|
-
|
|
107
|
+
-------------
|
|
97
108
|
|
|
98
|
-
This work has been funded by AEOdoo (Asociación Española de Odoo -
|
|
109
|
+
This work has been funded by AEOdoo (Asociación Española de Odoo -
|
|
110
|
+
https://www.aeodoo.org)
|
|
99
111
|
|
|
100
112
|
Maintainers
|
|
101
|
-
|
|
113
|
+
-----------
|
|
102
114
|
|
|
103
115
|
This module is maintained by the OCA.
|
|
104
116
|
|
|
@@ -110,6 +122,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
110
122
|
mission is to support the collaborative development of Odoo features and
|
|
111
123
|
promote its widespread use.
|
|
112
124
|
|
|
113
|
-
This module is part of the `OCA/social <https://github.com/OCA/social/tree/
|
|
125
|
+
This module is part of the `OCA/social <https://github.com/OCA/social/tree/17.0/mail_gateway>`_ project on GitHub.
|
|
114
126
|
|
|
115
127
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
odoo/addons/mail_gateway/README.rst,sha256=E3Qr--X4CqkRWOzA_NA_0YDLlIiAnlL9F01M15WXH3U,3968
|
|
2
|
+
odoo/addons/mail_gateway/__init__.py,sha256=YSvMxJKxO12COznncWY7G8fwk4rMw_OT9jIPoWrMjzA,103
|
|
3
|
+
odoo/addons/mail_gateway/__manifest__.py,sha256=vkrNkh2y3U4tkC5vpm5gTx4jy6Us056FmXKF6pNGX14,1039
|
|
4
|
+
odoo/addons/mail_gateway/hooks.py,sha256=hzYop0HgmZ70EFqRsvm2rYNIvN0elqBDHtj7jcBQA0M,357
|
|
5
|
+
odoo/addons/mail_gateway/controllers/__init__.py,sha256=jytg2ehJRiv4skWOQoHQN0l7zCIHKSH_bF8tmsIzyLE,44
|
|
6
|
+
odoo/addons/mail_gateway/controllers/discuss.py,sha256=63r2QJiSAFdu1ZIJ54gUfjUkVJ_acPxgiyQoHIiumC4,379
|
|
7
|
+
odoo/addons/mail_gateway/controllers/gateway.py,sha256=rzI5LMxYup-QB6PCHUz2TloJOEw6LFja0Xszj3YHqMA,2880
|
|
8
|
+
odoo/addons/mail_gateway/i18n/es.po,sha256=ScChSUOWXnWeFX-j3Y1lymUm_9cCiNPBhHk3YmFuAig,19967
|
|
9
|
+
odoo/addons/mail_gateway/i18n/it.po,sha256=S9lo9iq_kb1BULCJSnUvdfuKTgGSfETVvP8jhYeIjBU,21461
|
|
10
|
+
odoo/addons/mail_gateway/i18n/mail_gateway.pot,sha256=W0bnOEvyhalXGL7qMZMYtr51k5tgUKE9Czewz4C-ohk,32150
|
|
11
|
+
odoo/addons/mail_gateway/models/__init__.py,sha256=rtdkCyZN2etA4mHFtxp2JmLILlBE-Ytln_1MYUZQ4Ys,313
|
|
12
|
+
odoo/addons/mail_gateway/models/discuss_channel.py,sha256=5j216dwVc6Z8seWtdJb_cSmaAvxCQwfNIFb9RtRTaOc,3363
|
|
13
|
+
odoo/addons/mail_gateway/models/ir_websocket.py,sha256=HfdL88oewFlJsjaizT24M52aqU7mRruK28XCo3tSsYU,709
|
|
14
|
+
odoo/addons/mail_gateway/models/mail_gateway.py,sha256=CMd0eRRwOmbpZ9fp4F94KNwAweMV4Tl63Zn8xqG6QxY,4671
|
|
15
|
+
odoo/addons/mail_gateway/models/mail_gateway_abstract.py,sha256=5RITBDlfQQelIyeTjbj6QqFyW9N1keZr3HDQlQwZS9E,2623
|
|
16
|
+
odoo/addons/mail_gateway/models/mail_guest.py,sha256=J9pvvxSibQVjcJEpP36QZXE_67aaR6kUIm9uouCsJK8,538
|
|
17
|
+
odoo/addons/mail_gateway/models/mail_message.py,sha256=Hzf9kz8jp2P7RrXbSqSSDOs2F1Z8sGdUUzW8zpoilbo,4761
|
|
18
|
+
odoo/addons/mail_gateway/models/mail_notification.py,sha256=M1uWjU-yTMOhMpKAaROeHlWirJhDxd5eem7D0GJCxTg,1659
|
|
19
|
+
odoo/addons/mail_gateway/models/mail_thread.py,sha256=sqt9ZuGpShEpshbzxNxAsBJXGGbQdGIWxI_39HJouUE,4662
|
|
20
|
+
odoo/addons/mail_gateway/models/res_partner.py,sha256=X52JUVfERhBIqckQDd0ggdeNzBkAlqk4dVcE1xAMIG0,3404
|
|
21
|
+
odoo/addons/mail_gateway/models/res_users.py,sha256=EzGUIMOluNg0skaZKm7bP8df4O3cV7q7Rzz024dV1aI,391
|
|
22
|
+
odoo/addons/mail_gateway/models/res_users_settings.py,sha256=tSkunUj_-JTJ_bYXc52_6bJVNLqMKlQmERdGQOcGtvs,370
|
|
23
|
+
odoo/addons/mail_gateway/readme/CONFIGURATION.rst,sha256=u4AuXP5LvuOYd3TsNozoBqgMJNLjaA_ZcgP62nY54Bo,199
|
|
24
|
+
odoo/addons/mail_gateway/readme/CONTRIBUTORS.md,sha256=a85W9_Tlmv_aI-nWgmEh-1_qtimHX-_pNABFD1P_DC4,29
|
|
25
|
+
odoo/addons/mail_gateway/readme/CREDITS.md,sha256=TFIkDK3yIG_ruXF1_vEyq5fqgUzuStXbVtlOGVsxIjQ,95
|
|
26
|
+
odoo/addons/mail_gateway/readme/DESCRIPTION.md,sha256=xTlaN78vrH24bFDIJ1TFb7jzrWEI5TjXjXUR4yZb1ls,373
|
|
27
|
+
odoo/addons/mail_gateway/readme/USAGE.md,sha256=SaA5U50JiORCZ8TtFe6jLORC79xTbnZwNmPT7G_MmpU,623
|
|
28
|
+
odoo/addons/mail_gateway/security/ir.model.access.csv,sha256=sz0zqOt9AoGgl1RYi-_uBisRCqHKOwMPfit72gh7Hyo,1275
|
|
29
|
+
odoo/addons/mail_gateway/security/security.xml,sha256=58CWuJ6pGuyosE7_gfroGjTUO6uCn9I_zwqHl2x4Ku0,2832
|
|
30
|
+
odoo/addons/mail_gateway/static/description/icon.png,sha256=oJUSI4t4BOGKGTvPJURptNJVoX1tYOK4oNzcS0ysedI,26508
|
|
31
|
+
odoo/addons/mail_gateway/static/description/index.html,sha256=7OMT0sgnWqAzPrTR4-iL4W4rYmPn5rKT2M6J6BJaX9o,13717
|
|
32
|
+
odoo/addons/mail_gateway/static/src/components/chatter/chatter.esm.js,sha256=9yi_GtapojtrhG3XXyh8Ht8AVKjl0aHJ6-UKzO-pDGM,445
|
|
33
|
+
odoo/addons/mail_gateway/static/src/components/chatter/chatter.xml,sha256=dLMF7WBxHy5nFDvk27Fc_gfax65oz_n8BAF4V_UDef4,2167
|
|
34
|
+
odoo/addons/mail_gateway/static/src/components/composer/composer.esm.js,sha256=FMEWyvATbt80j7TE4tu5aaqdOlaxHJO9p4pdKKlFcuw,4137
|
|
35
|
+
odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.esm.js,sha256=75hg16I1B-Ql_KHo5ZS-kofYckRPXSc1XVv9o0AYVbM,1444
|
|
36
|
+
odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.scss,sha256=Xg54rrxbTmbcsFLUaCMR1EDI2-KAmd20tWzeCSzy94M,234
|
|
37
|
+
odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.xml,sha256=qM63c_bLmUaw_dsMmKJcVnhuvNE_Zq4wo6xE2FKZnQY,1008
|
|
38
|
+
odoo/addons/mail_gateway/static/src/components/message/message.xml,sha256=HmO3asNSxSDjVuI6uOTqW02UekKc2sv9LEy3jLRUztE,766
|
|
39
|
+
odoo/addons/mail_gateway/static/src/components/message/message_patch.esm.js,sha256=96VAxgAdA-9Dc_2BLl97N4FNY7JiP2NRVgeMNRs_Jwg,2273
|
|
40
|
+
odoo/addons/mail_gateway/static/src/components/message_notification_popover_content/message_notification_popover_content.xml,sha256=UcUmPuWbM_UCxioGMvq1i7vr642fmEAe7wo9jW83b5k,420
|
|
41
|
+
odoo/addons/mail_gateway/static/src/core/common/composer_model_patch.esm.js,sha256=vSka1wm--i0UOvHqnalSvzMPOB5GLAYaU77U5AgW10g,580
|
|
42
|
+
odoo/addons/mail_gateway/static/src/core/common/discuss_app_model_patch.esm.js,sha256=hwa3_-jMmOvmG-KM-chaF__hxR1uLM9jYD8-kR7EUb8,838
|
|
43
|
+
odoo/addons/mail_gateway/static/src/core/common/message_actions.esm.js,sha256=kJNnMrXnB8jiM00i5Gs-YLhADgQdJltJodbMVJ7bl1o,809
|
|
44
|
+
odoo/addons/mail_gateway/static/src/core/common/message_model_patch.esm.js,sha256=snF3oCIwMck0vc3YiBAN0umuhY4EDC_7TGQSIKp7oSY,537
|
|
45
|
+
odoo/addons/mail_gateway/static/src/core/common/notification_model_patch.esm.js,sha256=zP2S70w-D-k2TiQKFgYwmrKGF8RDqluVVELu3Vf5sPU,1117
|
|
46
|
+
odoo/addons/mail_gateway/static/src/core/common/persona_model_patch.esm.js,sha256=8Wi56eD50nVbrUtcUVskkxEyl0JpMCjilPe9_OnE7M4,311
|
|
47
|
+
odoo/addons/mail_gateway/static/src/core/common/store_service_patch.esm.js,sha256=PAVvm0cWe1xutmiqvpx2sETf7h_St4FiU0az5GkQmls,433
|
|
48
|
+
odoo/addons/mail_gateway/static/src/core/common/thread_model_patch.esm.js,sha256=IMWXcwkDxpEzZq491r9akr2A7fzVh7Aul10XFkHC1gY,1491
|
|
49
|
+
odoo/addons/mail_gateway/static/src/core/common/thread_service_patch.esm.js,sha256=saMLW9lIsCnJV9heUg4weEO1DidNQ7lZYgftpmPzCYQ,683
|
|
50
|
+
odoo/addons/mail_gateway/static/src/core/web/discuss_app_category_model_patch.esm.js,sha256=8THvlrwGyRWWz7caVqOcO5aNmdduFO8JVCLb0fpxtDY,621
|
|
51
|
+
odoo/addons/mail_gateway/static/src/core/web/discuss_sidebar_categories.esm.js,sha256=TBwfWKNHa7Oojn4WDwtbN9TMvIrNE8UWUR6UGO2HfQY,441
|
|
52
|
+
odoo/addons/mail_gateway/static/src/core/web/discuss_sidebar_category_item_patch.xml,sha256=cUfeWivgba8QqGsDhFUd96Z6-P4xpGyxSg0NKp9iRdo,383
|
|
53
|
+
odoo/addons/mail_gateway/static/src/core/web/gateway_core_web_service.esm.js,sha256=bV4lE7ANlxC1ms55i2ynHMWGuInvOxh2Iv4Dpvl5HHE,1446
|
|
54
|
+
odoo/addons/mail_gateway/static/src/models/gateway.esm.js,sha256=kXmJplwHIfE_InRjqjygGqm9C0pR1ykNjuffhwzOOMk,598
|
|
55
|
+
odoo/addons/mail_gateway/static/src/models/gateway_channel.esm.js,sha256=zXTX4jeWilJCs_PEZ-nInzeZ6Bcy45WxIysza-xEzMQ,639
|
|
56
|
+
odoo/addons/mail_gateway/static/src/models/gateway_follower.esm.js,sha256=w6FOz2bXvWGIj3nnZtVbgR5KgYcEMp3gU-zIEzdaNQQ,692
|
|
57
|
+
odoo/addons/mail_gateway/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
+
odoo/addons/mail_gateway/tests/common.py,sha256=Z2pZsKQ9E-pjZK9fgIL9iy9yvgzVD7GwqhbZyZ8VHoU,522
|
|
59
|
+
odoo/addons/mail_gateway/views/mail_gateway.xml,sha256=5s1iEejlcDEHnLtGT5T2ak9Dy6HywJM7bXZeXuQ4dCM,3984
|
|
60
|
+
odoo/addons/mail_gateway/views/mail_guest_views.xml,sha256=johBGGUwncfwMRK8zEmAj-9Vt1JFNPsJA7UV4kbgjr4,578
|
|
61
|
+
odoo/addons/mail_gateway/views/res_partner_gateway_channel.xml,sha256=xgjym7um2id6od5P-fj33xmqWJJ_VfDRjd2Q2h3VjcY,2321
|
|
62
|
+
odoo/addons/mail_gateway/wizards/__init__.py,sha256=QMbAicNKcX9KktoqCLdR4jW4Poz-5_HAOWNGJABY-HM,155
|
|
63
|
+
odoo/addons/mail_gateway/wizards/mail_compose_gateway_message.py,sha256=Q_fKgLIEhGKV-GILnj2SXIW0g1qe-ziEiSy4j38gcd4,2935
|
|
64
|
+
odoo/addons/mail_gateway/wizards/mail_compose_gateway_message.xml,sha256=Y4x9IYSjY9eheNgI1m5MQsbEcgBrMzIWv_1qcHgg4rA,1629
|
|
65
|
+
odoo/addons/mail_gateway/wizards/mail_guest_manage.py,sha256=DQwam-UZidOaq0qmK3RjSorhIfdq0tRYi0n5HHWbj3g,1809
|
|
66
|
+
odoo/addons/mail_gateway/wizards/mail_guest_manage.xml,sha256=m32-VFBDLvaDLB4KrJZJwnlrfBZuKiDA5tdzbE4S3VI,1238
|
|
67
|
+
odoo/addons/mail_gateway/wizards/mail_message_gateway_link.py,sha256=pWzVzTZnGM2Gwbphm7elyh6f33tDkeKyO4fDH8dJNoI,1504
|
|
68
|
+
odoo/addons/mail_gateway/wizards/mail_message_gateway_link.xml,sha256=bExiMbt7uxkZJOc9Srxm9B6vvLW494iEI_ZPFKmsuWM,976
|
|
69
|
+
odoo/addons/mail_gateway/wizards/mail_message_gateway_send.py,sha256=b85udBKvs59X5J4x0XhNjE8Ap3TjA6Z-JWc2HCjs5wQ,599
|
|
70
|
+
odoo/addons/mail_gateway/wizards/mail_message_gateway_send.xml,sha256=bvYSteMZJZDfm9kW1ObcNudw5lTEu-P9Leoncplymy0,1421
|
|
71
|
+
odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info/METADATA,sha256=7cGhHHUm5bU3rdG_zC9vLon5s1ylzGbEwQI6KI-_KWs,4533
|
|
72
|
+
odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
|
73
|
+
odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
74
|
+
odoo_addon_mail_gateway-17.0.1.0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
This module will allow you to integrate an external chat system in your Odoo system.
|
|
2
|
-
It requires extra modules with the specific configuration of each chat system, like `mail_gateway_telegram` or `mail_gateway_whatsapp`.
|
|
3
|
-
|
|
4
|
-
This way, a group of users can respond customers or any other set
|
|
5
|
-
of partners within Odoo, but the messages will be sent through the external chat system.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
When external messages are received, they will be directly sent to the discuss menu.
|
|
2
|
-
Answering to these messages will send the answer to the external contact.
|
|
3
|
-
We can assign this messages to any record using the message actions.
|
|
4
|
-
Also, we can assign the sender to a partner using the followers menu and selecting the partner.
|
|
5
|
-
|
|
6
|
-
On a standard record associated to a partner with external chat, we can send messages to the external contact directly selecting the methods of the partner.
|
|
7
|
-
To use this, we just need to use the
|
|
8
|
-
|
|
9
|
-
It is recomended to enable chatter notification to all users that will receive messages from gateways.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
-
<templates xml:space="preserve">
|
|
3
|
-
|
|
4
|
-
<t
|
|
5
|
-
t-name="mail_gateway.Composer"
|
|
6
|
-
t-inherit="mail.Composer"
|
|
7
|
-
t-inherit-mode="extension"
|
|
8
|
-
owl="1"
|
|
9
|
-
>
|
|
10
|
-
<xpath expr="//small[hasclass('o_Composer_followers')]/.." position="after">
|
|
11
|
-
<t t-if="composerView.composer.isGateway">
|
|
12
|
-
<small><b class="text-muted">To: </b></small>
|
|
13
|
-
<t
|
|
14
|
-
t-foreach="composerView.composer.composerGatewayFollowers"
|
|
15
|
-
t-as="followerGateway"
|
|
16
|
-
t-key="followerGateway.follower"
|
|
17
|
-
>
|
|
18
|
-
<GatewayFollowerView record="followerGateway" />
|
|
19
|
-
</t>
|
|
20
|
-
</t>
|
|
21
|
-
</xpath>
|
|
22
|
-
|
|
23
|
-
</t>
|
|
24
|
-
</templates>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
-
<templates xml:space="preserve">
|
|
3
|
-
<t t-inherit="mail.DiscussSidebar" t-inherit-mode="extension">
|
|
4
|
-
<xpath expr="//*[@name='beforeCategoryChat']" position="before">
|
|
5
|
-
<t
|
|
6
|
-
t-foreach="discussView.discuss.categoryGateways"
|
|
7
|
-
t-as="categoryGateway"
|
|
8
|
-
t-key="categoryGateway"
|
|
9
|
-
>
|
|
10
|
-
<DiscussSidebarCategory
|
|
11
|
-
className="'o_DiscussSidebar_category o_DiscussSidebar_categoryGateway' + categoryGateway.gateway_id"
|
|
12
|
-
record="categoryGateway"
|
|
13
|
-
/>
|
|
14
|
-
</t>
|
|
15
|
-
</xpath>
|
|
16
|
-
</t>
|
|
17
|
-
</templates>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** @odoo-module **/
|
|
2
|
-
|
|
3
|
-
import {clear} from "@mail/model/model_field_command";
|
|
4
|
-
import {registerPatch} from "@mail/model/model_core";
|
|
5
|
-
|
|
6
|
-
registerPatch({
|
|
7
|
-
name: "Channel",
|
|
8
|
-
fields: {
|
|
9
|
-
discussSidebarCategory: {
|
|
10
|
-
compute() {
|
|
11
|
-
// On gateway channels we must set the right category
|
|
12
|
-
if (this.thread && this.thread.gateway) {
|
|
13
|
-
const category = this.messaging.discuss.categoryGateways.filter(
|
|
14
|
-
(ctg) => ctg.gateway === this.thread.gateway
|
|
15
|
-
);
|
|
16
|
-
if (category.length > 0) {
|
|
17
|
-
return category[0];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return this._super();
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
correspondent: {
|
|
24
|
-
compute() {
|
|
25
|
-
// We will not set a correspondent on gateways, as it gets yourself.
|
|
26
|
-
if (this.channel_type === "gateway") {
|
|
27
|
-
return clear();
|
|
28
|
-
}
|
|
29
|
-
return this._super();
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** @odoo-module **/
|
|
2
|
-
|
|
3
|
-
import {registerPatch} from "@mail/model/model_core";
|
|
4
|
-
|
|
5
|
-
registerPatch({
|
|
6
|
-
name: "ChannelMemberView",
|
|
7
|
-
recordMethods: {
|
|
8
|
-
onClickMember(ev) {
|
|
9
|
-
if (
|
|
10
|
-
this.channelMember.persona.guest &&
|
|
11
|
-
this.channelMember.persona.guest.gateway
|
|
12
|
-
) {
|
|
13
|
-
ev.stopPropagation();
|
|
14
|
-
return this.env.services.action.doAction({
|
|
15
|
-
name: this.env._t("Manage guest"),
|
|
16
|
-
type: "ir.actions.act_window",
|
|
17
|
-
res_model: "mail.guest.manage",
|
|
18
|
-
context: {default_guest_id: this.channelMember.persona.guest.id},
|
|
19
|
-
views: [[false, "form"]],
|
|
20
|
-
target: "new",
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return this._super();
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
fields: {
|
|
27
|
-
hasOpenChat: {
|
|
28
|
-
compute() {
|
|
29
|
-
return (
|
|
30
|
-
this._super() ||
|
|
31
|
-
Boolean(
|
|
32
|
-
this.channelMember.persona.guest &&
|
|
33
|
-
this.channelMember.persona.guest.gateway
|
|
34
|
-
)
|
|
35
|
-
);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/** @odoo-module **/
|
|
2
|
-
|
|
3
|
-
import {clear} from "@mail/model/model_field_command";
|
|
4
|
-
import {registerPatch} from "@mail/model/model_core";
|
|
5
|
-
|
|
6
|
-
registerPatch({
|
|
7
|
-
name: "Chatter",
|
|
8
|
-
recordMethods: {
|
|
9
|
-
onClickLogNote() {
|
|
10
|
-
if (this.composerView && this.composerView.composer.isGateway) {
|
|
11
|
-
this.update({composerView: clear()});
|
|
12
|
-
}
|
|
13
|
-
this._super(...arguments);
|
|
14
|
-
if (this.composerView) {
|
|
15
|
-
this.composerView.composer.update({isGateway: false});
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
onClickSendMessage() {
|
|
19
|
-
if (this.composerView && this.composerView.composer.isGateway) {
|
|
20
|
-
this.update({composerView: clear()});
|
|
21
|
-
}
|
|
22
|
-
this._super(...arguments);
|
|
23
|
-
if (this.composerView) {
|
|
24
|
-
this.composerView.composer.update({isGateway: false});
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
onClickGatewayMessage() {
|
|
28
|
-
if (this.composerView && this.composerView.composer.isGateway) {
|
|
29
|
-
this.update({composerView: clear()});
|
|
30
|
-
} else {
|
|
31
|
-
this.showGatewayComposerView();
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
showGatewayComposerView() {
|
|
35
|
-
this.update({composerView: {}});
|
|
36
|
-
this.composerView.composer.update({isLog: false, isGateway: true});
|
|
37
|
-
this.focus();
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
fields: {},
|
|
41
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/** @odoo-module **/
|
|
2
|
-
|
|
3
|
-
import {attr, many} from "@mail/model/model_field";
|
|
4
|
-
import {clear} from "@mail/model/model_field_command";
|
|
5
|
-
import {registerPatch} from "@mail/model/model_core";
|
|
6
|
-
|
|
7
|
-
registerPatch({
|
|
8
|
-
name: "Composer",
|
|
9
|
-
fields: {
|
|
10
|
-
isGateway: attr({
|
|
11
|
-
default: false,
|
|
12
|
-
}),
|
|
13
|
-
composerGatewayFollowers: many("composerGatewayFollower", {
|
|
14
|
-
compute() {
|
|
15
|
-
if (this.thread && this.isGateway) {
|
|
16
|
-
return this.thread.followers
|
|
17
|
-
.filter(
|
|
18
|
-
(follower) => follower.partner.gateway_channels.length > 0
|
|
19
|
-
)
|
|
20
|
-
.map((follower) => {
|
|
21
|
-
return {
|
|
22
|
-
follower,
|
|
23
|
-
channel: follower.partner.gateway_channels[0].id,
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return clear();
|
|
28
|
-
},
|
|
29
|
-
inverse: "composer",
|
|
30
|
-
}),
|
|
31
|
-
},
|
|
32
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/** @odoo-module **/
|
|
2
|
-
|
|
3
|
-
import {attr, one} from "@mail/model/model_field";
|
|
4
|
-
import {registerModel} from "@mail/model/model_core";
|
|
5
|
-
|
|
6
|
-
registerModel({
|
|
7
|
-
name: "composerGatewayFollower",
|
|
8
|
-
recordMethods: {
|
|
9
|
-
_getMessageData() {
|
|
10
|
-
return {
|
|
11
|
-
partner_id: this.follower.partner.id,
|
|
12
|
-
channel_type: "gateway",
|
|
13
|
-
gateway_channel_id: this.channel,
|
|
14
|
-
};
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
fields: {
|
|
18
|
-
component: attr(),
|
|
19
|
-
follower: one("Follower", {identifying: true}),
|
|
20
|
-
composer: one("Composer", {
|
|
21
|
-
identifying: true,
|
|
22
|
-
inverse: "composerGatewayFollowers",
|
|
23
|
-
}),
|
|
24
|
-
channel_type: attr({}),
|
|
25
|
-
channel: attr(),
|
|
26
|
-
hasGatewayChannels: attr({
|
|
27
|
-
compute() {
|
|
28
|
-
return this.follower.partner.gateway_channels.length > 0;
|
|
29
|
-
},
|
|
30
|
-
}),
|
|
31
|
-
},
|
|
32
|
-
});
|