Wednesday, September 4, 2024
14 changes · master
Enhancements to existing features
This update adds a small helper used while reducing jQuery reliance in Odoo's frontend code. It helps developers keep the web interface behavior consistent while modernizing the underlying code, with no expected direct change for everyday users.
Original PR description
This branch aims to create parents function which will return all parent of element provided in argument, this is similar to parents function of jQuery. task-3770362 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 appears to adjust behavior related to document preview shortcuts in Odoo's web interface. It is likely a small usability or maintenance update with limited business impact based on the available file information.
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 marks certain mail and discussion operations as read-only, helping the system handle them more safely and efficiently. The change is internal and should improve reliability without altering day-to-day user workflows.
Original PR description
task-4154478
This update brings the final skipped drag-and-drop sorting test back into use and moves it to the newer testing approach. It helps ensure Odoo's web interface remains stable and reduces the chance of future changes breaking sortable interactions.
Original PR description
This commit unskips and converts the last `sortable` test. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adds type information to core Odoo models and fields, making it easier for developers to catch mistakes earlier while working on the platform. It mainly improves internal code maintainability and editor support, with no direct change expected for everyday users.
Original PR description
[IMP] base: add typing on model and fields
----------------------------------------------------------
in order for typing to work under linux for odoo addons as well as base, you need to add symlinks (to simulate share repositories):
- to '`../../odoo/addons`' in a '`base/odoo/addons`' folder
- to '`../../addons`' in a '`community/odoo/addons`' folder
and modify the editor settings.
Example: VSCode settings.json for linter/pylance:
```
{
"python.defaultInterpreterPath": "/usr/bin/python3",
"emmet.extensionsPath": [
"odoo",
"base/odoo",
"community/odoo",
"enterprise/odoo",
],
"python.analysis.extraPaths": [
"odoo",
"base/odoo",
"community/odoo",
"enterprise/odoo",
],
}
```This update replaces older event-checking code with the browser’s built-in behavior across sign-in, web editor testing, and online shop checkout pages. It is a low-risk cleanup that helps keep these areas easier to maintain without changing the customer experience.
Original PR description
*: web_editor, website_sale The native Event `defaultPrevented` property can simply be used instead. Related to task-3930204
This update improves how Odoo identifies text that needs translation in the web interface. It helps ensure more labels, dialogs, menus, and settings screens can be translated consistently for users in different languages.
Original PR description
Owl PR that adds support for the suffix: https://github.com/odoo/owl/pull/1613
This update removes an older shared utility used to find page elements and replaces it with more standard browser behavior in public website widgets. Website editor behavior is preserved by keeping the specialized lookup where it is still needed, reducing shared technical complexity while maintaining customization options.
Original PR description
*: web_editor, website, website_crm_partner_assign, website_links, website_mail, website_sale_autocomplete This method was used to find a node in the DOM based on a jQuery selector. It could not be…
*: web_editor, website, website_crm_partner_assign, website_links,
website_mail, website_sale_autocomplete
This method was used to find a node in the DOM based on a jQuery selector. It could not be replaced by a simple `jQuery.find` because that function has not the search behavior we wanted.
jQuery find function behavior is:
$('A').find('B C') <=> $('A B C')
As some places, our search behavior needs to be:
$('A').find('B C') <=> $('A B C, B A C, AB C')
That behavior is actually the one of the `querySelectorAll` function. But we could not simply use it either as jQuery selectors syntax allows to do more things than the `querySelectorAll` one.
In the end, there were two remaining places using dom.cssFind:
1. The creation of `PublicWidget` instances, using their `selector` attribute. Looking at the codebase, there were no use case using a jQuery-specific syntax for those selectors. The only thing that may have been problematic is the use of `:has` which is not yet fully supported by `querySelectorAll` in all browsers. Even though we could ignore that because those browsers are rare, it was chosen to:
- Stop using cssFind for this use case and use `querySelectorAll`.
- Add a new `selectorHas` attribute to serve the `:has` purpose.
- Allow to give a function as the `selector` attribute allowing to search for elements to attach widget instances to, allowing all customizations to still do anything they want.
2. The creation of `SnippetOption` instances in the editor and their drag&drop rules (`data-selector`, `data-drop-in` and `data-drop-near` attributes). It was chosen to:
- Move the cssFind function (still using jQuery) into the website builder related class itself and keep using it. Note that the function was slightly simplified during that move.
- We may consider removing it later and using `querySelectorAll` too but this may need a bit more work than for `PublicWidget` instances.
Note that `PublicWidget` and `SnippetOption` classes are meant to be entirely reviewed in a near future, using OWL or OWL-like classes.Users can now search UNSPSC product classification records by code as well as by name. This makes it faster to find the right classification when users know the code prefix or exact code, reducing lookup time and improving accuracy.
Original PR description
[IMP] product_unspsc: add search by code to UNSPSC view Searching a UNSPC by name is not always the easier, as the codes have prefix, being able to filter them by code would be helpful Add search view with name and code for UNSPSC task-4130458
Approval users can now see and use request status in the approval request search view. This makes it easier to find and organize approval requests by their current state.
Original PR description
before this commit, approval request status was not added in approval request's search view after this commit, request status is added
Users can now select all matching documents even when grouped list sections are folded and no records are visible. Actions such as delete or archive remain available only when at least one document record is present, helping avoid unsupported operations.
Original PR description
This commit is an adaptation of the documents list view w.r.t. the changes done in https://github.com/odoo/odoo/pull/178779. We can now have a selection with no visible records (the whole domain is selected in that case). However, the delete/archive document logic requires at least a record. We thus only enable the feature when there's one. Task~4150362
The self-order kiosk setup now hides IoT Box launch buttons when no connected or compatible IoT Box is available. This avoids showing staff options that cannot be used, making setup clearer and reducing confusion.
Original PR description
If no IoT Box was connected to the db, or none was compatible, we could still see the buttons to open Kiosk on IoT Boxes. We now can't.
Task cards in Project and Field Service now show planned dates in a more compact format. This makes kanban cards easier to scan by removing unnecessary seconds, repeated dates, or hours depending on whether the task starts and ends on the same day.
Original PR description
Currently, the planned dates of a task takes too much space on the kanban card and could be rendered on 2 lines instead of one. The goal of this task is to reduce a bit the spaces taken by the planned dates in the kanban card of tasks. More specifically, we remove the seconds from the dates to gain space and we handle the following cases: - When the begin date and end date are the same: We shorten from this "08/23/2024 09:15:00 -> 08/23/2024 11:00:00" to this "08/23/2024 09:15 -> 11:00" (remove the end date) - When they are not: We shorten from this "08/23/2024 09:15:00 -> 08/30/2024 11:00:00" to this "08/23/2024 -> 08/30/2024" (remove the hours) task-4120069
The digest content now includes tips for Knowledge and WhatsApp to showcase new version 18 capabilities. This helps users discover relevant features directly from regular digest communications.
Original PR description
Add knowledge and whatsapp tips to showcase the new features added for v18. Related: https://github.com/odoo/odoo/pull/174316 Task-3762938