Daily updates from Odoo
Monday, September 16, 2024
9 changes · 17.0
Resolved issues and error corrections
This update fixes a bug in the account synchronization feature where the system was attempting to compare a synchronization expiration date without first checking if the date value exists. The fix ensures the system validates that a date is present before performing the comparison, preventing errors during the synchronization process.
Original PR description
This commit is checking that we have a value before checking it with the today's date. no task id
This update fixes an issue in the Trial Balance Report where zero values were not being correctly identified when report columns were updated. The fix ensures that accounts with zero balances are properly recognized, improving the accuracy of financial reporting displays.
Original PR description
Before this commit, the is_zero attribute was not recomputed correctly when updating the columns. task: 4188758
A previous update to the subscription system removed invalid data entries while processing the data, which could cause errors. This fix separates the data cleanup into two distinct steps to ensure the process works safely and reliably without interruptions.
Original PR description
Commit https://github.com/odoo-dev/enterprise/commit/9c697cad459bedda4aa34d3b4b20a4a4f35c2169 removed these bad map keys while iterating over the actual dictionary- it is bad practice to change an iterable directly in this manner. This commit seperates the update and removal into distinct loops. opw-4061484
This fix resolves a crash that occurred when enabling the email alias feature for helpdesk teams without a team name. The system now properly checks if a team name exists before attempting to process the email alias, preventing the error and allowing users to manage email aliases without interruption.
Original PR description
Currently, an error occurs when enabling 'Email Alias' in the helpdesk team and helpdesk team name is not available. Step to produce: - Install the 'helpdesk' module. - Navigate to Helpdesk / Configuration / Helpdesk Teams. - Open any record remove a name and disable 'Email Alias'. - Then enable 'Email Alias'. ```AttributeError: 'bool' object has no attribute 'replace'``` An error occurs when the system tries to replace a helpdesk team name at [1] but it is not available. Link [1]: https://github.com/odoo/enterprise/blob/f9b1be600825651c9a893920d7532b9b95e3dc02/helpdesk/models/helpdesk_team.py#L574 To resolve the issue, add a condition that calls the '_alias_get_creation_values' method if the helpdesk team name is available. Sentry-5831429098
This fix resolves a system error that occurred when creating a helpdesk ticket if a team member had been deleted from the system. Previously, the system would crash with an error message when trying to assign a ticket to a team with no active members. Now the system handles this situation gracefully, allowing ticket creation to proceed without interruption.
Original PR description
When the customer creates a helpdesk ticket and the user of helpdesk team is deleted, a traceback will appear. Steps to reproduce the error: - Go to Settings > Users & Companies > Users > Create a…
When the customer creates a helpdesk ticket and
the user of helpdesk team is deleted, a traceback will appear.
Steps to reproduce the error:
- Go to Settings > Users & Companies > Users > Create a user
- Go to Helpdesk > Configuration > Helpdesk Teams > Open Team A
Select Assignment Method: Random > Select that user in the members > Save
- Delete that user
- Go to Helpdesk > All Tickets > Create a ticket > Select Team A
Traceback:
```
IndexError: list index out of range
File "odoo/http.py", line 2248, in __call__
response = request._serve_db()
File "odoo/http.py", line 1823, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1843, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1821, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1828, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2053, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 756, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 866, in onchange
defaults = self.default_get(missing_names)
File "home/odoo/src/enterprise/saas-17.2/helpdesk/models/helpdesk_ticket.py", line 40, in default_get
result['user_id'] = team._determine_user_to_assign()[team.id].id
File "home/odoo/src/enterprise/saas-17.2/helpdesk/models/helpdesk_team.py", line 959, in _determine_user_to_assign
result[team.id] = self.env['res.users'].browse(member_ids[index])
```
https://github.com/odoo/enterprise/blob/947b6ab9447aa069fd5edd150c932d9a0884a3cb/helpdesk/models/helpdesk.py#L502 When the related user is deleted, "member_ids" will be an empty list.
so when it tries to access the index of "member_ids",
it will lead to the above traceback.
behavior after the commit:
It will ensure that at least one user is selected in "member_ids".
sentry-5630888721
Forward-Port-Of: odoo/enterprise#69990
Forward-Port-Of: odoo/enterprise#67240Images added to worksheets were not appearing when customers viewed them on the portal or after signing. This fix ensures images are properly embedded in worksheets so customers can see them without needing special access permissions. Now images display correctly for all users viewing shared worksheets.
Original PR description
To reproduce: ============= 1. Add an image field on a worksheet template 2. Create a new task 3. Add a picture on the worksheet 4. Send the report to the customer -> the image is not displayed on the protal -> after signing the report, the image is not displayed on the signed report Problem: ======== - the image added to the worksheet is a binary field, so when compiling the Qweb template, this field can be either a base64 string or a url to the image. https://github.com/odoo/odoo/blob/f0af31dbe36bc77d50ec36e88b49e1e521b809c1/addons/web/models/ir_qweb_fields.py#L68-L74 - in this case the field is url to the image, so when the customer opens the worksheet on portal, the image is not loaded as the customer does not have read access to the binary field representing the image. Solution: ========= - represent image binary fields as base64 strings in the Qweb template insted of urls to the image. opw-3944993 Forward-Port-Of: odoo/enterprise#67156
This fix resolves an issue where inactive records were not appearing in the Gantt view even when explicitly filtered. The system now correctly searches for and displays both active and inactive records when requested, ensuring users can view all relevant data in their project timelines.
Original PR description
Purpose ======= Fix the inactive records fetching in the gantt view. Specification ============= When fetching the records to display in the gantt view from their ids, we don't specify if the inactive records need to be included in the search. This is an issue as further down the execution flow, the '_where_calc' method by default excludes inactive records except if they are explicitly asked for. => This means that filtering on inactive records doesn't display any records. Fixing that by setting the 'active_test' key in the context to 'False' to be sure we search records with these ids both in active and inactive records. Related commit: 836909419893b522890776d3ec2f16476ae21108
This fix removes an unnecessary assignment in the manufacturing work order module that was causing the system to update records every time they were read. This was creating unnecessary database updates and significantly slowing down performance. The fix ensures data is only updated when it actually changes.
Original PR description
Inside `_compute_component_data`, we assign `component_uom_id` but this field is actually a related field and shouldn't be assigned outside its compute. This useless assignment will update the record every time it's read (will update _log_access fields) and can cause a lot of performance degradation: see https://github.com/odoo/odoo/issues/136044#issuecomment-2348689221. Forward-Port-Of: odoo/enterprise#70025
This update corrects the order in which optional employer insurance payments are processed in Swiss payroll calculations. The fix ensures that optional insurance deductions are calculated before gross salary amounts, which is important for accurate payroll processing and compliance with Swiss employment regulations.
Original PR description
Sequences of optional employer insurance payments should come before gross