Skip to content

[19.0][MIG] mail_tracking: Migration to 19.0#140

Open
quoc-pn wants to merge 107 commits into
OCA:19.0from
komit-consulting:19.0-mig-mail_tracking
Open

[19.0][MIG] mail_tracking: Migration to 19.0#140
quoc-pn wants to merge 107 commits into
OCA:19.0from
komit-consulting:19.0-mig-mail_tracking

Conversation

@quoc-pn
Copy link
Copy Markdown
Member

@quoc-pn quoc-pn commented Jan 24, 2026

Remove wizard model mail.resend.message and related code odoo/odoo@7e30fa8

@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch 3 times, most recently from e6b718c to 0edcf49 Compare January 26, 2026 11:52
@quoc-pn quoc-pn marked this pull request as ready for review January 26, 2026 11:52
@quoc-pn
Copy link
Copy Markdown
Member Author

quoc-pn commented Jan 26, 2026

It seems the instance test can not send emails, so the actions test keeps failing

@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch from 0edcf49 to 506778b Compare January 27, 2026 08:49
@AquaMCU
Copy link
Copy Markdown

AquaMCU commented Feb 2, 2026

Super! Any news when this will be merged?

Comment thread mail_tracking/models/ir_mail_server.py
Comment thread mail_tracking/models/mail_thread.py Outdated
Comment thread mail_tracking/models/res_partner.py
Comment thread mail_tracking/static/src/core/discuss/discuss_sidebar_mailboxes.xml Outdated
Comment thread mail_tracking/views/mail_tracking_event_view.xml
@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch 4 times, most recently from 7767756 to 990383e Compare February 3, 2026 08:22
@quoc-pn quoc-pn requested a review from cuongnmtm February 3, 2026 08:23
Comment thread mail_tracking/models/res_partner.py
@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch from 990383e to 6259569 Compare February 5, 2026 07:19
@AquaMCU
Copy link
Copy Markdown

AquaMCU commented Feb 10, 2026

Since I really need this module, one question: Do you guys expect major changes to come that will impact the database or can i already install this version and update to the official version later?

@cuongnmtm
Copy link
Copy Markdown

@AquaMCU I do not see any major changes that would impact the database or require a data migration.
It would be very helpful if you could help test this migration and provide feedback before planning to use it in production.

My teammate will work on getting all PR checks to pass.

@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch from 6259569 to 468d3ca Compare February 11, 2026 02:47
@AquaMCU
Copy link
Copy Markdown

AquaMCU commented Feb 11, 2026

Wow! It is nice to get involved ;) I tested on my installation ( 19.0 CE ) and it works perfect!

Copy link
Copy Markdown

@huan-tq huan-tq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional tested and it's LGTM!

@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch 6 times, most recently from a6ab858 to 45173ef Compare March 27, 2026 11:08
@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch from 45173ef to fb7bb95 Compare April 21, 2026 09:50
payen000 and others added 24 commits May 13, 2026 15:20
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.
…peruser

The previous condition to apply access restriction to mail tracking
email records was not applied to every user having access rights
settings. Hence, this could lead up to AccessError when trying
to open the model's action through the web client.

Since the access to these records is based on the same restrictions
that are implemented for mail.message model in the mail module,
we ended up having access error as there were records we were
allowed to search but not to read, due to the restriction being more
permissive in the case of mail tracking email.

But since the check_access method of this model is actually checking
if the user has access to the related mail.message, we need to have
the same conditions to avoid such access error for users with settings
access that are not superuser.
This prop was removed during the migration to 18.0 (974b492), probably by
mistake, and yet causing this regression.

The `onUpdate` prop is used here:
https://github.com/OCA/mail/blob/b0226505/mail_tracking/static/src/core/chatter/chatter.xml#L34

And so the UI breaks whene trying to render a thread that contains failed
messages.

Traceback:

```
UncaughtPromiseError > OwlError
Uncaught Promise > Invalid props for component 'FailedMessage': unknown key 'onUpdate'
Occured on localhost:8069 on 2025-09-04 17:57:30 GMT
OwlError: Invalid props for component 'FailedMessage': unknown key 'onUpdate'
    Error: Invalid props for component 'FailedMessage': unknown key 'onUpdate'
        at Object.validateProps (http://localhost:8069/web/assets/debug/web.assets_web.js:11207:19) (/web/static/lib/owl/owl.js:3214)
        at Chatter.template (eval at compile (http://localhost:8069/web/assets/debug/web.assets_web.js:13754:20), <anonymous>:30:17) (/web/static/lib/owl/owl.js:5761)
        at Chatter.template (eval at compile (http://localhost:8069/web/assets/debug/web.assets_web.js:13754:20), <anonymous>:194:30) (/web/static/lib/owl/owl.js:5761)
        at Fiber._render (http://localhost:8069/web/assets/debug/web.assets_web.js:9776:38) (/web/static/lib/owl/owl.js:1783)
        at Fiber.render (http://localhost:8069/web/assets/debug/web.assets_web.js:9768:18) (/web/static/lib/owl/owl.js:1775)
        at ComponentNode.updateAndRender (http://localhost:8069/web/assets/debug/web.assets_web.js:10564:19) (/web/static/lib/owl/owl.js:2571)
```
This is dead code since the Migration to 18.0 (974b492), when the
`messaging_service_patch.esm.js` was removed and replaced by a new
`mail_core_common_service_patch.esm.js`
…thod

The controller that called this method was removed during the Migration to 16.0,
OCA/social@ef73e2d

This method is a left-over, it's not used anywhere since.
There's already a collapsable panel for failed messages in the chatter.
Having this other panel is totally redundant, and it was a bit glitchy too.
Before this commit, when the user clicked on the icon of a message, the following error occurred:
ValueError: not enough values to unpack (expected 4, got 0)

Complementary to 86e188c
…s reviewed

Before these changes, when the bus event was received in tabs that did not have the message open, an error appeared because the system was not able to find the message.

After these changes, if the message is not available on the screen, the process continues because synchronization will not be necessary, and therefore the error will no longer occur.
@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch from cf1aeb3 to 6d35c03 Compare May 13, 2026 08:21
@AquaMCU
Copy link
Copy Markdown

AquaMCU commented May 14, 2026

Can we merge this?

@quoc-pn
Copy link
Copy Markdown
Member Author

quoc-pn commented May 14, 2026

Can we merge this?

@AquaMCU, please help review/test and approve the PR.

I will work to resolve the failed checks.

@hoattk-komit
Copy link
Copy Markdown

Tested and LGTM

@quoc-pn quoc-pn force-pushed the 19.0-mig-mail_tracking branch from 552355a to 733d11c Compare May 16, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.