Skip to content
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

[16.0][UPD][FIX] tracking_manager: specific O2M fields notify #3140

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

acsonefho
Copy link
Contributor

In some case, we may have some unconventionals O2M like on ir.attachment. The O2M relation is done on res_id value. This commit take them in consideration and avoid a traceback.

How to reproduce:
Just add a dynamic track on attachment_ids (example on account.move).
Then add an attachment on the account.move: you should see a new message into the chatter (that works perfectly)
Finally, remove this attachment: without this PR, you should see a traceback into logs. But with this PR, you should see a new message (about the unlink) in the chatter.

image

In some case, we may have some unconventionals O2M like on ir.attachment. The O2M relation is done on res_id value.
This commit take them in consideration and avoid a traceback
@OCA-git-bot
Copy link
Contributor

Hi @sebastienbeau, @Kev-Roche,
some modules you are maintaining are being modified, check this out!

Copy link

@AnizR AnizR left a comment

Choose a reason for hiding this comment

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

Great, thanks!

I had the same 'problem' because one of my users tried to track the field 'message_follower_ids'.

This allows tracking_manager to deal with One2Many/Many2oneReference without throwing an error.

@acsonefho
Copy link
Contributor Author

@rousseldenis Do you have super-power here? 💪 😎

@rvalyi
Copy link
Member

rvalyi commented Jan 24, 2025

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-3140-by-rvalyi-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 744f7f5 into OCA:16.0 Jan 24, 2025
8 of 9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 7e59fd2. Thanks a lot for contributing to OCA. ❤️

@acsonefho acsonefho deleted the tracking_manager_add_specific_o2m branch January 24, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants