-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
[18.0][MIG] mail_tracking: Migration to 18.0 #1476
base: 18.0
Are you sure you want to change the base?
Conversation
* [ADD] mail_tracking addon * Add description icon * Fixes remarked * Fix Travis error * Remarks fixed
…ent events (OCA#82) [IMP] mail_tracking: Speed installation time, discard concurrent events and other fixes
* Improve tests * Show trackings even if partner removed * Disable CSRF protection to webhooks controllers
…s and contacts to bounce (OCA#133)
As regular users can't access this object.
* [FIX] Only one data-odoo-tracking-email tag in each email * [FIX] Get status even in multicompany instances
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
Currently translated at 100.0% (82 of 82 strings) Translation: social-11.0/social-11.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-11-0/social-11-0-mail_tracking/fr/
For giving more priority to other buttons like the invoices one.
Currently translated at 96.3% (79 of 82 strings) Translation: social-11.0/social-11.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-11-0/social-11-0-mail_tracking/ca/
Or infinite recursions will happen on other `write` overwrites, like the one that happens on `mass_mailing_partner`.
Currently translated at 29.8% (34 of 114 strings) Translation: social-15.0/social-15.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_tracking/it/
Currently translated at 100.0% (125 of 125 strings) Translation: social-16.0/social-16.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_tracking/fr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-17.0/social-17.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_tracking/
Currently translated at 100.0% (128 of 128 strings) Translation: social-17.0/social-17.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_tracking/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-17.0/social-17.0-mail_tracking Translate-URL: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_tracking/
Add autovacuum to mail_tracking_email that removes old records based on new configuration variable mail_tracking_email_max_age_days. Due to possibly a large number of records to be deleted on first run, set a default limit of 5000 per run.
|
df5d6c7
to
794a168
Compare
/ocabot migration mail_tracking |
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.
Huge work @trisdoan !
I should try with a real mail configuration. For the moment:
Installing the module in runboat doesn't load for me the demo failed messages for retry (I saw in them in your screenshot thou...)
@@ -29,7 +30,7 @@ class MailMessage(models.Model): | |||
) | |||
is_failed_message = fields.Boolean( | |||
compute="_compute_is_failed_message", | |||
search="_search_is_failed_message", | |||
store=True, |
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.
Do we really need to make it stored?
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.
Hi, this flag is used to populate the controller: /mail/failed/messages
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.
Please don't change how it was, no stored and with search method. Or does any reason for changing it?
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.
Hi @pedrobaeza, yes I agree there is no need to store it in db. But look like the search method is not working.
I am working on it, will update when it's done
DRAFT: inspect |
What do you think about #1458 (comment) ? |
Note
Big changes in 18.0
Backend
access_rights_uid
was removed from_search()
changed in odoo/odoo@21d023e_prepare_outgoing_list
got extra parammail_server
in odoo/odoo@97ce084_message_format
was converted to use store andmessage_format_extras
was removed in odoo/odoo@52df49e. As consequences,_extras_to_store
is introducedtools.ustr
is considered to be inefficient and flagged as deprecated in odoo/odoo@64a5724. Hence, is replaced byexception_to_unicode
for the same effect.Frontend
mail.messaging
service was removed in odoo/odoo@683258binitMessagingCallback
is removed in odoo/odoo@4f8087f. So new entry point is created for storeonStarted
instead.This changes
Store helper was introduced in odoo/odoo@c032ccf. As consequences, failed data is now passed through Store.
As Odoo uses less Jquery, the module runs fine with vanilla. This impacts
mail_tracking/static/src/components/message_tracking/message_tracking.esm.js
Took this chance to
replace % format with f-string
Improve permission constraint
- First, use the query to get result
- Browse those id with the query + Remove any forbidden records
- Return the accessible records in form of query, to continue the process
- The low-level method
_check_access
will discard forbidden records + raise exceptionResolve FIXME, which was added in 7560443, then was resolved in odoo/odoo@7fe02c9
Result