Thursday, March 2, 2023
8 changes · master
Code cleanup and technical improvements
This update streamlines how Odoo tracks edited fields in forms and lists by replacing a direct field property with a shared internal notification mechanism. It should make the web interface code easier to maintain while keeping normal user workflows unchanged.
Original PR description
This commit, is part of a series of commits that aim to simplifie the concrete fields API. In this commit we will remove setDirty prop from concrete fields. Now if needed the fields can declare itself dirty using triggering "FIELD_IS_DIRTY" on the model's bus. Note that this PR partially revert [1] and completely revert [2] task-id 3179751 [1] : https://github.com/odoo/odoo/commit/89c2a3978e5f46b003789f8a8a06d69162f4a404 [2]: https://github.com/odoo/odoo/commit/c79bb3c9c6ba7fcbd6cd8ad3919f83a4fa777d0a
This change moves the main attachment capability out of a broadly used messaging component and applies it only to business records that actually need it. This should reduce unnecessary overhead across the system while preserving attachment behavior in areas such as accounting, expenses, time off, employees, and recruitment.
Original PR description
Main attachment is quite costly and as it is implemented in mail.thread and is therefore present in most model. In order to improve performance, we remove it here from mail.thread and add it through a new mixin,only on model that effectively use that features. See sub commits for more details. Task-2648976
Spreadsheet downloads now wait for background formulas to finish using direct data source updates instead of a repeated timer. This makes loading behavior cleaner and more dependable, with no visible workflow change for users.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change removes duplicate spreadsheet sorting code and reuses the shared version already available in Odoo. It helps keep behavior consistent across the system and makes future maintenance safer, with no expected change for users.
Original PR description
The orderByToString function has been duplicated in spreadsheet. We will replace it with the one defined in web. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The graph view code was cleaned up by removing an unused dependency and streamlining how chart data points are processed. This should make the feature easier to maintain without changing how users interact with graphs.
Original PR description
We remove a useless import of GroupByMenu and refactor the processing of data points in the model.
This update adjusts how color picker and priority fields determine their display context, reducing reliance on an internal view setting. It helps keep these interface elements more consistent and easier to maintain without changing the overall user workflow.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update simplifies how several Odoo apps read field values behind the scenes. It should make future maintenance easier and reduce implementation complexity without changing day-to-day user workflows.
This change narrows a costly attachment capability so it is only enabled on records that actually use it. This should improve overall system performance while preserving attachment previews and related behavior where needed.
Original PR description
Main attachment is quite costly and as it is implemented in mail.thread and is therefore present in most model. In order to improve performance, we remove it here from mail.thread and add it through a new mixin,only on model that effectively use that features. See sub commits for more details. Task-2648976