Daily updates from Odoo
Saturday, October 28, 2023
3 changes · 17.0
Enhancements to existing features
This update automatically deletes spreadsheet edit history for documents that haven't been modified in over a year. This helps keep database sizes manageable while preserving recent history for users who need to review past changes. Companies can adjust the one-year timeframe through system settings if needed.
Original PR description
Currently, as time goes, the revision table only grows and grows. Revisions were previously garbage collected after 3 months, but since the history feature (task 3142006) they are no longer deleted to allow going back in time. With this commit, to limit the size of databases, we delete the history of spreadsheets that have not been modified for more than a year (overridable with an 'ir.config_parameter') Task: 3562324
This update improves the dark mode experience across Odoo 17 by adjusting colors, improving contrast, and ensuring consistency between light and dark modes. The primary color has been changed to a lighter purple, the grayscale palette has been refined to prevent visibility issues, and various UI components have been updated to display correctly in dark mode. These changes ensure users have a better visual experience and consistent interface regardless of their theme preference.
Original PR description
This PR introduces several [adjustments and fixes for darkmode](https://pad.odoo.com/p/dark-mode-improvements). Requires : - https://github.com/odoo/odoo/pull/130991 -…
This PR introduces several [adjustments and fixes for darkmode](https://pad.odoo.com/p/dark-mode-improvements). Requires : - https://github.com/odoo/odoo/pull/130991 - https://github.com/odoo/o-spreadsheet/pull/3051 task-3201038 ## Why do we introduce these changes Dark mode was first released with Odoo 16. Back then the layout and color scheme of our modules was designed with a different approach. With Milk and its new design (https://github.com/odoo/odoo/pull/116641), we introduced some changes with a direct impact of our dark mode : - We reduced the use of borders and made them more subtle ; - We made some improvements to the greyscale ; - Some components or features were introduced ; - We revamped our SCSS files and variables. All these changes led to a need of updating the dark mode for Odoo 17. ## Main key changes - **Primary color** The primary color has been turned into a light purple in dark mode. By changing it to a lighter color we replicate the logic we introduced with Milk (subtle colour use and clean interfaces with the essentials informations standing out and we also improve consistency between light and dark mode, so the user keeps his marks. We also include a variant of that primary color for component and small texts that needs a good contrast. - `#914889`, the new `$o-enterprise-color` - `#d36cc7`, the new `$o-theme-text-colors, 'primary'`, based on a lighter shade of `$o-enterprise-color`. This is used for small texts and components that needs a better contrast. - **Greyscale** The greyscale had some issues, mainly due to the colours assigned to SCSS variables (e.g a button using `$o-gray-200` as background on a `$o-view-background-color`surface using `$o-gray-200` too would make the button invisible). This made us rethink our greyscale to avoid contrast issues between each color. We also reworked the steps between each `$o-gray-x`. - **Variables assigned values** Some similar classes (e.g `bg-white` and `bg-view` being white in light mode and pure black in dark mode) tended to be used without realising what impact it would have in dark mode. We checked some edge cases where the colours would look inconsistent in dark mode regarding the light mode and fixed the classes/variables use. - **Contrast improvement** As mentioned above, some colours could sometimes be very close to the one of the surface they were applied on. This could causes issues in term of elevation of a component, or simply in term of readability. With the updated greyscale, most of these issues are fixed. - **Consistency improvement** We also took this opportunity to reinforce the consistency between `light` and `dark` mode. The idea here is not to replicate the light mode 100% but to keep the keys principles consistent no matter what theme you are using. ## Issues fixed This PR also fixes some dark mode related issues from 16.x : ### Unwanted line under Control Panel saas-16.3 | saas-16.3-darkmode-improvment-mano-chgo :-------------------------:|:-------------------------:  |  -------------------------------- ### Separator not standing out saas-16.3 | saas-16.3-darkmode-improvment-mano-chgo :-------------------------:|:-------------------------:  |  -------------------------------- ### Tags colors not standing out in dark mode saas-16.3 | saas-16.3-darkmode-improvment-mano-chgo :-------------------------:|:-------------------------:  |  -------------------------------- ### Alerts colors were really dark in dark mode saas-16.3 (from up: primary, success, warning, danger, info) | saas-16.3-darkmode-improvment-mano-chgo :-------------------------:|:-------------------------:  |  -------------------------------- ### The menu column in Settings has a white background saas-16.3 | saas-16.3-darkmode-improvment-mano-chgo :-------------------------:|:-------------------------:  |  -------------------------------- ### Timesheet dark mode adapatations saas-16.3 | saas-16.3-darkmode-improvment-mano-chgo :-------------------------:|:-------------------------:  |  -------------------------------- Forward-Port-Of: odoo/enterprise#49416 Forward-Port-Of: odoo/enterprise#44458
Code cleanup and technical improvements
A method that was incorrectly named to suggest it deletes spreadsheet revisions has been removed and simplified. The method actually archives revisions rather than deleting them, and since the version history feature was added, permanent deletion is no longer possible. The single-line method has been inlined into the code for better clarity.
Original PR description
The method named `_delete_spreadsheet_reviions`: - the method archives instead of deleting - since the version history feature, we CANNOT delete them. Since it's only a single line, it can be inlined.