Wednesday, April 17, 2024
6 changes
3 changes
Resolved issues and error corrections
This fixes an issue in the Hong Kong payroll module where certain payroll filtering conditions could fail when no criteria were provided. It helps keep payslip processing reliable after related platform changes.
Original PR description
This issue was revealed by https://github.com/odoo/odoo/pull/160979.
This change fixes a small styling issue on appointment validation pages by ensuring list elements use the expected layout rules. It helps appointment information display consistently and professionally for users.
Original PR description
Bootstrap's List Group component expects to have the class `list-group` to be properly styled, even when `list-group-flush` is used. This commit adds the missing class.
Custom financial reports now correctly pass warning information instead of ignoring it. This helps ensure report users receive the intended alerts or guidance when custom calculations need to flag issues.
Original PR description
For the custom engine report, _compute_formula_batch_with_engine_custom always uses None for the warnings in the function custom_engine_function, even if a good warnings arguments is sent. Now it correctly use the warnings instead of None
3 changes
Resolved issues and error corrections
This update removes outdated code from the IoT module that was generating warning messages in system logs. The change replaces an older method for checking if required libraries are available with a newer, recommended approach. This cleanup helps maintain system stability and keeps the codebase current with Odoo's latest standards.
Original PR description
Currently, iot module uses `get_resource_path` to check whether a Worldline libeasyctep.so library is present on the IoT Box. It is currently provoking a deprecation warning in logs: ``` 2024-04-16…
Currently, iot module uses `get_resource_path` to check whether a Worldline libeasyctep.so library is present on the IoT Box.
It is currently provoking a deprecation warning in logs:
```
2024-04-16 09:34:02,574 2873 WARNING ? py.warnings: /home/pi/odoo/odoo/modules/module.py:167: DeprecationWarning: Since 17.0: use tools.misc.file_path instead of get_resource_path(hw_driver>
File "/usr/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/home/pi/odoo/addons/hw_drivers/main.py", line 106, in run
helpers.load_iot_handlers()
File "/home/pi/odoo/addons/hw_drivers/tools/helpers.py", line 400, in load_iot_handlers
spec.loader.exec_module(module)
File "/home/pi/odoo/addons/hw_drivers/iot_handlers/interfaces/CTEPInterface_L.py", line 15, in <module>
if not get_resource_path("hw_drivers", "iot_handlers", "lib", "ctep", "libeasyctep.so"):
File "/home/pi/odoo/odoo/modules/module.py", line 167, in get_resource_path
warnings.warn(
```
Since `get_resource_path` is deprecated as of v17.0, this PR replaces it by `file_path` to remain up to date.
Apart from replacing the deprecated `get_resource_path`, this PR also replaces `subprocess.check_call` by the `subprocess.run` in the corresponding code as suggested by subprocess documentation starting from Python v3.5
Finally, it prettifies the modified lines of code a little by changing a variable name and modifying the logger message in case of an error to make it more specific
task-3872853Portal users will now receive a clear notification message when they try to open embedded views in Knowledge articles, informing them that only internal team members can access this feature. This prevents confusion and improves the user experience by explaining why the view cannot be opened.
Original PR description
**Steps to reproduce:** 1) Open any view of any module. 2) Click on insert a link in the article from Favorites. 3) Now publish the article from the share panel. 4) Copy that link and open it from the portal user. 5) Click on the embedded link(if only read access), double click on it(if write access). **Solution:** Notify the portal user with a toaster notification that only internal members can open that view. **Task**-3082042 Forward-Port-Of: odoo/enterprise#57347
This fix removes unnecessary and non-functional border width size options (small and large) from the website theme editor's input field styling controls. These options were displaying empty and serving no purpose, so they have been cleaned up to simplify the user interface and reduce confusion when customizing website themes.
Original PR description
Steps to reproduce : 1. click on edit website. 2. click on THEME tab from snippet options. 3. scroll down to input fields. 4. the border width has options for small and large size, which serves no purpose and were displayed empty. Purpose: This PR aims to remove the changes made on [[1]](https://github.com/odoo-dev/odoo/commit/6c0d2da07d2df2a27155678f58a6ffc79351e543) which added 2 sub-levels options for Border Width for Input Field which served no purpose. After this PR : The Border Width option will not have sub options small and large. task-3771146 Forward-Port-Of: odoo/odoo#157374