Daily updates from Odoo
Monday, September 16, 2024
14 changes
3 changes
Resolved issues and error corrections
Project notification emails now keep the View Project button visible for internal users. The button is only hidden from customer portal recipients when the project is private, helping staff access project details directly from email while preserving intended customer visibility rules.
Original PR description
Before this commit, due to 715d6be, the `View Project` button in the email sent even if the receiver is an internal user, which is not really expected. This commit makes sure the button is only hidden for the customer portal when the project is private. X-Original-Commit: 715d6be Forward-port of #180257
Opening a CRM lead directly from a link now keeps the breadcrumb trail accurate, including the option to return to the broader list of records. This helps users navigate consistently when actions are launched indirectly in Odoo.
Original PR description
Before this commit when opening a CRM Lead from the URL, the breadcrumb doesn't show the multi-record controller. This occurs, because the CRM action is a server action that returns a window action, and the lazy controller is never created. Now, the lazy controller is correctly created also for the server actions.
Manufacturing orders that are already planned to start soon are now counted correctly in stock forecasts. This prevents reordering rules from adding too much quantity to existing manufacturing orders when sales orders are repeated.
Original PR description
Steps --- 1. install `mrp,sales_management` 2. Create a manufacture-routed product P with a manufacturing BOM: * Operation OP1, duration = 1 hr * some component 3. Create a reording rule for P with a…
Steps --- 1. install `mrp,sales_management` 2. Create a manufacture-routed product P with a manufacturing BOM: * Operation OP1, duration = 1 hr * some component 3. Create a reording rule for P with a manufacturing route: * min qty = 0 * max qty = 0 4. Create an SO for 15 > Confirm * (A MO for 15 P should have been generated) 6. duplicate the SO > Confirm * (The **same** MO is now for 30 P) 7. duplicate the SO > Confirm => The MO is for 75 P instead of 45 Cause --- When the reordering rule is triggered, we attempt create a procurement for the opposite of the forecast quantity of product P and add it to the MO. But the reordering rule's visibility days is 0 (default), so once the MO's expected finished date (now + qty * 1 hr) is tomorrow or more [1] we do not consider the quantity coming from the MO for the stock forecast. Therefore the procurement is for the sum of all the previous orders for P (ie 15 * 3 = 45), so the MO's quantity will be 30 + 45 = 75 instead of 30 + 15 = 45 [1] (cf commit 1) There is another bug this PR fixes where the date finished for MOs is not computed at creation time but only at write time, therefore, we need to be at least on the 3rd SO for the bug to appear. (The 2nd one writes to the MO) Fix --- When computing the quantity in progress for product P, take into account MOs such that `date_start <= end_of_orderpoint_forecast < date_finished` \+ [1] Do compute the finished date at creation when it isn't specified in the vals and do not specify it in the above flow. opw-4034475
2 changes
Resolved issues and error corrections
A small cleanup stops the spreadsheet edition from trying to translate a blank piece of text. This avoids noisy warnings in automated logs without changing how users interact with spreadsheets.
Original PR description
Trying to extract the translation of an empty string will throw a warning (https://github.com/python-babel/babel/blob/master/babel/messages/extract.py#L356) (Can be observed in `test_only` logs of bundle `testing post_install from auth_totp to microsoft_outlook`) This commit removes the translation of the empty string.
This change updates an internal performance test for the appointment app to match the current expected database query count. It helps keep automated checks accurate so teams can detect real performance regressions without false alarms.
Original PR description
task-4141409
9 changes
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