-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
|
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...)
mail_tracking/models/mail_message.py
Outdated
@@ -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
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 @chienandalu , I just added fixup! [MIG] mail_tracking: Migration to 18.0 (will squash after we all agree)
- As I inspected, _search_is_failed_message was not working. Without this commit, the condition in final query is always False => return no result
- I added a test to make sure it's covered
|
What do you think about #1458 (comment) ? |
34f41c7
to
c9c296f
Compare
* [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.
The following changes were implemented: 1 - Added Failed Message component and related components to reuse the Message component when rendering failed messages. This allows us to dispose of the messagefailed JS model altogether, since failed messages are now just regular messages that were marked as failed. 2 - Added Owl reactivity to failed message actions so that browser does not have to be reloaded each time a message is marked as reviewed or resent. 3 - Fixed 'Retry' and 'Set as reviewed' flows for failed messages. 4 - Fixed `Failed sent messages` filter on models by overriding `get_view` instead of `_fields_view_get` 5 - Refactored folder structure to more closely resemble the `mail` module's folder structure. 6 - Refactored module to utilize `Command` as a means to create, write, etc. instead of `[0, ...]`, `[4, ...]`. 7 - Fixed and added unit tests. 8 - Removed dead/unused code from `v15`.
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/es/
Currently translated at 27.2% (34 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/it/
Currently translated at 82.4% (103 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/pt_BR/
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.
c9c296f
to
8bcec37
Compare
8bcec37
to
a6bce24
Compare
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.
Code review. LG. Thanks!
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.
a6bce24
to
e992629
Compare
Hi @chienandalu , yes you're right. It causes confusion indeed. My approach is to reload the page: Look like it gets the same issue in 17.0 |
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