8000 [IMP] mail: remove the use of read in activity _to_store by phenix-factory · Pull Request #189598 · odoo/odoo · GitHub
[go: up one dir, main page]

Skip to content

[IMP] mail: remove the use of read in activity _to_store #189598

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

Closed

Conversation

phenix-factory
Copy link
Contributor
@phenix-factory phenix-factory commented Dec 4, 2024

Currently the _to_store of mail.activity is actually returning all fields (just using read() result).
In order to improve _to_store and also to reduce the number of useless fields we send, we should actually list only the fields we need (also taking care of overrides if necessary). In a similar pattern as other _to_store methods.

PR enterprise: https://github.com/odoo/enterprise/pull/75172

Task-4364655

@robodoo
Copy link
Contributor
robodoo commented Dec 4, 2024

Pull request status dashboard

@C3POdoo C3POdoo added the RD research & development, internal work label Dec 4, 2024
@phenix-factory phenix-factory force-pushed the master-activity-_to_store-did branch 8 times, most recently from 989e77e to f18a373 Compare December 5, 2024 10:50
@phenix-factory phenix-factory force-pushed the master-activity-_to_store-did branch 2 times, most recently from 03acfea to d3a78e8 Compare December 5, 2024 14:30
@phenix-factory phenix-factory marked this pull request as ready for review December 9, 2024 08:10
@C3POdoo C3POdoo requested review from a team December 9, 2024 08:12
@phenix-factory phenix-factory force-pushed the master-activity-_to_store-did branch from d3a78e8 to 79478ac Compare December 9, 2024 08:57
@seb-odoo
Copy link
Contributor
seb-odoo commented Dec 9, 2024

There are missing parts to the PR, the goal is also to use _read_format with classic read=False to avoid [id, display name] in return but to properly return flat relations with ids and record data separately.

This requires creating the missing models and updating static/ code when access to relation field of activity are done with brackets.

Note: we'll very likely merge this one after #184344

@phenix-factory phenix-factory force-pushed the master-activity-_to_store-did branch 9 times, most recently from 58ba643 to 5b93873 Compare December 10, 2024 09:01
@seb-odoo
Copy link
Contributor

@robodoo override=ci/security rebase-ff
activity note field sanitized in python

@robodoo
Copy link
Contributor
robodoo commented Feb 17, 2025

Merge method set to rebase and fast-forward.

@phenix-factory phenix-factory force-pushed the master-activity-_to_store-did branch from 1bf564b to cc89ca3 Compare February 17, 2025 11:43
Currently the `_to_store` of `mail.activity` is actually returning all fields (just using `read()` result).
In order to improve _to_store and also to reduce the number of useless fields we
send, we should actually list only the fields we need (also taking care of
overrides if necessary). In a similar pattern as other _to_store methods.

Task-4364655
@phenix-factory phenix-factory force-pushed the master-activity-_to_store-did branch from cc89ca3 to c8396da Compare February 17, 2025 11:45
Copy link
Contributor
@seb-odoo seb-odoo left a comment

Choose a reason for hiding this comment

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

robodoo pushed a commit that referenced this pull request Feb 17, 2025
Part-of: #189598
Related: odoo/enterprise#75172
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
robodoo pushed a commit that referenced this pull request Feb 17, 2025
Currently the `_to_store` of `mail.activity` is actually returning all fields (just using `read()` result).
In order to improve _to_store and also to reduce the number of useless fields we
send, we should actually list only the fields we need (also taking care of
overrides if necessary). In a similar pattern as other _to_store methods.

Task-4364655

closes #189598

Related: odoo/enterprise#75172
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
robodoo pushed a commit that referenced this pull request Feb 17, 2025
Part-of: #189598
Related: odoo/enterprise#75172
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
robodoo pushed a commit that referenced this pull request Feb 17, 2025
Currently the `_to_store` of `mail.activity` is actually returning all fields (just using `read()` result).
In order to improve _to_store and also to reduce the number of useless fields we
send, we should actually list only the fields we need (also taking care of
overrides if necessary). In a similar pattern as other _to_store methods.

Task-4364655

closes #189598

Related: odoo/enterprise#75172
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
@robodoo robodoo added the 18.3 label Feb 17, 2025
@robodoo robodoo closed this Feb 17, 2025
@alexkuhn alexkuhn deleted the master-activity-_to_store-did branch February 17, 2025 20:33
seb-odoo added a commit to odoo-dev/odoo that referenced this pull request May 16, 2025
robodoo pushed a commit that referenced this pull request May 17, 2025
Follow up of #189598
Follow up of #210060

task-4794562

closes #210296

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
seb-odoo added a commit to odoo-dev/odoo that referenced this pull request May 19, 2025
robodoo pushed a commit that referenced this pull request May 22, 2025
Follow up of #189598
Follow up of #210060

task-4794562

closes #210495

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
18.3 RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0