Monday, November 4, 2024
4 changes · 18.0
Enhancements to existing features
The IoT Box now retrieves database and subscription information when it starts, instead of receiving those details through the initial connection link. This makes setup links shorter and reduces manual work when a customer's subscription code changes.
Original PR description
Currently, we provide the IoT Box the `db_uuid` and the `enterprise_code` through the connection link generated by the db. In order to reduce the size of this link and the information it contains, we move those two parameters to a `/iot/db_info` fetch when Odoo starts on the IoT Box. We also avoid the user to enter manually its `enterprise_code` if he changes his subscription, as the IoT Box will fetch it automatically. Enterprise PR: [https://github.com/odoo/enterprise/pull/72610](https://github.com/odoo/enterprise/pull/72610) Task: 4282684
IoT Boxes now retrieve key database and subscription details automatically when Odoo starts, instead of receiving them through the setup link. This keeps setup links shorter and less information-heavy, while reducing manual work when subscription details change.
Original PR description
Currently, we provide the IoT Box the `db_uuid` and the `enterprise_code` through the connection link generated by the db. In order to reduce the size of this link and the information it contains, we move those two parameters to a `/iot/db_info` fetch when Odoo starts on the IoT Box. We also avoid the user to enter manually its `enterprise_code` if he changes his subscription, as the IoT Box will fetch it automatically. Community PR: [https://github.com/odoo/odoo/pull/184910](https://github.com/odoo/odoo/pull/184910) Task: 4282684
Resolved issues and error corrections
The All Tasks list now loads much faster, especially when grouped by stages with many tasks. This reduces long wait times from around 20 seconds to under a second in heavy views, improving day-to-day usability for project and sales teams.
Original PR description
This commit fixes a performance issue with the "All tasks" list view. The issue especially arose when the view was grouped by stages (because groups are opened by default in that case) and when it…
This commit fixes a performance issue with the "All tasks" list view. The issue especially arose when the view was grouped by stages (because groups are opened by default in that case) and when it contained a lot of stages, each of them containing a lot of records. In the worst case, the view could have to render up to 800 records (80 per group, 10 groups opened), and it could take around 20seconds. With this commit, the rendering part is done in around 400ms.
This commit actually fixes 2 issues.
First, in sale_project, there was an override of `isCellReadonly` to force the `sale_line_id` to be readonly if several records with different partners (`partner_id` field) were selected. This override accessed `this.props.list.selection` once per cell (all cells, not only for the `sale_line_id` column), and this is actually a getter which browses through all records, to generate the list of selected ones. This was thus quadratic. This commit applies a similar logic as in [1] to compute the selection only once for the whole table.
Second, [1] wasn't as optimal as expected. Indeed, we tried to compute a flag only once for the whole template rendering, by setting a variable on `this`. However, the ListRenderer template using `t-call` to render each row, a new rendering context is created for each row. By doing
```xml
t-att-class="getCellClass(column, record)"
```
the `this` inside `getCellClass` is that rendering context object, so it can't be used to share a flag from a row to another. Explicitely calling `getCellClass` on `this` ensures that the `this` inside the function is the instance, which is the same for all rows.
[1] https://github.com/odoo/odoo/pull/153858
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-prCreating time off from the Gantt view no longer fails when a resource has no working time set. This prevents an error during leave creation and keeps Time Off management usable in configurations with empty resource calendars.
Original PR description
The error occurs because we are setting ``Working Time`` to empty in ``Resources`` and then attempting to add leave from the ``Gantt`` view in the Time Off section. Steps to reproduce: --- - Install ``hr_holidays_gantt`` module(without demo data) - Go to resource and from ``Administrator`` remove ``Working Time`` - Now Time Off > Management > Time Off - Go to ``Gantt`` view > Create New and Click on ``Save & Close`` ``Traceback: KeyError: 6`` At [1], we are facing an error because ``leaves_mapping`` is empty and we are trying to access this dictionary using a key that doesn't exist. [1]- https://github.com/odoo/enterprise/blob/d4608a66f164940fe4383507e23eed9f54bf60df/hr_holidays_gantt/models/hr_leave.py#L181 sentry-6010228921