Friday, September 27, 2024
3 changes · master
Enhancements to existing features
This update improves Odoo's internal type hints so common record creation patterns are recognized correctly by developer tools. It helps reduce false error warnings during development and keeps the codebase easier to maintain without changing business functionality.
Original PR description
odoo/odoo#177609 added a bunch of typing, but that has a few issues: - `create` is not defined as taking a lone dict, which is the most common way to use it by an order of magnitude, so 9 cases out of 10 are marked as incorrect when trying to typecheck creates at least in pycharm, add ~~the relevant overloads (they don't seem to work correctly when create is being overridden tho)~~ proper typing to the decorators[^1][^2]. - The `M` typevar is not relevant to `api.py` (or its users), move it to `fields.py` where it makes sense - ~~Try to define the set of writeable values more precisely than `Any`, though it remains somewhat dodgy~~. [^1]: overloads "worked" but had to be repeated on every overload of the method which sucked (as overloading `create` is pretty normal) [^2]: so it still doesn't work in pycharm as it apparently doesn't understand typed decorators (at least not generic ones), it seems to work fine in mypy and pyright though which hit that it's the right solution
Emoji search now takes recently used emojis into account, so people are more likely to see their preferred emojis near the top of results. This makes composing messages faster and more personalized with less scrolling or repeated searching.
Original PR description
**Current behavior before PR:** prior to this PR, recent emojis were not considered in the search. **Desired behavior after PR is merged:** Updated search to include recent emojis, making them more prominent based on the search term. task-4144979 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Demo payroll data now includes two local banks with appropriate names and BIC codes for multiple country payroll localizations. This makes sample payroll setups feel more realistic and easier to evaluate in demonstrations or testing.
Original PR description
* = au, bd, eg, hk, jo, ke, lt, lu, ma, mx, nl, pl, ro, sk, and us. This PR improves the demo data for multiple l10n payroll modules by adding two banks (`res.bank`) with local bank names and BIC codes to each localization.