Daily updates from Odoo
Friday, January 2, 2026
2 changes · master
Code cleanup and technical improvements
This update refactors the IoT drivers' static files to align with Odoo's coding standards. Additionally, a small optimization was made to reduce the delay before the full-screen loader checks for IoT Box status, improving responsiveness. This change enhances the overall user experience and code maintainability.
Original PR description
We rename static files to camel_case to comply with Odoo conventions. We also reduced the timeout before the full screen loader starts pinging the IoT Box. It was 10 seconds to avoid pinging before the server stopped. We reduced it to 2 seconds, as it's useless most of the time.
This update addresses a coding standard issue within Odoo, replacing instances of `odoo._` with `self.env._`. This improves code consistency and maintainability, aligning with best practices for Odoo development. The changes were automatically applied using a tool that scans the codebase for these inconsistencies.
Original PR description
Related to https://github.com/odoo/odoo/pull/174844 Enteprise Related https://github.com/odoo/enterprise/pull/103014 I have created the following plugin for…
Related to https://github.com/odoo/odoo/pull/174844
Enteprise Related https://github.com/odoo/enterprise/pull/103014
I have created the following plugin for [fixit](https://github.com/Instagram/Fixit):
- https://github.com/OCA/odoo-pre-commit-hooks/blob/main/src/oca_pre_commit_hooks/checks_odoo_module_fixit/prefer_env_translation.py
Where it identify all the `odoo._` cases and transform automatically to `self.env._`
Running the following command:
```bash
export FIXIT_ODOO_VERSION=19.0
find . -name "__manifest__.py" -execdir oca-checks-odoo-module-fixit --fix --enable=prefer-env-translation {} \;
git diff --name-only \
| grep '\.py$' \
| xargs ruff check --select F401 --fix
```
(We need to run 2 times since that if the same line that the same issue so it is fixed once)
# TODO
- [x] Wait to push all the cases
### Run autofixes for only files changed
- [x] Run autofix for imported but unused
```python
git diff odoo/master --name-only \
| grep '\.py$' \
| xargs ruff check --select F401 --fix
```
- [ ] Remove unicode literals from strings u''
- [ ] Missing whitespace around operator
- [ ] Trailing comma on bare tuple prohibited [enterprise/l10n_mx_reports/models/trial_balance.py:34](https://github.com/odoo/enterprise/blob/e5e365248daf59713d92c65f7ac024a4a9897c28/l10n_mx_reports/models/trial_balance.py#L34)