-
-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][MIG] mail_tracking: Migration to 16.0 #1216
Merged
OCA-git-bot
merged 163 commits into
OCA:16.0
from
vauxoo-dev:16.0-mail_tracking-mig-payen
Oct 10, 2023
Merged
Changes from all commits
Commits
Show all changes
163 commits
Select commit
Hold shift + click to select a range
0ddcb83
[8.0][ADD] mail_tracking addon (#67)
antespi a8b8a25
[8.0][IMP][mail_tracking] Speed installation time and discard concurr…
antespi 59001b4
[FIX] Update email_score when email changes
antespi be49279
[MIG] mail_tracking
antespi cf37bee
[FIX] mail_tracking: Typo
pedrobaeza 7aaabd6
[MIG] Make modules uninstallable
pedrobaeza dcee7f8
[MIG] mail_tracking: Migrated to 10.0
bouvyd d9e6e65
[IMP] mail_tracking performance and bounce process (#103)
antespi 4dce9c0
[IMP] mail_tracking: Allow to define a custom mail_tracking base url
antespi fc64f5c
Add access to portal/public user to his own email trackings
antespi 12b34c5
[8.0][FIX][mail_tracking] Use event recipient address to find partner…
antespi 7c9aabe
[9.0][FIX][mail_tracking] Control exception when mail_message was rem…
antespi e662b4b
[FIX] Sender label is repeated in search fields
antespi a185584
[FIX][9.0] partner buttons view on enterprise
jjscarafia a564869
[FIX] mail_tracking: Obtain outgoing server with sudo
pedrobaeza 1898bb1
[IMP] Shut mock exceptions up
chienandalu f0aff3b
[9.0][IMP] mail_tracking: Improve view with error details
carlosdauden 5987c3f
[FIX] mail_tracking: bugfixes (#199)
antespi 210de91
IMP mail_tracking performances
eLBati 458e72d
[FIX] mail_tracking js could break other modules using chat_manager
ecino 715618f
[MIG] mail_tracking: Migration to 11.0
chienandalu 7121b1f
Translated using Weblate (French) [ci skip]
didierdonze c2eda72
[IMP] mail_tracking: email score performance (#299)
chienandalu 97d6069
Fix README.rst images not visible in GitHub and Odoo
bitroniq 8e652c4
[IMP] mail_tracking: Put button box at the end of the view
pedrobaeza 3348f98
Translated using Weblate (Catalan)
eduardgm d6d4142
[MIG] mail_tracking: Migration to 12.0
ernestotejeda d324aa1
[FIX] mail_tracking: Don't call write inside other write
pedrobaeza 2706977
[IMP] mail_tracking: Cc
Tardo 592b9d1
[MIG] mail_tracking: Adapt Cc to 12.0
Tardo 2784925
mail_tracking 12.0.1.1.0
OCA-git-bot 3e2fc69
[FIX] Bug {TypeError: dict.message.hasEmailCc is not a function} duri…
EgorSummer 15a5a2a
mail_tracking 12.0.1.1.1
OCA-git-bot 40c3129
[FIX] mail_tracking: Repeated suggested cc emails
Tardo a4ab91b
[IMP] mail_tracking: Adapt test to set (not order preserved)
Tardo d93ff00
mail_tracking 12.0.1.1.2
OCA-git-bot c11f78f
[FIX] mail_tracking: Show correctly blank image
pedrobaeza 1fd5ec8
Translated using Weblate (Spanish)
eduardgm 8a52d2a
[IMP] mail_tracking: mail.thread filter for tracking errors
chienandalu 8ef81f2
[IMP] mail_tracking: Cc name & check if mail is Cc
Tardo ce8f865
[IMP] mail_tracking: Convert 'partner_trackings' to dict
Tardo 17f8d93
[IMP] mail_tracking: translations
Tardo 8100ec4
[IMP] mail_tracking: Failed Messages to 12.0
Tardo 064c793
mail_tracking 12.0.2.0.0
OCA-git-bot 107bf80
[FIX] mail_tracking: Refresh thread widget when sets a message as rev…
Tardo 3ff53ab
mail_tracking 12.0.2.0.1
OCA-git-bot 6b980a5
[IMP] mail_tracking: black, isort
Tardo 4acc95a
[MIG] mail_tracking: Migration to 13.0
Tardo 3b0f4d8
[UPD] Update mail_tracking.pot
oca-travis 99ff431
[UPD] README.rst
OCA-git-bot e9b446a
[UPD] Update mail_tracking.pot
oca-travis 683851b
Update translation files
oca-transbot 25a6f0a
[FIX] mail_tracking: Changed injection method for 'failed_message_ids…
Tardo de609a3
mail_tracking 13.0.1.0.1
OCA-git-bot 6b39838
[UPD] README.rst
OCA-git-bot a4979ed
[FIX] mail_tracking: do not warn not found if already opened
ruuter 17cd59e
mail_tracking 13.0.1.0.2
OCA-git-bot 7a09950
[IMP] mail_tracking: Store To recipients and omit aliases
Tardo 2f3fc11
[IMP] mail_tracking: Test 'to' and named emails
Tardo e88edb9
[UPD] Update mail_tracking.pot
oca-travis 7156f27
mail_tracking 13.0.1.0.3
OCA-git-bot 0987c69
Update translation files
oca-transbot 104ea90
[IMP] mail_tracking: Ignore catchall
Tardo ad10ce8
[UPD] Update mail_tracking.pot
oca-travis 1aab576
mail_tracking 13.0.1.0.4
OCA-git-bot 5a67189
Update translation files
oca-transbot 7ceee29
Update translation files
oca-transbot d82bff7
[UPD] Update mail_tracking.pot
oca-travis e7d55e3
Update translation files
oca-transbot 8c51374
[FIX] re.search will return None when nothing found. So we have to ch…
wpichler 6c742b5
[FIX] mail_tracking
nmadhoc c3ef63b
mail_tracking 13.0.1.0.6
OCA-git-bot ffa5571
[IMP] pre-commit run -a
f073590
[IMP] Apply pre-commit changes: Resolve conflicts
Tardo f0bba01
[FIX] pre-commit run -a
98778b3
[IMP] mail_tracking: Discuss failed messages: Button and domain
Tardo 615edd0
[IMP] mail_tracking: Discuss failed messages: Only show confirmation …
Tardo 21012d6
[UPD] Update mail_tracking.pot
oca-travis 170caa2
mail_tracking 13.0.1.0.7
OCA-git-bot 0ea24c9
Update translation files
oca-transbot c1499d8
[FIX] mail_tracking: Store cc
Tardo 0cd6200
mail_tracking 13.0.1.0.8
OCA-git-bot 5a096c4
[IMP] mail_tracking: black, isort, prettier
AreebSiddiqiIR 97cbeda
[MIG] mail_tracking: Migration to 14.0
AreebSiddiqiIR 9f5a34a
[14.0][MIG] mail_tracking
SimoneVagile a5b00f7
[FIX] mail_tracking: Modification in unitest.
angelJuaGar 2367f3f
[UPD] Update mail_tracking.pot
oca-travis d4b3a78
[UPD] README.rst
OCA-git-bot 28a5449
[FIX] mail_tracking: reduce spammy score
4a5b2a6
[FIX] mail_tracking: Added restriction on email search.
angelJuaGar a98f089
mail_tracking 14.0.1.1.0
OCA-git-bot 12562dd
[FIX] Change operator to 'ilike'
JorgeQuinteros d98247b
mail_tracking 14.0.1.1.1
OCA-git-bot 5011a58
[UPD] Update mail_tracking.pot
oca-travis 27cdbfc
Update translation files
oca-transbot c1138b0
[UPD] Update mail_tracking.pot
oca-travis 998b51f
Update translation files
oca-transbot ec8b389
[PORT] porting js code to comply with OWL
houssine78 efe3dcb
[UPD] Update mail_tracking.pot
oca-travis 73a6446
Update translation files
oca-transbot 2c35e9b
[PEP8] pre-commit
houssine78 ccd0503
[UPD] Update mail_tracking.pot
oca-travis d148af0
[UPD] README.rst
OCA-git-bot e005608
mail_tracking 14.0.2.0.0
OCA-git-bot e95c476
Update translation files
oca-transbot 24a9f4a
[FIX] mail_tracking: use recipient_address to search emails
fernandahf 04b059a
[UPD] Update mail_tracking.pot
oca-travis c024f09
mail_tracking 14.0.2.0.1
OCA-git-bot c92249d
Update translation files
oca-transbot 02203de
[FIX] mail_tracking: change order of inheritance and use return
fernandahf 3f894af
mail_tracking 14.0.2.0.2
OCA-git-bot 90d158f
[IMP] mail_tracking: black, isort, prettier
JasminSForgeFlow e8b450d
[MIG] mail_tracking: Migration to 15.0
JasminSForgeFlow 9dfa28a
[UPD] Update mail_tracking.pot
fb18d20
[UPD] README.rst
OCA-git-bot 8df1d99
mail_tracking 15.0.1.0.1
OCA-git-bot 921f5eb
Fixed Deprecated Warning
06244fe
mail_tracking 15.0.1.0.2
OCA-git-bot c12a553
[UPD] Update mail_tracking.pot
9c98cea
Update translation files
oca-transbot afe6220
[FIX] mail_tracking: mixed classes
chienandalu 8b78a72
[IMP] mail_tracking_mailgun: mass mailing manual tracking
chienandalu 003ee3e
[FIX] mail_tracking: process sent events
cfda85a
[FIX] mail_tracking: error when filtering by "Sent"
sugapablo 7165e48
[FIX] mail_tracking: permissions
chienandalu 60ab6f7
[IMP] mail_tracking: remove legacy hooks
StephaneMangin 434ba35
[UPD] Update mail_tracking.pot
4f13651
mail_tracking 15.0.1.1.0
OCA-git-bot 3d5e49f
Update translation files
weblate 764e094
[FIX] mail_tracking: js linter warnings
chienandalu e6682d4
[UPD] Update mail_tracking.pot
3621a7d
mail_tracking 15.0.2.0.0
OCA-git-bot 54ff0b3
Update translation files
weblate 9bb48ba
use keyword arguments in build_email to comply with portal tests
jonasbuchholz e789ac6
mail_tracking 15.0.2.0.1
OCA-git-bot 960a23f
[FIX] mail_tracking: Crash to add malformed emails to recipients sugg…
sergio-teruel 75bd345
mail_tracking 15.0.2.0.2
OCA-git-bot 4e3dd4d
Translated using Weblate (Italian)
mymage 9fe9f2d
[UPD] Update mail_tracking.pot
0a13c84
Update translation files
weblate 804ad3a
Translated using Weblate (Italian)
francesco-ooops 17fcd66
Fix mail tracking bounce notification not logged
TDu f996458
mail_tracking 15.0.2.0.3
OCA-git-bot 2316c3f
[FIX] mail_tracking: thread permissions
chienandalu 869f257
mail_tracking 15.0.2.0.4
OCA-git-bot b79c30f
[FIX] mail_tracking: allowed trackings compute
chienandalu ee74c7b
mail_tracking 15.0.2.0.5
OCA-git-bot e801690
[IMP] mail_tracking: New config parameter to disable the tracking image
dhx eaf375e
Translated using Weblate (Italian)
mymage f4fe5e1
[UPD] README.rst
OCA-git-bot efc4d50
mail_tracking 15.0.3.0.0
OCA-git-bot 2d0d6a3
mail_tracking 15.0.3.0.1
OCA-git-bot 76cd5eb
[UPD] Update mail_tracking.pot
a534ad0
Update translation files
weblate c8fd2a1
[FIX] mail_tracking: failed messages in thread
chienandalu 9ba1a39
[UPD] Update mail_tracking.pot
781bf09
[UPD] README.rst
OCA-git-bot 158b4d7
mail_tracking 15.0.3.1.0
OCA-git-bot fdc9b8c
Update translation files
weblate 5ff6ab8
[UPD] README.rst
OCA-git-bot 10f2f95
[IMP] mail_tracking: pre-commit run
payen000 b3f4068
[MIG] mail_tracking: Migration to 16.0
filoquin ef73e2d
[MIG] mail_tracking: Completed migration to 16.0
payen000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
============== | ||
Email tracking | ||
============== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:ca8a2896ae3f0dde59aca1614bced5d2f330bf9dec28ee4e06de98a91e812011 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github | ||
:target: https://github.com/OCA/social/tree/15.0/mail_tracking | ||
:alt: OCA/social | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_tracking | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=15.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module shows email notification tracking status for any messages in | ||
mail thread (chatter). Each notified partner will have an intuitive icon just | ||
right to his name. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Installation | ||
============ | ||
|
||
If you're using a multi-database installation (with or without dbfilter option) | ||
where /web/databse/selector returns a list of more than one database, then | ||
you need to add ``mail_tracking`` addon to wide load addons list | ||
(by default, only ``web`` addon), setting ``--load`` option. | ||
For example, ``--load=web,mail_tracking`` | ||
|
||
Configuration | ||
============= | ||
|
||
As there can be scenarios where sending a tracking img in the email body is | ||
not desired, there is a global system parameter | ||
"mail_tracking.tracking_img_disabled" that can be set to True to remove | ||
the tracking img from all outgoing emails. Note that the **Opened** status | ||
will not be available in this case. | ||
|
||
Usage | ||
===== | ||
|
||
When user sends a message in mail_thread (chatter), for instance in partner | ||
form, then an email tracking is created for each email notification. Then a | ||
status icon will appear just right to name of notified partner. | ||
|
||
These are all available status icons: | ||
|
||
.. |sent| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/sent.png | ||
:width: 10px | ||
|
||
.. |delivered| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/delivered.png | ||
:width: 15px | ||
|
||
.. |opened| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/opened.png | ||
:width: 15px | ||
|
||
.. |error| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/error.png | ||
:width: 10px | ||
|
||
.. |waiting| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/waiting.png | ||
:width: 10px | ||
|
||
.. |unknown| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/unknown.png | ||
:width: 10px | ||
|
||
.. |cc| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/cc.png | ||
:width: 10px | ||
|
||
.. |noemail| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/no_email.png | ||
:width: 10px | ||
|
||
.. |anonuser| image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/src/img/anon_user.png | ||
:width: 10px | ||
|
||
|unknown| **Unknown**: No email tracking info available. Maybe this notified partner has 'Receive Inbox Notifications by Email' == 'Never' | ||
|
||
|waiting| **Waiting**: Waiting to be sent | ||
|
||
|error| **Error**: Error while sending | ||
|
||
|sent| **Sent**: Sent to SMTP server configured | ||
|
||
|delivered| **Delivered**: Delivered to final MX server | ||
|
||
|opened| **Opened**: Opened by partner | ||
|
||
|cc| **Cc**: It's a Carbon-Copy recipient. Can't know the status so is 'Unknown' | ||
|
||
|noemail| **No Email**: The partner doesn't have a defined email | ||
|
||
|anonuser| **No Partner**: The recipient doesn't have a defined partner | ||
|
||
|
||
If you want to see all tracking emails and events you can go to | ||
|
||
* Settings > Technical > Email > Tracking emails | ||
* Settings > Technical > Email > Tracking events | ||
|
||
When the message generates an 'error' status, it will apear on discuss 'Failed' | ||
channel. Any view with chatter can show the failed messages | ||
too. | ||
|
||
* Discuss | ||
|
||
.. image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/img/failed_message_discuss.png | ||
|
||
* Chatter | ||
|
||
.. image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/img/failed_message_widget.png | ||
|
||
You can use "Failed sent messages" filter present in all views to show records | ||
with messages in failed status and that needs an user action. | ||
|
||
* Filter | ||
|
||
.. image:: https://raw.githubusercontent.com/OCA/social/15.0/mail_tracking/static/img/failed_message_filter.png | ||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* Integrate with the core `mail.notification` model. A soft way would be to write a | ||
notification event along with the mail.tracking.event ones. Another way could be | ||
to merge both models and build the module features on top of it. This might imply | ||
a refactor though. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_tracking%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Pedro M. Baeza | ||
* Antonio Espinosa | ||
* David Vidal | ||
* Ernesto Tejeda | ||
* Rafael Blasco | ||
* Alexandre Díaz | ||
|
||
* `Eezee-IT <https://www.eezee-it.com>`_: | ||
* Asma Elferkhsi | ||
|
||
Other credits | ||
~~~~~~~~~~~~~ | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
* Thanks to `LlubNek <https://openclipart.org/user-detail/LlubNek>`_ and `Openclipart | ||
<https://openclipart.org>`_ for `the icon | ||
<https://openclipart.org/detail/19342/open-envelope>`_. | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/social <https://github.com/OCA/social/tree/15.0/mail_tracking>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import models | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com> | ||
# Copyright 2018 David Vidal - <david.vidal@tecnativa.com> | ||
# Copyright 2018 Tecnativa - Ernesto Tejeda | ||
# Copyright 2019 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Email tracking", | ||
"summary": "Email tracking system for all mails sent", | ||
"version": "16.0.1.0.0", | ||
"category": "Social Network", | ||
"website": "https://github.com/OCA/social", | ||
"author": ("Tecnativa, " "Odoo Community Association (OCA)"), | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"depends": ["mail"], | ||
"data": [ | ||
"data/tracking_data.xml", | ||
"security/mail_tracking_email_security.xml", | ||
"security/ir.model.access.csv", | ||
"views/mail_tracking_email_view.xml", | ||
"views/mail_tracking_event_view.xml", | ||
"views/mail_message_view.xml", | ||
"views/res_partner_view.xml", | ||
], | ||
"assets": { | ||
"web.assets_backend": [ | ||
"mail_tracking/static/src/client_actions/failed_message_storage.esm.js", | ||
"mail_tracking/static/src/models/chatter.esm.js", | ||
"mail_tracking/static/src/models/discuss_sidebar_mailbox_view.esm.js", | ||
"mail_tracking/static/src/models/discuss_view.esm.js", | ||
"mail_tracking/static/src/models/mailbox.esm.js", | ||
"mail_tracking/static/src/models/message_list_view_item.esm.js", | ||
"mail_tracking/static/src/models/message_list_view.esm.js", | ||
"mail_tracking/static/src/models/message_view.esm.js", | ||
"mail_tracking/static/src/models/message.esm.js", | ||
"mail_tracking/static/src/models/messaging_initializer.esm.js", | ||
"mail_tracking/static/src/models/messaging.esm.js", | ||
"mail_tracking/static/src/models/thread.esm.js", | ||
"mail_tracking/static/src/components/discuss/discuss.xml", | ||
"mail_tracking/static/src/components/message/message.xml", | ||
"mail_tracking/static/src/components/message/message.esm.js", | ||
"mail_tracking/static/src/components/message/message.scss", | ||
"mail_tracking/static/src/components/message_list/message_list.esm.js", | ||
"mail_tracking/static/src/components/failed_message/failed_message.xml", | ||
"mail_tracking/static/src/components/failed_message/failed_message.esm.js", | ||
"mail_tracking/static/src/components/failed_message/failed_message.scss", | ||
"mail_tracking/static/src/components/failed_message_list/failed_message_list.xml", | ||
"mail_tracking/static/src/components/failed_message_list/failed_message_list.esm.js", # noqa: B950 | ||
"mail_tracking/static/src/components/discuss_sidebar_mailbox/discuss_sidebar_mailbox.xml", # noqa: B950 | ||
"mail_tracking/static/src/components/discuss_sidebar_mailbox/discuss_sidebar_mailbox.esm.js", # noqa: B950 | ||
"mail_tracking/static/src/components/thread_view/thread_view.xml", | ||
"mail_tracking/static/src/components/thread_view/thread_view.scss", | ||
], | ||
}, | ||
"demo": ["demo/demo.xml"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import main | ||
from . import discuss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import http | ||
|
||
from odoo.addons.mail.controllers.discuss import DiscussController | ||
|
||
|
||
class MailTrackingDiscussController(DiscussController): | ||
@http.route() | ||
def mail_init_messaging(self, **kwargs): | ||
"""Route used to initial values of Discuss app""" | ||
values = super().mail_init_messaging(**kwargs) | ||
values.update( | ||
{"failed_counter": http.request.env["mail.message"].get_failed_count()} | ||
) | ||
return values | ||
|
||
@http.route("/mail/failed/messages", methods=["POST"], type="json", auth="user") | ||
def discuss_failed_messages(self, max_id=None, min_id=None, limit=30, **kwargs): | ||
return ( | ||
http.request.env["mail.message"] | ||
._message_fetch( | ||
domain=[("is_failed_message", "=", True)], | ||
max_id=max_id, | ||
min_id=min_id, | ||
limit=limit, | ||
) | ||
.message_format() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
import base64 | ||
import logging | ||
from contextlib import contextmanager | ||
|
||
import werkzeug | ||
|
||
import odoo | ||
from odoo import SUPERUSER_ID, api, http | ||
|
||
from odoo.addons.mail.controllers.mail import MailController | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
BLANK = "R0lGODlhAQABAIAAANvf7wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" | ||
|
||
|
||
@contextmanager | ||
def db_env(dbname): | ||
if not http.db_filter([dbname]): | ||
raise werkzeug.exceptions.BadRequest() | ||
cr = None | ||
if dbname == http.request.db: | ||
cr = http.request.cr | ||
if not cr: | ||
cr = odoo.sql_db.db_connect(dbname).cursor() | ||
yield api.Environment(cr, SUPERUSER_ID, {}) | ||
|
||
|
||
class MailTrackingController(MailController): | ||
def _request_metadata(self): | ||
"""Prepare remote info metadata""" | ||
request = http.request.httprequest | ||
return { | ||
"ip": request.remote_addr or False, | ||
"user_agent": request.user_agent or False, | ||
"os_family": request.user_agent.platform or False, | ||
"ua_family": request.user_agent.browser or False, | ||
} | ||
|
||
@http.route( | ||
[ | ||
"/mail/tracking/open/<string:db>" "/<int:tracking_email_id>/blank.gif", | ||
"/mail/tracking/open/<string:db>" | ||
"/<int:tracking_email_id>/<string:token>/blank.gif", | ||
], | ||
type="http", | ||
auth="none", | ||
methods=["GET"], | ||
) | ||
def mail_tracking_open(self, db, tracking_email_id, token=False, **kw): | ||
"""Route used to track mail openned (With & Without Token)""" | ||
metadata = self._request_metadata() | ||
with db_env(db) as env: | ||
try: | ||
tracking_email = ( | ||
env["mail.tracking.email"] | ||
.sudo() | ||
.search([("id", "=", tracking_email_id), ("token", "=", token)]) | ||
) | ||
if not tracking_email: | ||
_logger.warning( | ||
"MailTracking email '%s' not found", tracking_email_id | ||
) | ||
elif tracking_email.state in ("sent", "delivered"): | ||
tracking_email.event_create("open", metadata) | ||
except Exception as e: | ||
_logger.warning(e) | ||
|
||
# Always return GIF blank image | ||
response = werkzeug.wrappers.Response() | ||
response.mimetype = "image/gif" | ||
response.data = base64.b64decode(BLANK) | ||
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com> | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> | ||
<odoo> | ||
<record | ||
forcecreate="True" | ||
id="decimal_tracking_timestamp" | ||
model="decimal.precision" | ||
> | ||
<field name="name">MailTracking Timestamp</field> | ||
<field name="digits">6</field> | ||
</record> | ||
</odoo> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit description is dirty, it seems a lot of fixups were squashed without writting a proper description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I'll clean the description once I'm done implementing your suggestions, thanks!