Tuesday, May 21, 2024
11 changes · 17.0
Enhancements to existing features
This update adds a test case to the mail module to ensure the system properly handles situations where a link preview cannot be generated due to missing content type information in the response. This improves the reliability and robustness of the link preview feature by catching edge cases that could previously cause issues.
Original PR description
Forward-port of the test from https://github.com/odoo/odoo/commit/5d5752e87a09602d9cb05d5f7ded324499fdce63 Add a test in case we try to generate a link preview and we don't get a 'Content-Type' in the headers of the response. This potential issue was addressed by https://github.com/odoo/odoo/commit/bc202e0a0294e5a0c90118a8fa43ba54838e66b3, we now also add a test. Forward-Port-Of: odoo/odoo#162398
The system now performs a more efficient check when validating active pricelists during configuration changes. Instead of searching for all matching pricelists, it now stops after finding just one, reducing unnecessary database queries and improving system performance.
Original PR description
In `_onchange_group_sale_pricelist`, we check that there is no active pricelist, otherwise we raise a warning. This commit limits the search to one occurence, as it is not necessary to search for all pricelists. Forward-Port-Of: odoo/odoo#165809
This update refreshes the demo data for Saudi Arabian company journals to align with the latest ZATCA sandbox requirements. The PCSID and CCSID identifiers on journals have been updated to reflect current VAT code standards, ensuring demo data remains accurate and compliant with Saudi Arabia's electronic invoicing regulations.
Original PR description
Following the update to the VAT code required to be used with ZATCA sandbox on SA companies, we need to update the demo PCSID and CCSID on the journals as well. Description of the issue/feature this PR addresses: Base demo data for SA company does includes outdated data for the Journals Current behavior before PR: Base demo data for SA companies includes outdated data for the Journals Desired behavior after PR is merged: Base demo data for SA companies includes updated CCSID & PCSID on the journals --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166106
Resolved issues and error corrections
A recent design update inadvertently removed the background color from kanban view headers within Knowledge. This fix restores the proper visual styling so that kanban group headers display with their intended background color, improving the visual consistency and usability of the Knowledge module.
Original PR description
This commit fixes an issue that was brought by the redesign of Odoo, Milk. This redesign modified a scss variable for kanban views inside of form views which removed the background of the kanban view's headers. Now a new css rule has been added to the kanban embedded view so that the background comes back to its original value inside of Knowledge. task-3930157 Forward-Port-Of: odoo/enterprise#62528
Code cleanup and technical improvements
This change reorganizes the Mexico localization feature by moving the document_state component from the l10n_mx modules to the account module. This is a technical restructuring to ensure proper test execution and will be followed by additional updates from the development team.
Original PR description
I have to create this PR otherwise the tests won't run. JUVR will later create a PR for this and then we'll close this PR
This update fixes a visual alignment issue with the custom color button in the color picker tool used in the Notes application. When users select text and open the color picker to access gradient options, the custom color button now displays correctly aligned, improving the user interface appearance and usability.
Original PR description
Issue: ====== Buttons of type of custom color in colorpicker are misaligned. Steps to reproduce the issue: ============================= - Go to notes and write some text - Select some text and open colorpicker - Got to gradient and click on Custom button Before: ======  After: ====  task-3562148 Forward-Port-Of: odoo/odoo#157234
This update removes a duplicate field definition in the project task views configuration file. The duplicate "context" field was causing configuration conflicts and has been cleaned up to ensure the system operates smoothly without redundant settings.
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
A test in the website forum module was failing on newer systems (Ubuntu Noble, Debian Bookworm) due to changes in how Werkzeug 3.0.1 orders routing information. The fix improves the test to be more specific about which forum routes it checks, making it work reliably regardless of the order in which routes are returned.
Original PR description
This test was not working on Debian Bookworm and Ubuntu Noble. This is probably because they use `werkzeug 3.0.1`, which seems to be ordering the routing map differently. Results in the test with…
This test was not working on Debian Bookworm and Ubuntu Noble. This is probably because they use `werkzeug 3.0.1`, which seems to be ordering the routing map differently.
Results in the test with current requirements.txt:
```
[
{'loc': '/forum/testforum-18'},
{'loc': '/forum/testforum-18/renameit-37', 'lastmod': FakeDate(2023, 5, 31)}
]
```
Results in the test with werkzeug 3.0.1 and some tweaks to be close to Noble:
```
[
{'loc': '/forum/testforum-17/renameit-35', 'lastmod': FakeDate(2023, 5, 31)},
{'loc': '/forum/testforum-17'}
]
```
You see that the forum post route is added in a different order. The code then simply crash when doing `list(locs)[1]['lastmod']`
Step to reproduce:
- Install/run python3.12
- Tweak a bit the requirements.txt
- Comment the 2 `greenlet` lines
- replace the 2 lxml lines by
```
lxml==4.6.5; python_version < '3.12' # min version = 4.5.0 (Focal - with security backports)
lxml==5.2.1; python_version >= '3.12' # (Noble - removed html clean)
lxml-html-clean; python_version >= '3.12' # (Noble - removed from lxml, unpinned for futur security patches)
```
- replace werkzeug line by `Werkzeug==3.0.1`
- Install a db with `website_forum`
- Run the `test_01_forum_sitemap` test
- It will crash:
```
Traceback (most recent call last):
File "/data/build/odoo/addons/website_forum/tests/test_sitemap.py", line 23, in test_01_forum_sitemap
self.assertEqual(list(locs)[1]['lastmod'].strftime("%Y-%m-%d"), datetime)
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'lastmod'
```
runbot-65289This fix resolves an issue where GIFs were appearing twice in the favorites category when only one was selected. The problem occurred because the system was loading the same GIF twice - once when displaying favorites and again when opening the category. This update ensures each favorite GIF appears only once as intended.
Original PR description
STEP TO REPRODUCE: -Add gif api key -Go to a channel and choose any gif to be favorite -Then go to favorites category and we will the gif has been duplicate although we only choose one REASON: because we use 'this.pushGif(gif);' 2 time first when loading favorites gif and second is open it 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 fixes a test in the CRM module to ensure it works correctly regardless of demo data. The test was being affected by demo leads that impacted probability calculations. By cleaning up test data before running, the test now produces reliable and consistent results without interference from sample data.
Original PR description
As all won / lost leads will have an impact on the PLS frequency table, demo data will have one on the probabilities of leads without team_id set, as their probability is based on all leads, regardless on their team. Therefore, make sure we unlink all leads that are not the ones created in the test. We rebuild the table below, which is needed to ensure we only consider test leads. Follow up of ecac497336826b66799f63c1daa0749535ce73f1 Task-3700966 Forward-Port-Of: odoo/odoo#165842 Forward-Port-Of: odoo/odoo#162414
This update fixes a test that was failing on Ubuntu 24.04 due to a bug in the Werkzeug library version shipped with that operating system. The test has been adapted to handle this specific issue without affecting normal system behavior. The underlying Werkzeug bug is already fixed in newer versions.
Original PR description
The brand new Ubuntu Noble 24.04 ships python3-werkzeug 3.0.1. This versions has a bug [0] which leads to this test failing as double slashes get fixed by werkzeug even though `merge_slashes` parameter is set to False by default in Odoo. This should not have a big impact on real life but the test should be kept to ensure that the actual behavior of a 404 is not broken outside of Ubuntu Noble. So, with this commit, if the impacted version of werkzeug is used the test will not fail with a fixed url and a redirect response. The issue that exists from 2.2.0 up to 3.0.1 is fixed upstream [1] in 3.0.2. A bug report was filled in Ubuntu [2] (Debian is not impacted) [0]: https://github.com/pallets/werkzeug/issues/2834 [1]: https://github.com/pallets/werkzeug/pull/2860 [2]: https://bugs.launchpad.net/ubuntu/+source/python-werkzeug/+bug/2066041 Forward-Port-Of: odoo/odoo#165998