Skip to content

[17.0][OU-IMP] mail: field_desc and field_type to field_info#5106

Closed
adasatorres wants to merge 2 commits intoOCA:17.0from
BinhexTeam:17.0-fix-mail
Closed

[17.0][OU-IMP] mail: field_desc and field_type to field_info#5106
adasatorres wants to merge 2 commits intoOCA:17.0from
BinhexTeam:17.0-fix-mail

Conversation

@adasatorres
Copy link

Possible solution for the following issue #5105 .

Copy link

@rrebollo rrebollo left a comment

Choose a reason for hiding this comment

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

Looks good but You need to reflect the changes in the upgrade_analysis_work.txt file. Example: openupgrade_scripts/scripts/website_sale/17.0.1.1/upgrade_analysis_work.txt

@MiquelRForgeFlow MiquelRForgeFlow added this to the 17.0 milestone Jun 17, 2025
@MiquelRForgeFlow
Copy link
Contributor

You need to reflect the changes in the upgrade_analysis_work.txt file

Exactly.

NEW res.groups: mail.group_mail_notification_type_inbox (noupdate)
# NOTHING TO DO

mail / mail.tracking.value / field_info (jsonb) : NEW isfunction: function, stored
Copy link
Contributor

Choose a reason for hiding this comment

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

you have to do something with lines 170-175.

Copy link
Author

Choose a reason for hiding this comment

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

@MiquelRForgeFlow Adding the DONE line below line 175 should be enough, right? Also, line 172 has the wrong field type — the field is actually of type jsonb.
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding the DONE line below line 175 should be enough, right?

No, because someone looking into this file will get confused, for duplicated/contradictory information. It's better to amend line 175 and explain your approach there.

Also, line 172 has the wrong field type — the field is actually of type jsonb.

Column type is jsonb, but odoo type is json. The same way you see many2one odoo types there instead of int4.

Copy link
Member

Choose a reason for hiding this comment

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

@adasatorres can you group together the lines and put for all of them the DONE message for continuing with this?

Copy link
Author

Choose a reason for hiding this comment

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

@pedrobaeza I was also thinking of adding the commit ID to the NOTHING TO DO.

@pedrobaeza
Copy link
Member

Anyway, I'm checking source code, and it seems that part is only filled when a ir.model.fields is removed:

https://github.com/odoo/odoo/blob/ee1e91ec69c71e783e7f291f8d19a2610c9070a3/addons/mail/models/ir_model_fields.py#L51

but no other reference to that in the rest of tracking references.

I have tried to set the value in one message, and I get an error:

imagen

as name key is mandatory, which is not being filled.

Filling that information on a regular tracking value, is not showing nothing extra on the chatter, as field_id is filled and the information is get from there.

On summary, this change is not correct and we can't recreate the information for ir.model.fields unlink trackings, so let's keep it as is.

Which thing brought you to this initially?

@adasatorres
Copy link
Author

The migration of project_task_report to version 17.0 is what led me to investigate the mail.tracking.value model. While reviewing the code, I saw that some methods were using that field to store information. I suppose I didn’t review it thoroughly enough — sorry about that. @pedrobaeza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants