-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 #1
Conversation
* [ADD] mail_tracking addon * Add description icon * Fixes remarked * Fix Travis error * Remarks fixed
…ent events (#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 (#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`.
mail_tracking/models/mail_message.py
Outdated
tracking_ids = self.env["mail.tracking.email"]._search( | ||
[("state", f"{tracking_operator}", failed_states)] | ||
) |
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.
This seems very costly for a production database with 10 or 100 thousand of record in mail.tracking.email, it will return a lot of records.
I like better the previous implementation below,
( "mail_tracking_ids.state", "in" if value else "not in", list(self.get_failed_states()), ),
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.
Indeed, I agree
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.
As for comment OCA/social#1476 (comment)
Look like it gets the same issue in 17.0
No, it doesn't. You can try in a runboat. If don't remember it wrong there was a bus call in python that notified the state to the client so we didn't need to reload the whole page risking to loose context like the breadcrumb path...
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.
I agree with @TDu comment about the double search, it should be done in 1.
b9359cc
to
3899c6c
Compare
|
cc947a6
to
c37318b
Compare
c37318b
to
974b492
Compare
Hello @TDu, @ivantodorovich , @mmequignon, I updated the |
Hello @chienandalu, I just added this patch + use bus to fix the reactivity both in Discuss and Chatter, here is result: mail_tracking_v18.webmYes, you'r right, it works in v17 but only in Chatter, it does not work in Discuss (I ran in gevent mode), is that the same on your local ? mail_tracking_v17.webm |
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.
fine by me
This PR has the |
/ocabot merge nobump |
On my way to merge this fine PR! |
It looks like something changed on |
Congratulations, your PR was merged at 4d83b95. Thanks a lot for contributing to OCA. ❤️ |
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 OCA/social@7560443, then was resolved in odoo/odoo@7fe02c9
Result