Tuesday, February 27, 2024
8 changes · 17.0
Enhancements to existing features
The web interface's dropdown component has been improved to make it easier for developers to customize specific parts of its behavior. Instead of having to rewrite an entire function, developers can now override just the specific piece they need to modify, reducing complexity and maintenance effort.
Original PR description
With this commit, overriding the `onWindowClick` function from `dropdown.js` becomes much simpler. Previously, it necessitated overriding the entire function, but now it can be done with minimal effort by just overriding this specific part. task-3717014 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154315
Resolved issues and error corrections
When permanently deleting a document from the trash, the file size displayed in the inspector was not updating correctly and would show a non-zero size even though the trash appeared empty. This fix reloads the data to ensure the file size is accurately recalculated after deletion.
Original PR description
How to reproduce: - Open the app document - Ensure the trash is empty - Select a document from any workspace (not too small so that the displayed size in MB is different from 0) - Move it to the trash - Open the trash - Select the document and click on delete in the inspector - Confirm the permanent deletion The inspector displays 0 documents but the size is different from 0 MB. This fixes the error by reloading the model forcing the re-computation of the size. Technical notes: no test has been added as the tour that test the deletion uses small documents which prevents to add assertion about the size (as the size is 0 even when a document is present in the trash). Task-3637482
Code cleanup and technical improvements
This update removes an unnecessary workaround that was preventing prices from being recalculated in sales orders. The workaround is no longer needed because the system now handles data more efficiently, only sending the information that's actually needed rather than redundant data. This cleanup improves system performance and reduces unnecessary processing.
Original PR description
This reverts commit 789186a43c0234c7b3cb308b1b6673adeedbb308. The fix is not necessary in 17+ since the new onchange only sends the necessary information and not the whole x2m record data. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
**Issue:** Adding a new block in mailing in email marketing raises an error. Steps to reproduce the issue: 1. Go to email marketing 2. Create a new mailing 3. Create one from scratch 4. Drop any block (or click on the outside empty background) **TypeError :** Cannot read properties of null (reading 'parentElement') **Origin of the issue:** When we drop the block in the iframe's document we trigger the click event but we don't have any selection yet in the document so anchorNodewil
Original PR description
**Issue:** Adding a new block in mailing in email marketing raises an error. Steps to reproduce the issue: 1. Go to email marketing 2. Create a new mailing 3. Create one from scratch 4. Drop any block (or click on the outside empty background) **TypeError :** Cannot read properties of null (reading 'parentElement') **Origin of the issue:** When we drop the block in the iframe's document we trigger the click event but we don't have any selection yet in the document so anchorNodewill be null thus the error. This is a backport of [1](https://github.com/odoo/odoo/pull/152814/commits/0c2bb0cefb38f47c815307877bdc79c91fc9c434). Fw bot up to 17.0 opw-3744685 Forward-Port-Of: odoo/odoo#154779
Pricing lists are now restricted to individual companies by default in the system. This fix updates the subscription website tests to properly handle pricing lists that need to be shared across multiple companies, ensuring tests continue to work correctly with the new pricing restrictions.
Original PR description
Pricelists are now restricted to the current company by default. Some tests had to be adapted to keep some pricelists shared between companies. task-3610823 See odoo/odoo#147014
This update fixes a testing issue in the Web Studio approval tests that was causing failures when the system runs without demo data. The test data has been adjusted to work properly in both demo and no-demo environments, ensuring the testing suite runs reliably across different configurations.
Original PR description
Before this commit, the new class of tests for studio approvals crashed in without demo mode After this commit, it works as data used in the test have been adapted runbot-error-57997 runbot-error-57996
This fix removes the date that was incorrectly appearing in the sidebar of temporary system messages. Users will no longer see unnecessary date information on these transient messages, providing a cleaner and less cluttered messaging interface.
Original PR description
**Before this PR:** Squashed transient messages had date displayed in the sidebar of the message. This was introduced by this commit: 631ae1c **After this PR:** Squashed transient messages would not have date in the message sidebar. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a visual issue in the HR Holidays calendar where mandatory days would lose their distinctive color when users hover over them in the month view. The fix ensures that mandatory days maintain their proper appearance even during interaction, improving the clarity of the calendar display.
Original PR description
Commit (1) introduced a fix on the mandatory day style. But it also creates another color issue: when we hover a mandatory day in the month view the mandatory color dissapears. This commit adapts the selector to handle this issue. (1): d75343d7d83ad56a7532038f01a2038c7e16f15f task-3758658 Part of task-3575827 | The issue | |--------| |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr