Daily updates from Odoo
Wednesday, July 3, 2024
10 changes · 17.0
Resolved issues and error corrections
This update fixes issues with how selection options are managed in signature templates. Previously, when users removed options and then signed a document, the deleted options would still appear. Additionally, when updating both options and responsible parties simultaneously, the responsible party changes weren't being saved. These issues have been resolved to ensure options are properly removed and all changes are saved correctly.
Original PR description
Before this commit, selection item options were not updated properly. 1. When adding some options, validating and then removing the options and go to sign, the removed options would still be there.…
Before this commit, selection item options were not updated properly. 1. When adding some options, validating and then removing the options and go to sign, the removed options would still be there. This happened because when passing an empty array to the backend it would be recognized as an empty set of commands, it's like we are telling odoo to do nothing. To fix this we use the command [6, false, [new_ids]]. 2. `state.option_ids` were updated using `changes.option_ids` which is very fragile, for example in 16.0 we the changes are given in the form of `[6, false, [id1, id2, ..]]` but in 17.0 we have a list of commands for adding and removing for example `[[4, id1], [3, id2]]` To count on some fixed form of updates would introudce bugs if this form changes in future. To fix this we use `record.data.option_ids.currentIds` which is basically the live set of Ids. 3. when updating both options and responsible at the same time before validating, responsible won't update. This happened becase of the return statement when the options change. To fix this wer remove the return keyword and allow them both to be updated. Task: 3972994
This fix corrects how serial numbers are required during manufacturing work orders. Previously, the system incorrectly demanded serial numbers for intermediate operations when components were consumed, even though serial numbers should only be required when completing the final operation. Now users can validate and complete intermediate steps without assigning serial numbers, with the requirement only enforced at the final stage.
Original PR description
### steps to reproduce: - Create a storable product tracked by SN with a bom with two operations in the same workcenter: - Operation 1: with at least one component consumed - Operation 2 - Create and…
### steps to reproduce: - Create a storable product tracked by SN with a bom with two operations in the same workcenter: - Operation 1: with at least one component consumed - Operation 2 - Create and confirm an MO using that bom - Go to the shopfloor, validate all the quantities of the operation 1 and mark as done without setting a SN on the final product #### > Invalid Operation: You should provide a lot/serial number for the final product ### Expected behavior: You should be able to validate the operations of the MO without assigning an SN but you should not be able to mark the MO as done without assigning the SN to the final product. Note: if no component were consumed in an operation, the invalid operation would not be raised. ### Cause of the Issue: The invalid operation is raised because of these lines: https://github.com/odoo/enterprise/blob/1b0435a92492d85f28549a207fcdb7224b457c66/mrp_workorder/models/mrp_workorder.py#L433-L434 However, the existence of "self.move_raw_ids" only indicates that a component has to be consumed in this opration rather than the existence of a move requiring a the SN of the final product to be set. ## opw-3987022
This fix resolves a problem where users were unable to copy text in the Documents app when using Safari browser. The issue occurred when sharing documents with specific permissions. The fix applies the same proven solution that was successfully used in other parts of the application.
Original PR description
Steps to reproduce ================== - Open "Documents" app - Select any workspace - Click dropdown next to "Upload" - Select "Share" - Select "Download and Upload" from the "Allows to" radio buttons - Select "Share" Solution ======== Use the same solution as - https://github.com/odoo/enterprise/commit/f3320efad924623ea553847538c6244459a734d5 - https://github.com/odoo/enterprise/commit/2c6716e7f619423414b615015bf86fbd11256953 - https://github.com/odoo/enterprise/commit/2820230bf722d602540943ff9f17bd72e991bea9 opw-3990839
This fix resolves a memory error that occurred when helpdesk teams had large numbers of tickets (60,000+). The system was performing inefficient queries that consumed excessive memory. The update optimizes the code to use a more efficient search method, dramatically reducing the number of database queries and improving system stability for customers with high ticket volumes.
Original PR description
**Traceback:** ```python ('helpdesk.helpdesk_team_menu', 393, 'Helpdesk > Configuration > Helpdesk Teams', 559): Traceback (most recent call last): File…
**Traceback:**
```python
('helpdesk.helpdesk_team_menu', 393, 'Helpdesk > Configuration > Helpdesk Teams', 559):
Traceback (most recent call last):
File "/tmp/tmpkjz256np/migrations/base/tests/test_mock_crawl.py", line 255, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmpkjz256np/migrations/base/tests/test_mock_crawl.py", line 412, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpkjz256np/migrations/base/tests/test_mock_crawl.py", line 441, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 3540, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 3751, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 6631, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 1207, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 1389, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/17.0/addons/mail/models/mail_thread.py", line 424, in _compute_field_value
return super()._compute_field_value(field)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 4875, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 102, in determine
return needle(*args)
File "/home/odoo/src/enterprise/17.0/helpdesk_timesheet/models/helpdesk_team.py", line 22, in _compute_total_timesheet_time
[('helpdesk_ticket_id', 'in', helpdesk_timesheet_teams.ticket_ids.filtered(lambda x: not x.stage_id.fold).ids)],
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 6110, in filtered
return self.browse([rec.id for rec in self if func(rec)])
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 6110, in <listcomp>
return self.browse([rec.id for rec in self if func(rec)])
File "/home/odoo/src/enterprise/17.0/helpdesk_timesheet/models/helpdesk_team.py", line 22, in <lambda>
[('helpdesk_ticket_id', 'in', helpdesk_timesheet_teams.ticket_ids.filtered(lambda x: not x.stage_id.fold).ids)],
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 2907, in __get__
return super().__get__(records, owner)
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 1182, in __get__
recs._fetch_field(self)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 3777, in _fetch_field
self.fetch(fnames)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 3827, in fetch
fetched = self._fetch_query(query, fields_to_fetch)
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 3920, in _fetch_query
rows = self.env.cr.fetchall()
MemoryError
```
**Summary of changes:**
Previously, the code `helpdesk_timesheet_teams.ticket_ids.filtered( lambda x: not x.stage_id.fold).ids)` generating O(n) queries leading to a memory error when dealing with large numbers of tickets (e.g., 60k+ for this customer).
This commit refactors the code to use the search method instead. this approach reduces the number of queries to O(1) and significantly improves performance for customers with a large number of helpdesk tickets.
UPG - [1776915](https://upgrade.odoo.com/web#id=1776915&cids=1&menu_id=107&action=150&model=upgrade.request&view_type=form)
TASK - [3995988](https://www.odoo.com/odoo/my-tasks/3995988?cids=2)Fixed an issue where project managers without accounting permissions encountered an access error when viewing the gantt chart with tasks grouped by project. The progress bar now correctly displays timesheet summaries without requiring access to accounting modules, allowing users with project-only permissions to use the gantt view without errors.
Original PR description
Steps to reproduce: ------------------- 1. Set the user with 'project > user' access rights level and nothing else. Remove every rights that are related to account/analytic accounting from the user (see record rules, access rights, groups, ...). 2. When opening the Project app, an Access Error occurs (related to 'account.analytic.line'). Fix: ------------------- The progress bar that appears when grouping tasks by project in the gantt view should be able to display the sum of the timesheets amount per project even if the user has no access to 'account.analytic.line'. task-3973256 Forward-Port-Of: odoo/enterprise#63922
This update improves the error messaging when Colombian tax authority (DIAN) validation fails. Instead of showing a cryptic "DIAN_RESULT" error, users now receive a clear, friendly explanation of what went wrong and how to resolve it. This makes it easier for Colombian businesses to troubleshoot electronic invoice submission issues.
Original PR description
The issue: When there is a validation error happened directly with the DIAN, the error message is DIAN_RESULT, which does not explain much to the client. The Fix: explain to the client what is a DIAN_RESULT error opw-3921726 Forward-Port-Of: odoo/enterprise#65632 Forward-Port-Of: odoo/enterprise#65547
This update resolves a visual issue in the Sign app where the 'Sign Now' button was causing unwanted spacing in the breadcrumb navigation when users zoomed in on the sign template view. A CSS styling adjustment ensures the button no longer breaks the text layout, providing a cleaner and more professional appearance.
Original PR description
**Version:** - saas-16.3 **Step to reproduce:** - In the sign app, open the sign template iframe view. - When zooming in, the 'Sign Now' button breaks the text and creates extra space in the breadcrumb. **Issue:** Currently, the sign now button text creates extra spacing. **Solution:** Add the CSS class so that it will not create additional spacing task-3977792 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where users would encounter system errors when trying to re-insert lists containing invalid numbers (NaN values) in spreadsheets. Now, instead of crashing, the system displays a helpful error message in the input dialog to guide users on what went wrong.
Original PR description
# Description Previously, attempting to re-insert a list containing NaN values would cause multiple traceback errors. To resolve this, an error message will now be displayed in the input dialog when the user tries to insert a list with invalid numbers. Task: [4008696](https://www.odoo.com/odoo/project/2328/tasks/4008696?cids=2)
This fix ensures that the documents_spreadsheet_crm module explicitly depends on crm_enterprise, which was previously only implicitly required. This prevents errors when users uninstall the crm_enterprise module while documents that rely on its fields remain in the system.
Original PR description
The module depends on documents_spreadsheet and crm in the manifest but contains references for [fields](https://github.com/odoo/enterprise/blob/a935055b1ea60b799e5c61c46a09231c4d210095/documents_spreadsheet_crm/data/files/pipeline_revenue_report_template.json#L280) defined in [crm_enterprise](https://github.com/odoo/enterprise/blob/a935055b1ea60b799e5c61c46a09231c4d210095/crm_enterprise/models/crm_lead.py#L10) and relies on the autoinstall of the enterprise module. The dependency should be explicit because crm_enterprise can be uninstalled by users and the documents would still be there with missing fields. Forward-Port-Of: odoo/enterprise#64549
This fix removes a duplicate display of the planned date field that was appearing twice when viewing tasks in the customer portal. The issue was caused by an xpath being added twice in the template, and removing the duplicate ensures a cleaner, less confusing user experience when checking task details.
Original PR description
Steps: - Install Website and Project module - Open the Project module - Open any project's task - Set the Planned date - Now go to the Website module - Go to My Account - Open Tasks - Open any my task Issue: - When we open any my task in portal , there is planned date show twice time . Cause: - Added xpath twice time. Fix: - remove an xpath from the portal my tasks. task-3610485