Tuesday, October 8, 2024
4 changes
1 change
Enhancements to existing features
This update reorganizes how Odoo applies small compatibility adjustments to third-party libraries, making them easier to identify and troubleshoot. It reduces the risk of inconsistent behavior across modules by ensuring these adjusted libraries are loaded consistently wherever they are used.
Original PR description
Monkeypatching is not a good practice, but it's in some cases necessary. This is especiallly true when relying on third party modules. Reasons may vary: - to adjust for compatibility between versions…
Monkeypatching is not a good practice, but it's in some cases necessary.
This is especiallly true when relying on third party modules.
Reasons may vary:
- to adjust for compatibility between versions
- to fix a small detail without reworking the external module.
In Odoo, there are several places in which monkeypatching is done.
This PR aims to put most of the monkeypatching together and to make clear at a glance which external modules are subject to it, and how.
Until now, the modules present here are of broad interest, and may belong to the `base` module.
There are cases in which a single Odoo module will require a third-party monkeypatched module that will get installed as `external_dependencies` in the `__manifest__.py` file.
We can leave the monkeypatching in that module, but we suggest using the `register` function here to make it at least visible at runtime, so that from the Odoo shell we can query them for troubleshooting:
```py
>>> from odoo.tools.monkeypatch import monkeypatches
>>> from pprint import pprint
>>> pprint(monkeypatches)
{'OpenSSL': <function monkeypatch_OpenSSL at 0x7fd7d8db3b50>,
'PyPDF2': <function monkeypatch_PyPDF2 at 0x7fd7d8db3be0>,
'xlsx': <function monkeypatch_xlsx at 0x7fd7d8db3c70>,
'xlsxwriter': <function monkeypatch_xlsxwriter at 0x7fd7d8db3d00>,
'xlwt': <function monkeypatch_xlwt at 0x7fd7d8db3d90>,
'xmlrpc': <function monkeypatch_xmlrpc at 0x7fd7d8db3e20>}
```
All the monkeypatching will be done so that import <module> will already load the monkeypatched module.
Modules will have a new `<module>.__is_monkeypatched__` attribute set to True.
This will remove the need to import from odoo.tools.misc.<module> and also ensure that people not aware of the monkeypatching use the wrong version.
Community PR: https://github.com/odoo/odoo/pull/989963 changes
Enhancements to existing features
Mail suggestions and mentioned messages now use different icons for conversation threads and channels. This makes it easier for users to quickly recognize the type of discussion they are selecting or viewing.
Original PR description
**Current behavior before PR:** Channels and threads shared the same icon in the suggestion list and mentioned messages, making it difficult to visually differentiate between them. **Desired behavior after PR is merged:** This PR aims to display separate icons for threads and channels in the suggestion list and mentioned messages, improving clarity and differentiation between the two. Backport of #181742 Task-4203558 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The website generator now includes the access token needed for the 18.0 server connection. This helps ensure the tool can continue reaching the service it depends on to generate websites.
Original PR description
Add the token necessary to get access to the WSS server.
A new automated test was added to help confirm that payment auto-validation works as expected. This reduces the risk of future changes disrupting payment processing behavior, with no direct change for end users.
Original PR description
This commit adds a unit test for payments auto validation. task- 4213193