Commit Graph

45 Commits (88d6b8073f35fb9585ac0069bb91786a377a69d8)

Author SHA1 Message Date
Jairo Llopis 87de5ddb38
[FIX] mail_tracking: process sent events
Up until now, the `sent` event type was never processed, probably because it "made no sense", as an unsent email would never trigger an event.

However, it makes sense to process it because you may have a local relay that transmits mails over to the mail provider. In those circumstances, you should have 2 "sent" events (one from the relay and another one from the provider).

Also marked some useless parts of code for removal.

@Tecnativa TT32365
2021-10-15 11:58:00 +01:00
nmadhoc cffbefcc07 [FIX] mail_tracking
When a user try to resend message gets an error stating that it's only allowed for users who belong to the Administration/Settings group
2021-02-03 20:41:40 +01:00
OCA-git-bot 22b9a44f49 Merge PR #624 into 12.0
Signed-off-by pedrobaeza
2020-12-03 20:32:33 +00:00
Alexandre D. Díaz 7560443906 [IMP] mail_tracking: Discuss failed messages: Button and domain 2020-12-03 21:17:48 +01:00
Wolfgang Pichler d50a8ff4ed [FIX] re.search will return None when nothing found. So we have to check for this 2020-10-23 14:16:12 +02:00
Jairo Llopis fa7cf1ef80 [FIX] mail_tracking: performance fix
When searching for failed messages, [this line][1] made Odoo search messages in 2 steps:

1. Find which `mail.tracking.email` records are in those states.
2. Find which of them belong to the present `mail.message` records.

Step 2 could take a long time if there were a lot of failures in a DB. In our proven case, this made loading the `res.partner` form view take about ~6s per partner. It was also slowing down other views.

With this simple fix, [that nasty line linked above][1] is solved with just one query like this:

```SQL
SELECT "mail_message".id FROM "mail_tracking_email" as "mail_message__mail_tracking_ids","mail_message"
WHERE ("mail_message"."id"="mail_message__mail_tracking_ids"."maiL_message_id") AND (((("mail_message"."model" = 'res.partner')  AND ("mail_message"."mail_tracking_needs_action" = true))  AND  ("mail_message__mail_tracking_ids"."state" in ('rejected','error','bounced','soft-bounced','spam')))  AND  ("mail_message"."res_id" in (1000)))
ORDER BY "mail_message"."id" DESC
```

Thus this makes the forms load at normal speed again.

[1]: 8bd98212b8/mail_tracking/models/mail_thread.py (L25)
2020-07-23 12:53:26 +02:00
Jairo Llopis 50f0e6a41d [FIX] mail_tracking: do not slurp exceptions
This code chunk is expected to raise. Slurping it doesn't help upstream methods that rely on these exceptions.

@Tecnativa TT24457
2020-06-24 10:48:00 +01:00
Alexandre Díaz 29b6ee1e1e [IMP] mail_tracking: Ignore catchall 2020-04-22 16:26:08 +02:00
Alexandre Díaz d5f3483eec [IMP] mail_tracking: Use 'self' directly 2020-03-25 15:40:25 +01:00
Alexandre Díaz 4f2018471e [IMP] mail_tracking: Store To recipients and omit aliases 2020-03-24 18:32:03 +01:00
Alexandre Díaz d389d7f8f7 [FIX] mail_tracking: Changed injection method for 'failed_message_ids' field
Before this commit, some methods with views crashes trying to
process 'failed_message_ids' field.
After this commit the 'failed_message_ids' field description
is properly generated.
2019-12-09 15:45:47 +01:00
Alexandre Díaz 68173a18b0 [FIX] mail_tracking: Refresh thread widget when sets a message as reviewed
Previous this commit, failed messages widget data wasn't updated properly when you
set as reviewed/retry the last message displayed.

