Daily updates from Odoo
Tuesday, March 19, 2024
5 changes · saas-17.1
Enhancements to existing features
This update enhances the text highlighting feature across Odoo's website and web editor, making it more reliable and visually consistent. Specifically, it fixes an issue where highlights were visible even when scrolling, and streamlines the code for better performance and maintainability.
Original PR description
The goal of this PR is to improve the current text highlight system by adding the following updates: - Move the highlight option's related CSS ([data-set-text-highlight]) to website. - Update the…
The goal of this PR is to improve the current text highlight system by adding the following updates: - Move the highlight option's related CSS ([data-set-text-highlight]) to website. - Update the `selectStyle` options to handle the default "currentColor" value. - Force to hide the highlight options overlay opacity on scroll. - Remove the dead code of `getDOMRectWidth()` (used in older versions to compare text content width on page load). - The `o_text_highlight_item_dirty` class is no longer used to adapt non-detected highlight items (the highlight mutation observer was tweaked to detect and adapt the new highlight items added to the DOM after editors commands. E.g. after the `oEnter()` command). - The editor's code (`_handleTextOptions()`) will only set text highlight classes and activate the snippet. Highlight DOM adaptations (multi-line detection, setting SVGs...) are done by the public widget. - A `z-index:` CSS (used to keep the highlight SVG visible and behind the text at the same time) is replaced by a more appropriate `isolation: isolate;`. - Only use one global `resizeObserver` to adapt the text highlights on resize. - The text highlight effects list was updated. task-3285817 Forward-Port-Of: odoo/odoo#142968
Resolved issues and error corrections
This update resolves a bug where the survey join link wasn't copying to the clipboard when accessed within a live session. The issue was due to a technical problem with how the link was being targeted, and has now been corrected. Users can now reliably copy and share the survey link.
Original PR description
Steps to reproduce =================== - Launch a survey in a live session. - Start the survey. - Click on the link to join. - The link didn't copy to the clipboard. Technical =========== Here the target element is the input tag so 'textcontent' will not work for that moved the 'o_survey_session_copy_url' class in span tag. This commit has resulted in a breakdown of the feature's https://github.com/odoo/odoo/commit/b62eff731b06520f9669684635cbed408e0fc35c After this commit ================== The link will be copied to the clipboard. Task-3792666
This update resolves an issue where the website's extra menu editing test was failing in version 17.0. The fix ensures the test remains stable by preventing the extra menu from being closed automatically after resizing, addressing a previous state management problem.
Original PR description
Starting from The "unbreakable menu fix" on `16.0` (see: [1]), the state of the website extra menu was stored before every "resize" adaptation, so it can be possible to reopen it if it was already…
Starting from The "unbreakable menu fix" on `16.0` (see: [1]), the state of the website extra menu was stored before every "resize" adaptation, so it can be possible to reopen it if it was already opened. On `17.0`, the same behaviour was fixed using the `odooEditor` > `withoutRollback()` mechanism (see: [2]), and a step was added to the `edit_menus` test (`clickOnExtraMenuItem`) to open the extra menu after the "edit mode resize" [3]. The forward port of [1], on `17.0` was adapted to keep the main fix from [2], and removed the tour step since the extra menu will be automatically opened if it was already open before the "resize". Now, if we have a menu with no overflowing items before the resize, and after switching to "edit" mode an extra menu was added, this menu will be closed by default which makes the test fail without the step in [3]. The goal of this commit is to fix this behaviour by simply restoring the `clickOnExtraMenuItem` step with a simple tweak: We don't click if the extra menu is already opened to prevent closing it again. Remark: the test failed on `17.0` but the commit is targeting `16.0` to prevent any test failure linked to the "extra menu auto open" feature. [1]: https://github.com/odoo/odoo/commit/2598cc9ef7fe89a0ce5e375bca6f6a781f6ffdf7 [2]: https://github.com/odoo/odoo/commit/cbed990924887eb529056d89a042a92ba27b825b Related to opw-3484742 Related to task-3439226 Forward-Port-Of: odoo/odoo#155559
This update resolves an issue where the filtering of work locations in the HR module was incorrectly restricted. The previous change caused problems with how employees were assigned to their work locations. This fix ensures accurate location filtering within the HR system.
Original PR description
With this commit, the domain of work location domain is reintroduced. It was a mistake introduced by this PR : odoo/odoo#129308 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157441
This update resolves an issue where automatic invoice creation would trigger errors and tracebacks. The fix ensures invoices are correctly handled, preventing errors during payment processing and improving the reliability of invoice generation. This improves the overall customer experience.
Original PR description
Before this commit, when the automatic invoice setting is enabled, a traceback would be shown when customers pay and the post-processing of the transaction tries to create an invoice. The problem is that the invoice is created in sudo, but it's unsudoed before logging invoices in the chatter. Now, the invoice will stay sudoed if the method is called in sudo. opw-3700576 Forward-Port-Of: odoo/odoo#157779