Commit Graph

22 Commits (7c6f59fe7be10c80886ff9cd494e10367d740f1f)

Author SHA1 Message Date
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
Alexandre Díaz 4f2018471e [IMP] mail_tracking: Store To recipients and omit aliases 2020-03-24 18:32:03 +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 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 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
David 0fd2b031ef [MIG] mail_tracking: Migration to 11.0 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
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
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 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