odoo-addon-mail-gateway 16.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.

Files changed (73) hide show
  1. odoo/addons/mail_gateway/README.rst +100 -0
  2. odoo/addons/mail_gateway/__init__.py +6 -0
  3. odoo/addons/mail_gateway/__manifest__.py +38 -0
  4. odoo/addons/mail_gateway/controllers/__init__.py +2 -0
  5. odoo/addons/mail_gateway/controllers/discuss.py +11 -0
  6. odoo/addons/mail_gateway/controllers/gateway.py +81 -0
  7. odoo/addons/mail_gateway/hooks.py +12 -0
  8. odoo/addons/mail_gateway/i18n/mail_gateway.pot +533 -0
  9. odoo/addons/mail_gateway/models/__init__.py +10 -0
  10. odoo/addons/mail_gateway/models/ir_websocket.py +21 -0
  11. odoo/addons/mail_gateway/models/mail_channel.py +79 -0
  12. odoo/addons/mail_gateway/models/mail_gateway.py +149 -0
  13. odoo/addons/mail_gateway/models/mail_gateway_abstract.py +82 -0
  14. odoo/addons/mail_gateway/models/mail_guest.py +18 -0
  15. odoo/addons/mail_gateway/models/mail_message.py +123 -0
  16. odoo/addons/mail_gateway/models/mail_notification.py +43 -0
  17. odoo/addons/mail_gateway/models/mail_thread.py +85 -0
  18. odoo/addons/mail_gateway/models/res_partner.py +89 -0
  19. odoo/addons/mail_gateway/models/res_users.py +16 -0
  20. odoo/addons/mail_gateway/readme/CONFIGURATION.rst +4 -0
  21. odoo/addons/mail_gateway/readme/CONTRIBUTORS.rst +2 -0
  22. odoo/addons/mail_gateway/readme/CREDITS.rst +1 -0
  23. odoo/addons/mail_gateway/readme/DESCRIPTION.rst +5 -0
  24. odoo/addons/mail_gateway/readme/USAGE.rst +9 -0
  25. odoo/addons/mail_gateway/security/ir.model.access.csv +9 -0
  26. odoo/addons/mail_gateway/security/security.xml +61 -0
  27. odoo/addons/mail_gateway/static/description/icon.png +0 -0
  28. odoo/addons/mail_gateway/static/description/index.html +441 -0
  29. odoo/addons/mail_gateway/static/src/components/chatter/chatter.xml +40 -0
  30. odoo/addons/mail_gateway/static/src/components/composer/composer.xml +24 -0
  31. odoo/addons/mail_gateway/static/src/components/discuss_sidebar/discuss_sidebar.xml +17 -0
  32. odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.esm.js +31 -0
  33. odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.scss +12 -0
  34. odoo/addons/mail_gateway/static/src/components/gateway_follower/gateway_follower.xml +30 -0
  35. odoo/addons/mail_gateway/static/src/components/message/message.xml +22 -0
  36. odoo/addons/mail_gateway/static/src/components/message_notification_popover_content/message_notification_popover_content.xml +15 -0
  37. odoo/addons/mail_gateway/static/src/models/channel.esm.js +33 -0
  38. odoo/addons/mail_gateway/static/src/models/channel_member_view.esm.js +39 -0
  39. odoo/addons/mail_gateway/static/src/models/chatter.esm.js +41 -0
  40. odoo/addons/mail_gateway/static/src/models/composer.esm.js +32 -0
  41. odoo/addons/mail_gateway/static/src/models/composer_gateway_follower.esm.js +32 -0
  42. odoo/addons/mail_gateway/static/src/models/composer_view.esm.js +56 -0
  43. odoo/addons/mail_gateway/static/src/models/discuss.esm.js +51 -0
  44. odoo/addons/mail_gateway/static/src/models/discuss_sidebar_category.esm.js +128 -0
  45. odoo/addons/mail_gateway/static/src/models/discuss_sidebar_category_item.esm.js +51 -0
  46. odoo/addons/mail_gateway/static/src/models/gateway.esm.js +16 -0
  47. odoo/addons/mail_gateway/static/src/models/gateway_channel.esm.js +14 -0
  48. odoo/addons/mail_gateway/static/src/models/gateway_channel_view.esm.js +15 -0
  49. odoo/addons/mail_gateway/static/src/models/guest.esm.js +10 -0
  50. odoo/addons/mail_gateway/static/src/models/message.esm.js +76 -0
  51. odoo/addons/mail_gateway/static/src/models/message_action.esm.js +45 -0
  52. odoo/addons/mail_gateway/static/src/models/message_action_list.esm.js +37 -0
  53. odoo/addons/mail_gateway/static/src/models/message_action_view.esm.js +91 -0
  54. odoo/addons/mail_gateway/static/src/models/message_view.esm.js +13 -0
  55. odoo/addons/mail_gateway/static/src/models/messaging_initializer.esm.js +24 -0
  56. odoo/addons/mail_gateway/static/src/models/notification.esm.js +20 -0
  57. odoo/addons/mail_gateway/static/src/models/partner.esm.js +11 -0
  58. odoo/addons/mail_gateway/static/src/models/thread.esm.js +77 -0
  59. odoo/addons/mail_gateway/tests/__init__.py +0 -0
  60. odoo/addons/mail_gateway/tests/common.py +21 -0
  61. odoo/addons/mail_gateway/views/mail_gateway.xml +93 -0
  62. odoo/addons/mail_gateway/views/res_partner_gateway_channel.xml +59 -0
  63. odoo/addons/mail_gateway/wizards/__init__.py +3 -0
  64. odoo/addons/mail_gateway/wizards/mail_guest_manage.py +58 -0
  65. odoo/addons/mail_gateway/wizards/mail_guest_manage.xml +37 -0
  66. odoo/addons/mail_gateway/wizards/mail_message_gateway_link.py +42 -0
  67. odoo/addons/mail_gateway/wizards/mail_message_gateway_link.xml +28 -0
  68. odoo/addons/mail_gateway/wizards/mail_message_gateway_send.py +20 -0
  69. odoo/addons/mail_gateway/wizards/mail_message_gateway_send.xml +39 -0
  70. odoo_addon_mail_gateway-16.0.1.0.0.2.dist-info/METADATA +118 -0
  71. odoo_addon_mail_gateway-16.0.1.0.0.2.dist-info/RECORD +73 -0
  72. odoo_addon_mail_gateway-16.0.1.0.0.2.dist-info/WHEEL +5 -0
  73. odoo_addon_mail_gateway-16.0.1.0.0.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,61 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <odoo>