This commit resolve the problem and improves the "set as reviewed" action to avoid
multi-user inconsistencies (don't toggle the value).
2019-11-15 20:55:41 +01:00
Alexandre Díaz d050805c7d fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-11-12 18:26:53 +01:00
Alexandre Díaz f4b56004a9 fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-11-07 12:53:57 +01:00
Alexandre Díaz 032499297c fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-11-06 02:44:01 +01:00
Alexandre Díaz f6a561fe07 fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-10-31 18:56:33 +01:00
Alexandre Díaz 714983bdae fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-10-31 14:46:08 +01:00
Alexandre Díaz 9a18de6229 fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-10-29 13:21:00 +01:00
Alexandre Díaz 3a729cf544 fixup! [IMP] mail_tracking: Failed Messages to 12.0 2019-10-29 13:01:21 +01:00
Alexandre Díaz 293dd39ff6 [IMP] mail_tracking: Failed Messages to 12.0 2019-10-25 20:15:44 +02:00
Alexandre Díaz 3aba1d476a [IMP] mail_tracking: translations 2019-10-21 12:24:54 +02:00
Alexandre Díaz f15bdff0f8 [IMP] mail_tracking: Convert 'partner_trackings' to dict 2019-10-21 12:24:54 +02:00
Alexandre Díaz 185140032c [IMP] mail_tracking: Cc name & check if mail is Cc 2019-10-21 12:24:54 +02:00
David c94af853cc [IMP] mail_tracking: mail.thread filter for tracking errors
- Any model inheriting from mail.thread will have a filter available to
obtain records with errors in their messages trackings.
- The messages can be marked as done to avoid false positives when the
issues are solved.
2019-10-21 12:24:54 +02:00
Alexandre Díaz 53b2692f28 [FIX] mail_tracking: Repeated suggested cc emails 2019-07-22 20:23:22 +02:00
Alexandre Díaz c36b61b1a1 [MIG] mail_tracking: Adapt Cc to 12.0 2019-07-19 07:40:15 +00:00
Alexandre Díaz 61a719d861 [IMP] mail_tracking: Cc 2019-07-19 07:40:15 +00:00
Pedro M. Baeza 007d8ada83 [FIX] mail_tracking: Don't call write inside other write
Or infinite recursions will happen on other `write` overwrites, like the one that happens
on `mass_mailing_partner`.
2019-06-26 20:45:01 +02:00
ernesto 9f6d72034f [MIG] mail_tracking: Migration to 12.0 2019-01-07 02:40:06 -05:00
David Vidal 29b465365f [IMP] mail_tracking: email score performance (#299) 2018-12-18 12:31:00 -05:00
David 0fd2b031ef [MIG] mail_tracking: Migration to 11.0 2018-12-18 12:31:00 -05:00
eLBati 3f490609c5 IMP mail_tracking performances
On our server,
queries based on "mail_tracking_event"."tracking_email_id" improved from 501,924 ms to 1,840 ms
queries based on "mail_tracking_email"."mail_message_id" improved from 167,436 ms to 3,223 ms

The last ones are run several times when a thread has many messages
2018-12-18 12:31:00 -05:00
Antonio Espinosa 0c02f4bab5 [FIX] mail_tracking: bugfixes (#199)
* [FIX] Only one data-odoo-tracking-email tag in each email
* [FIX] Get status even in multicompany instances
2018-12-18 12:31:00 -05:00
Pedro M. Baeza ecb876f911 [FIX] mail_tracking: Obtain outgoing server with sudo
As regular users can't access this object.
2018-12-18 12:30:59 -05:00
Antonio Espinosa 57217b8549 [9.0][FIX][mail_tracking] Control exception when mail_message was removed (#132) 2018-12-18 12:30:59 -05:00
Antonio Espinosa 7740941b17 [8.0][FIX][mail_tracking] Use event recipient address to find partners and contacts to bounce (#133) 2018-12-18 12:30:59 -05:00
Antonio Espinosa 2b9556f029 Add access to portal/public user to his own email trackings 2018-12-18 12:30:59 -05:00
Antonio Espinosa 7f6bc7a45f [IMP] mail_tracking: Allow to define a custom mail_tracking base url 2018-12-18 12:30:59 -05:00
Antonio Espinosa 7f4e369d53 [IMP] mail_tracking performance and bounce process (#103) 2018-12-18 12:30:59 -05:00
Damien Bouvy 9bb2e239b7 [MIG] mail_tracking: Migrated to 10.0 2018-12-18 12:30:58 -05:00
Pedro M. Baeza e2f4f722fc [FIX] mail_tracking: Typo 2018-12-18 12:30:58 -05:00
Antonio Espinosa 5b01c956be [MIG] mail_tracking
* Improve tests
* Show trackings even if partner removed
* Disable CSRF protection to webhooks controllers
2018-12-18 12:30:58 -05:00
Antonio Espinosa a7fac21db8 [FIX] Update email_score when email changes 2018-12-18 12:30:58 -05:00
Antonio Espinosa e2a97e25fe [8.0][IMP][mail_tracking] Speed installation time and discard concurrent events (#82)
[IMP] mail_tracking: Speed installation time, discard concurrent events and other fixes
2018-12-18 12:30:58 -05:00
Antonio Espinosa bc83763427 [8.0][ADD] mail_tracking addon (#67)
* [ADD] mail_tracking addon

* Add description icon

* Fixes remarked

* Fix Travis error

* Remarks fixed
2018-12-18 12:30:58 -05:00