Monday, December 11, 2023
6 changes · 17.0
Resolved issues and error corrections
Users can now cancel while attaching a receipt to an expense without triggering an error. This prevents an unnecessary interruption in the expense workflow and keeps the existing expense record usable.
Original PR description
This traceback arises when the user tries to attach a receipt in the expense To reproduce this issue: 1) Install `hr_expense` 2) Open any existing `my expense` record 3) Click on the `Attach Receipt`…
This traceback arises when the user tries to attach a receipt in the expense
To reproduce this issue:
1) Install `hr_expense`
2) Open any existing `my expense` record
3) Click on the `Attach Receipt` button and attach a file
4) Now again attach a file through the `Attach Receipt` button
5) Now this time click on `cancel` while attaching a file through `Attach Receipt`
Error:-
```
IndexError: list index out of range
File "odoo/http.py", line 2157, in __call__
response = request._serve_db()
File "odoo/http.py", line 1732, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1759, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1960, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 207, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "addons/hr_expense/models/hr_expense.py", line 484, in attach_document
self.message_main_attachment_id = kwargs['attachment_ids'][-1]
```
When the user clicks on the `cancel` button when trying to attach a file,
the `kwargs` returns an empty `attchemnt_ids` record.
This leads to the above traceback from here
https://github.com/odoo/odoo/blob/5d00b4146aa5cc1942d66e60dc92d321f79bf891/addons/hr_expense/models/hr_expense.py#L482-L484
sentry-4705156379This fix ensures the website editor correctly reads modern CSS color formats and shows the right selected color in the color picker. It prevents confusion when editing borders or other styled elements that use transparent or advanced color values.
Original PR description
This commit introduces a parser to enable support for functional color notation in CSS. It adheres to the specifications outlined in the CSS 'color()' function as described in the official documentation (https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color). This new feature accommodates various color spaces utilized within the 'color()' CSS function, seamlessly converting them into an RGBA format that is comprehensible to the right panel. Steps to reproduce: - Enter edit mode - Add a snippet with a column - Click on the column - Set border-width to 5px, enter => A gray border appears but the option colorpicker shows no color Since [this commit] the border has as default opacity of 15%. But now the custom color in the colorpicker is correctly set. [this commit]: https://github.com/odoo-dev/odoo/commit/fad514ebdc25b9de03fd387a0c07dbbc274c364e task-3536051 @SergeBayet
The accounting Send & Print wizard was simplified by removing outdated cancel-handling code that is no longer needed after a previous internal change. This reduces unnecessary complexity and helps keep the invoicing workflow easier to maintain without changing day-to-day user behavior.
Original PR description
In Send & Print refactoring : part 1 (https://github.com/odoo/odoo/commit/33625269062d50e52fe2e0d8cf4a6df788e93062) we changed the wizard back to a transient model, making the special handling of the cancel useless therefore the custom form is now irrelevant.
The calendar view now checks that it is still available before trying to automatically scroll to a time slot. This prevents an occasional error message when users quickly apply a Knowledge template that includes a calendar.
Original PR description
In the `onMounted` hook of the calendar renderer, the given callback function will schedule a new function call using `setTimeout` with a delay of 0 if some conditions are satisfied. The scheduled…
In the `onMounted` hook of the calendar renderer, the given callback function will schedule a new function call using `setTimeout` with a delay of 0 if some conditions are satisfied. The scheduled function will then trigger a scroll in the calendar view to display a precise timeslot. If the component is destroyed before the scheduled function is executed, the scheduled function may trigger an error as the root element of the calendar will be removed from the DOM when the component is destroyed. This commit will fix that issue by checking that the root element of the calendar exists before calling the `scrollToTime` function. Steps to reproduce the error: 1. Open Knowledge 2. Open the template gallery 3. Select the template "Sprint Calendar" 4. Quickly apply the template => If you have the right timing: a traceback will be displayed indicating that the function `scrollToTime` is not defined on `null`. TO BE: No traceback should be displayed when applying the template. task-3627780 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix corrects an issue in the List View Editor where setting a field to read-only would incorrectly trigger automatic saving. The "force_save" feature is now properly limited to form views only, where it's intended to be used. This prevents unintended automatic saves when editing list view configurations.
Original PR description
Before this commit: When editing a list view and setting a field's readonly attribute to true, "force_save" would be set to true while this should only be the case in the form view. After this commit: The "force_save" attribute is now only set in form view. Task: [3284910](https://www.odoo.com/mail/view?model=project.task&res_id=3284910&access_token=1e9b0d2e-0712-472c-8db8-f86e7f6287e9) Forward-Port-Of: odoo/enterprise#46471 Forward-Port-Of: odoo/enterprise#41783
The helpdesk SLA status analysis graph was displaying confusing random numbers next to legend labels (e.g., "SLA Failed /1"). This fix removes those extraneous numbers, making the graph legend clearer and easier to understand for users reviewing SLA performance data.
Original PR description
Before this PR when we see sla status analysis graph view it was showing random numbers shown by legend (SLA Failed /1 ). In this PR we have fixed that issue and made it as SLA Failed. task-3484150 Forward-Port-Of: odoo/enterprise#47057