3
+ <record model="ir.module.category" id="module_category_gateway">
4
+ <field name="name">Gateway</field>
5
+ </record>
6
+ <record model="res.groups" id="gateway_user">
7
+ <field name="name">User</field>
8
+ <field name="category_id" ref="module_category_gateway" />
9
+ <field
10
+ name="users"
11
+ eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
12
+ />
13
+ </record>
14
+ <record id="mail_channel_gateway_rule" model="ir.rule">
15
+ <field name="name">Mail.channel: access gateway</field>
16
+ <field name="model_id" ref="mail.model_mail_channel" />
17
+ <field name="groups" eval="[(4, ref('mail_gateway.gateway_user'))]" />
18
+ <field
19
+ name="domain_force"
20
+ >[('channel_type', '=', 'gateway'), '|', ('company_id', '=', False), ('company_id', 'in', company_ids) ]</field>
21
+ <field name="perm_read" eval="True" />
22
+ <field name="perm_create" eval="False" />
23
+ <field name="perm_write" eval="True" />
24
+ <field name="perm_unlink" eval="False" />
25
+ </record>
26
+ <record id="mail_gateway_rule" model="ir.rule">
27
+ <field name="name">Mail.gateway: multicompany rule</field>
28
+ <field name="model_id" ref="mail_gateway.model_mail_gateway" />
29
+ <field
30
+ name="domain_force"
31
+ >['|', ('company_id', '=', False), ('company_id', 'in', company_ids) ]</field>
32
+ <field name="perm_read" eval="True" />
33
+ <field name="perm_create" eval="True" />
34
+ <field name="perm_write" eval="True" />
35
+ <field name="perm_unlink" eval="True" />
36
+ </record>
37
+ <record id="res_partner_gateway_channel_rule" model="ir.rule">
38
+ <field name="name">res.partner.gateway.channel: multicompany rule</field>
39
+ <field name="model_id" ref="mail_gateway.model_res_partner_gateway_channel" />
40
+ <field
41
+ name="domain_force"
42
+ >['|', ('company_id', '=', False), ('company_id', 'in', company_ids) ]</field>
43
+ <field name="perm_read" eval="True" />
44
+ <field name="perm_create" eval="True" />
45
+ <field name="perm_write" eval="True" />
46
+ <field name="perm_unlink" eval="True" />
47
+ </record>
48
+ <record id="ir_rule_mail_channel_partner_group_user" model="ir.rule">
49
+ <field
50
+ name="name"
51
+ >mail.channel.member: write its own entries on gateway channels members</field>
52
+ <field name="model_id" ref="mail.model_mail_channel_member" />
53
+ <field name="groups" eval="[(4, ref('mail_gateway.gateway_user'))]" />
54
+ <field name="domain_force">[('channel_id.channel_type', '=', 'gateway')]</field>
55
+ <field name="perm_read" eval="False" />
56
+ <field name="perm_write" eval="True" />
57
+ <field name="perm_create" eval="False" />
58
+ <field name="perm_unlink" eval="True" />
59
+ </record>
60
+
61
+ </odoo>
@@ -0,0 +1,441 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6
+ <title>Mail Gateway</title>
7
+ <style type="text/css">
8
+
9
+ /*
10
+ :Author: David Goodger (goodger@python.org)
11
+ :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
12
+ :Copyright: This stylesheet has been placed in the public domain.
13
+
14
+ Default cascading style sheet for the HTML output of Docutils.
15
+
16
+ See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
17
+ customize this style sheet.
18
+ */
19
+
20
+ /* used to remove borders from tables and images */
21
+ .borderless, table.borderless td, table.borderless th {
22
+ border: 0 }
23
+
24
+ table.borderless td, table.borderless th {
25
+ /* Override padding for "table.docutils td" with "! important".
26
+ The right padding separates the table cells. */
27
+ padding: 0 0.5em 0 0 ! important }
28
+
29
+ .first {
30
+ /* Override more specific margin styles with "! important". */
31
+ margin-top: 0 ! important }
32
+
33
+ .last, .with-subtitle {
34
+ margin-bottom: 0 ! important }
35
+
36
+ .hidden {
37
+ display: none }
38
+
39
+ .subscript {
40
+ vertical-align: sub;
41
+ font-size: smaller }
42
+
43
+ .superscript {
44
+ vertical-align: super;
45
+ font-size: smaller }
46
+
47
+ a.toc-backref {
48
+ text-decoration: none ;
49
+ color: black }
50
+
51
+ blockquote.epigraph {
52
+ margin: 2em 5em ; }
53
+
54
+ dl.docutils dd {
55
+ margin-bottom: 0.5em }
56
+
57
+ object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
58
+ overflow: hidden;
59
+ }
60
+
61
+ /* Uncomment (and remove this text!) to get bold-faced definition list terms
62
+ dl.docutils dt {
63
+ font-weight: bold }
64
+ */
65
+
66
+ div.abstract {
67
+ margin: 2em 5em }
68
+
69
+ div.abstract p.topic-title {
70
+ font-weight: bold ;
71
+ text-align: center }
72
+
73
+ div.admonition, div.attention, div.caution, div.danger, div.error,
74
+ div.hint, div.important, div.note, div.tip, div.warning {
75
+ margin: 2em ;
76
+ border: medium outset ;
77
+ padding: 1em }
78
+
79
+ div.admonition p.admonition-title, div.hint p.admonition-title,
80
+ div.important p.admonition-title, div.note p.admonition-title,
81
+ div.tip p.admonition-title {
82
+ font-weight: bold ;
83
+ font-family: sans-serif }
84
+
85
+ div.attention p.admonition-title, div.caution p.admonition-title,
86
+ div.danger p.admonition-title, div.error p.admonition-title,
87
+ div.warning p.admonition-title, .code .error {
88
+ color: red ;
89
+ font-weight: bold ;
90
+ font-family: sans-serif }
91
+
92
+ /* Uncomment (and remove this text!) to get reduced vertical space in
93
+ compound paragraphs.
94
+ div.compound .compound-first, div.compound .compound-middle {
95
+ margin-bottom: 0.5em }
96
+
97
+ div.compound .compound-last, div.compound .compound-middle {
98
+ margin-top: 0.5em }
99
+ */
100
+
101
+ div.dedication {
102
+ margin: 2em 5em ;
103
+ text-align: center ;
104
+ font-style: italic }
105
+
106
+ div.dedication p.topic-title {
107
+ font-weight: bold ;
108
+ font-style: normal }
109
+
110
+ div.figure {
111
+ margin-left: 2em ;
112
+ margin-right: 2em }
113
+
114
+ div.footer, div.header {
115
+ clear: both;
116
+ font-size: smaller }
117
+
118
+ div.line-block {
119
+ display: block ;
120
+ margin-top: 1em ;
121
+ margin-bottom: 1em }
122
+
123
+ div.line-block div.line-block {
124
+ margin-top: 0 ;
125
+ margin-bottom: 0 ;
126
+ margin-left: 1.5em }
127
+
128
+ div.sidebar {
129
+ margin: 0 0 0.5em 1em ;
130
+ border: medium outset ;
131
+ padding: 1em ;
132
+ background-color: #ffffee ;
133
+ width: 40% ;
134
+ float: right ;
135
+ clear: right }
136
+
137
+ div.sidebar p.rubric {
138
+ font-family: sans-serif ;
139
+ font-size: medium }
140
+
141
+ div.system-messages {
142
+ margin: 5em }
143
+
144
+ div.system-messages h1 {
145
+ color: red }
146
+
147
+ div.system-message {
148
+ border: medium outset ;
149
+ padding: 1em }
150
+
151
+ div.system-message p.system-message-title {
152
+ color: red ;
153
+ font-weight: bold }
154
+
155
+ div.topic {
156
+ margin: 2em }
157
+
158
+ h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
159
+ h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
160
+ margin-top: 0.4em }
161
+
162
+ h1.title {
163
+ text-align: center }
164
+
165
+ h2.subtitle {
166
+ text-align: center }
167
+
168
+ hr.docutils {
169
+ width: 75% }
170
+
171
+ img.align-left, .figure.align-left, object.align-left, table.align-left {
172
+ clear: left ;
173
+ float: left ;
174
+ margin-right: 1em }
175
+
176
+ img.align-right, .figure.align-right, object.align-right, table.align-right {
177
+ clear: right ;
178
+ float: right ;
179
+ margin-left: 1em }
180
+
181
+ img.align-center, .figure.align-center, object.align-center {
182
+ display: block;
183
+ margin-left: auto;
184
+ margin-right: auto;
185
+ }
186
+
187
+ table.align-center {
188
+ margin-left: auto;
189
+ margin-right: auto;
190
+ }
191
+
192
+ .align-left {
193
+ text-align: left }
194
+
195
+ .align-center {
196
+ clear: both ;
197
+ text-align: center }
198
+
199
+ .align-right {
200
+ text-align: right }
201
+
202
+ /* reset inner alignment in figures */
203
+ div.align-right {
204
+ text-align: inherit }
205
+
206
+ /* div.align-center * { */
207
+ /* text-align: left } */
208
+
209
+ .align-top {
210
+ vertical-align: top }
211
+
212
+ .align-middle {
213
+ vertical-align: middle }
214
+
215
+ .align-bottom {
216
+ vertical-align: bottom }
217
+
218
+ ol.simple, ul.simple {
219
+ margin-bottom: 1em }
220
+
221
+ ol.arabic {
222
+ list-style: decimal }
223
+
224
+ ol.loweralpha {
225
+ list-style: lower-alpha }
226
+
227
+ ol.upperalpha {
228
+ list-style: upper-alpha }
229
+
230
+ ol.lowerroman {
231
+ list-style: lower-roman }
232
+
233
+ ol.upperroman {
234
+ list-style: upper-roman }
235
+
236
+ p.attribution {
237
+ text-align: right ;
238
+ margin-left: 50% }
239
+
240
+ p.caption {
241
+ font-style: italic }
242
+
243
+ p.credits {
244
+ font-style: italic ;
245
+ font-size: smaller }
246
+
247
+ p.label {
248
+ white-space: nowrap }
249
+
250
+ p.rubric {
251
+ font-weight: bold ;
252
+ font-size: larger ;
253
+ color: maroon ;
254
+ text-align: center }
255
+
256
+ p.sidebar-title {
257
+ font-family: sans-serif ;
258
+ font-weight: bold ;
259
+ font-size: larger }
260
+
261
+ p.sidebar-subtitle {
262
+ font-family: sans-serif ;
263
+ font-weight: bold }
264
+
265
+ p.topic-title {
266
+ font-weight: bold }
267
+
268
+ pre.address {
269
+ margin-bottom: 0 ;
270
+ margin-top: 0 ;
271
+ font: inherit }
272
+
273
+ pre.literal-block, pre.doctest-block, pre.math, pre.code {
274
+ margin-left: 2em ;
275
+ margin-right: 2em }
276
+
277
+ pre.code .ln { color: grey; } /* line numbers */
278
+ pre.code, code { background-color: #eeeeee }
279
+ pre.code .comment, code .comment { color: #5C6576 }
280
+ pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
281
+ pre.code .literal.string, code .literal.string { color: #0C5404 }
282
+ pre.code .name.builtin, code .name.builtin { color: #352B84 }
283
+ pre.code .deleted, code .deleted { background-color: #DEB0A1}
284
+ pre.code .inserted, code .inserted { background-color: #A3D289}
285
+
286
+ span.classifier {
287
+ font-family: sans-serif ;
288
+ font-style: oblique }
289
+
290
+ span.classifier-delimiter {
291
+ font-family: sans-serif ;
292
+ font-weight: bold }
293
+
294
+ span.interpreted {
295
+ font-family: sans-serif }
296
+
297
+ span.option {
298
+ white-space: nowrap }
299
+
300
+ span.pre {
301
+ white-space: pre }
302
+
303
+ span.problematic {
304
+ color: red }
305
+
306
+ span.section-subtitle {
307
+ /* font-size relative to parent (h1..h6 element) */
308
+ font-size: 80% }
309
+
310
+ table.citation {
311
+ border-left: solid 1px gray;
312
+ margin-left: 1px }
313
+
314
+ table.docinfo {
315
+ margin: 2em 4em }
316
+
317
+ table.docutils {
318
+ margin-top: 0.5em ;
319
+ margin-bottom: 0.5em }
320
+
321
+ table.footnote {
322
+ border-left: solid 1px black;
323
+ margin-left: 1px }
324
+
325
+ table.docutils td, table.docutils th,
326
+ table.docinfo td, table.docinfo th {
327
+ padding-left: 0.5em ;
328
+ padding-right: 0.5em ;
329
+ vertical-align: top }
330
+
331
+ table.docutils th.field-name, table.docinfo th.docinfo-name {
332
+ font-weight: bold ;
333
+ text-align: left ;
334
+ white-space: nowrap ;
335
+ padding-left: 0 }
336
+
337
+ /* "booktabs" style (no vertical lines) */
338
+ table.docutils.booktabs {
339
+ border: 0px;
340
+ border-top: 2px solid;
341
+ border-bottom: 2px solid;
342
+ border-collapse: collapse;
343
+ }
344
+ table.docutils.booktabs * {
345
+ border: 0px;
346
+ }
347
+ table.docutils.booktabs th {
348
+ border-bottom: thin solid;
349
+ text-align: left;
350
+ }
351
+
352
+ h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
353
+ h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
354
+ font-size: 100% }
355
+
356
+ ul.auto-toc {
357
+ list-style-type: none }
358
+
359
+ </style>
360
+ </head>
361
+ <body>
362
+ <div class="document" id="mail-gateway">
363
+ <h1 class="title">Mail Gateway</h1>
364
+
365
+ <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
366
+ !! This file is generated by oca-gen-addon-readme !!
367
+ !! changes will be overwritten. !!
368
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369
+ !! source digest: sha256:1fc341f96ecbd2a96d20eb12aae392827aa821f05dbda6cc30a702d19a58f223
370
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371
+ <p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/social/tree/16.0/mail_gateway"><img alt="OCA/social" src="https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_gateway"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/social&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
+ <p>This module will allow you to integrate an external chat system in your Odoo system.
373
+ It requires extra modules with the specific configuration of each chat system, like <cite>mail_gateway_telegram</cite> or <cite>mail_gateway_whatsapp</cite>.</p>
374
+ <p>This way, a group of users can respond customers or any other set
375
+ of partners within Odoo, but the messages will be sent through the external chat system.</p>
376
+ <p><strong>Table of contents</strong></p>
377
+ <div class="contents local topic" id="contents">
378
+ <ul class="simple">
379
+ <li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
380
+ <li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
381
+ <li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
382
+ <li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
383
+ <li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
384
+ <li><a class="reference internal" href="#other-credits" id="toc-entry-6">Other credits</a></li>
385
+ <li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
386
+ </ul>
387
+ </li>
388
+ </ul>
389
+ </div>
390
+ <div class="section" id="usage">
391
+ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
392
+ <p>When external messages are received, they will be directly sent to the discuss menu.
393
+ Answering to these messages will send the answer to the external contact.
394
+ We can assign this messages to any record using the message actions.
395
+ Also, we can assign the sender to a partner using the followers menu and selecting the partner.</p>
396
+ <p>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.
397
+ To use this, we just need to use the</p>
398
+ <p>It is recomended to enable chatter notification to all users that will receive messages from gateways.</p>
399
+ </div>
400
+ <div class="section" id="bug-tracker">
401
+ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
402
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/social/issues">GitHub Issues</a>.
403
+ In case of trouble, please check there if your issue has already been reported.
404
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
405
+ <a class="reference external" href="https://github.com/OCA/social/issues/new?body=module:%20mail_gateway%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
406
+ <p>Do not contact contributors directly about support or help with technical issues.</p>
407
+ </div>
408
+ <div class="section" id="credits">
409
+ <h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
410
+ <div class="section" id="authors">
411
+ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
412
+ <ul class="simple">
413
+ <li>Creu Blanca</li>
414
+ <li>Dixmit</li>
415
+ </ul>
416
+ </div>
417
+ <div class="section" id="contributors">
418
+ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
419
+ <ul class="simple">
420
+ <li>Enric Tobella</li>
421
+ <li>Olga Marco</li>
422
+ </ul>
423
+ </div>
424
+ <div class="section" id="other-credits">
425
+ <h2><a class="toc-backref" href="#toc-entry-6">Other credits</a></h2>
426
+ <p>This work has been funded by AEOdoo (Asociación Española de Odoo - <a class="reference external" href="https://www.aeodoo.org">https://www.aeodoo.org</a>)</p>
427
+ </div>
428
+ <div class="section" id="maintainers">
429
+ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
430
+ <p>This module is maintained by the OCA.</p>
431
+ <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
432
+ <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
433
+ mission is to support the collaborative development of Odoo features and
434
+ promote its widespread use.</p>
435
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/social/tree/16.0/mail_gateway">OCA/social</a> project on GitHub.</p>
436
+ <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
437
+ </div>
438
+ </div>
439
+ </div>
440
+ </body>
441
+ </html>
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <templates xml:space="preserve">
3
+
4
+ <t
5
+ t-name="mail_gateway.ChatterTopbar"
6
+ t-inherit="mail.ChatterTopbar"
7
+ t-inherit-mode="extension"
8
+ owl="1"
9
+ >
10
+ <xpath
11
+ expr="//button[hasclass('o_ChatterTopbar_buttonSendMessage')]"
12
+ position="attributes"
13
+ >
14
+ <attribute name="t-att-class">{
15
+ 'o-active btn-odoo': chatterTopbar.chatter.composerView and !chatterTopbar.chatter.composerView.composer.isLog and !chatterTopbar.chatter.composerView.composer.isGateway,
16
+ 'btn-odoo': !chatterTopbar.chatter.composerView,
17
+ 'btn-light': chatterTopbar.chatter.composerView and (chatterTopbar.chatter.composerView.composer.isLog or chatterTopbar.chatter.composerView.composer.isGateway),
18
+ }</attribute>
19
+ </xpath>
20
+ <xpath
21
+ expr="//button[hasclass('o_ChatterTopbar_buttonLogNote')]"
22
+ position="after"
23
+ >
24
+ <button
25
+ class="o_ChatterTopbar_button o_ChatterTopbar_buttonLogWhatsapp btn text-nowrap btn-light"
26
+ type="button"
27
+ t-att-class="{
28
+ 'o-active btn-odoo': chatterTopbar.chatter.composerView and !chatterTopbar.chatter.composerView.composer.isLog and chatterTopbar.chatter.composerView.composer.isGateway,
29
+ 'btn-odoo': !chatterTopbar.chatter.composerView,
30
+ 'btn-light': !chatterTopbar.chatter.composerView or (chatterTopbar.chatter.composerView.composer.isLog or !chatterTopbar.chatter.composerView.composer.isGateway),
31
+ }"
32
+ t-att-disabled="!chatterTopbar.chatter.isTemporary and !chatterTopbar.chatter.hasWriteAccess"
33
+ t-on-click="() => this.chatterTopbar.chatter.onClickGatewayMessage()"
34
+ >
35
+ <i class="fa fa-plane" role="img" aria-label="gateway" />
36
+ <span> Gateway message</span>
37
+ </button>
38
+ </xpath>
39
+ </t>
40
+ </templates>
@@ -0,0 +1,24 @@
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>
@@ -0,0 +1,17 @@
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>
@@ -0,0 +1,31 @@
1
+ /** @odoo-module **/
2
+
3
+ import {registerMessagingComponent} from "@mail/utils/messaging_component";
4
+ import {useComponentToModel} from "@mail/component_hooks/use_component_to_model";
5
+
6
+ const {Component} = owl;
7
+
8
+ class GatewayFollowerView extends Component {
9
+ /**
10
+ * @override
11
+ */
12
+ setup() {
13
+ super.setup();
14
+ useComponentToModel({fieldName: "component"});
15
+ }
16
+ get composerGatewayFollower() {
17
+ return this.props.record;
18
+ }
19
+ onChangeGatewayChannel(ev) {
20
+ this.props.record.update({
21
+ channel: parseInt(ev.target.options[ev.target.selectedIndex].value, 10),
22
+ });
23
+ }
24
+ }
25
+
26
+ Object.assign(GatewayFollowerView, {
27
+ props: {record: Object},
28
+ template: "mail_gateway.GatewayFollowerView",
29
+ });
30
+
31
+ registerMessagingComponent(GatewayFollowerView);
@@ -0,0 +1,12 @@
1
+ .o_gateway_composer_selector {
2
+ select {
3
+ width: unset;
4
+ display: inline-block;
5
+ min-width: 15%;
6
+ }
7
+
8
+ .o_gateway_composer_selector_partner {
9
+ min-width: 30%;
10
+ display: inline-block;
11
+ }
12
+ }
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <templates xml:space="preserve">
3
+ <t t-name="mail_gateway.GatewayFollowerView" owl="1">
4
+ <div class="o_gateway_composer_selector">
5
+ <span
6
+ class="o_gateway_composer_selector_partner"
7
+ t-esc="composerGatewayFollower.follower.partner.persona.name"
8
+ />
9
+ <select
10
+ name="gatewayChannel"
11
+ class="o_input o_gateway_composer_selector_channel"
12
+ t-att-value="composerGatewayFollower.channel"
13
+ t-on-change="onChangeGatewayChannel"
14
+ >
15
+ <option value="">Not selected</option>
16
+ <t
17
+ t-foreach="composerGatewayFollower.follower.partner.gateway_channels"
18
+ t-as="gateway_channel"
19
+ t-key="gateway_channel.id"
20
+ >
21
+ <option
22
+ t-att-value="gateway_channel.id"
23
+ t-esc="gateway_channel.name"
24
+ t-att-selected="gateway_channel.id === composerGatewayFollower.channel"
25
+ />
26
+ </t>
27
+ </select>
28
+ </div>
29
+ </t>
30
+ </templates>