Wednesday, August 14, 2024
8 changes · saas-17.4
Resolved issues and error corrections
Creating a new user interface view from a menu no longer triggers an error while the record is still being set up. This makes view creation more reliable and avoids a confusing interruption for users or administrators configuring the system.
Original PR description
An Error is thrown when attempting to _compute_warning_info on a newly created ir.ui.view record. This is due to the NewId it is assigned being unable to be parsed by the query generated by the _get_inheriting_views method. This PR bypasses that method call when generating a NewId, as a newly created view will not need to check for inheritance. Task-ID: 4102663 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Closing a chat window with the Esc key no longer causes an error when multiple chats are open. This improves the reliability of Odoo's messaging experience by keeping users in their workflow without interruption.
Original PR description
Before this commit, when 2 chat windows were open, focusing the chat window on right then pressing ESC would lead to the following crash: ``` TypeError: Cannot read properties of undefined (reading 'focus') ``` This happens because when closing a chat window, it attempts to focus the next open chat window if any exist. It remembers last index, and picks the next chat window at that index. Problem was that checking last index was applied on new listing after close, so it was not detecting the closed chat window as last, thus calling Array.at() on a invalid index. So in scenario above with 2 chat windows, the list of indexes was `[0, 1], then `[0]` but index was `1`, so it attempted to access `[0].at(1)` which is `undefined`. This commit fixes the issue by reliably picking the item at index of last close chat window.
The tag selection dropdown now hides values that have already been chosen in many-to-many fields. This reduces duplicate-looking options and makes selecting tags or similar records clearer for users.
Original PR description
Problem: When opening the autocomplete dropdown for tags (or any other ManyToMany field), the currently selected values are not excluded from the dropdown list. This leads to redundancy, as the user still see and select values that have already been chosen. Steps to reproduce: - Open any app that has a ManyToMany field (e.g., the tags field in Project/Task). - Select a value from the dropdown. - Open the dropdown again. - Observe that the selected value is still present in the list. This fix ensures that selected values are excluded from the autocomplete dropdown, providing a clearer and more intuitive user experience. opw-4102363 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating a new technical view from the Settings menu no longer triggers an unexpected error. This improves reliability for administrators configuring or extending screens in Odoo.
Original PR description
When the user tries to create a new view, a traceback will appear. Steps to reproduce the error: - Go to Settings > Technical > User Interface > Views > New Traceback: ``` Traceback (most recent call…
When the user tries to create a new view, a traceback will appear.
Steps to reproduce the error:
- Go to Settings > Technical > User Interface > Views > New
Traceback:
```
Traceback (most recent call last):
File "/home/odoo/odoo/community/odoo/http.py", line 2373, in __call__
response = request._serve_db()
File "/home/odoo/odoo/community/odoo/http.py", line 1903, in _serve_db
return self._transactioning(
File "/home/odoo/odoo/community/odoo/http.py", line 1966, in _transactioning
return service_model.retrying(func, env=self.env)
File "/home/odoo/odoo/community/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/odoo/community/odoo/http.py", line 1933, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/odoo/community/odoo/http.py", line 2177, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/odoo/community/odoo/addons/base/models/ir_http.py", line 223, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/odoo/community/odoo/http.py", line 754, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/odoo/community/addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/odoo/community/odoo/api.py", line 459, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/home/odoo/odoo/community/addons/web/models/models.py", line 1021, in onchange
snapshot1 = RecordSnapshot(record, fields_spec)
File "/home/odoo/odoo/community/addons/web/models/models.py", line 1108, in __init__
self.fetch(name)
File "/home/odoo/odoo/community/addons/web/models/models.py", line 1123, in fetch
self[field_name] = self.record[field_name]
File "/home/odoo/odoo/community/odoo/models.py", line 6727, in __getitem__
return self._fields[key].__get__(self)
File "/home/odoo/odoo/community/odoo/fields.py", line 1263, in __get__
self.compute_value(recs)
File "/home/odoo/odoo/community/odoo/fields.py", line 1445, in compute_value
records._compute_field_value(self)
File "/home/odoo/odoo/community/odoo/models.py", line 5037, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/odoo/community/odoo/fields.py", line 101, in determine
return needle(*args)
File "/home/odoo/odoo/community/odoo/addons/base/models/ir_ui_view.py", line 467, in _compute_warning_info
combined_arch = view._get_combined_arch()
File "/home/odoo/odoo/community/odoo/addons/base/models/ir_ui_view.py", line 931, in _get_combined_arch
tree_views = views._get_inheriting_views()
File "/home/odoo/odoo/community/odoo/addons/base/models/ir_ui_view.py", line 634, in _get_inheriting_views
rows = self.env.execute_query(query)
File "/home/odoo/odoo/community/odoo/api.py", line 868, in execute_query
self.cr.execute(query)
File "/home/odoo/odoo/community/odoo/sql_db.py", line 347, in execute
res = self._obj.execute(query, params)
psycopg2.errors.SyntaxError: syntax error at or near ")"
LINE 5: WHERE id IN () AND (("ir_ui_view"."active" =
```
When the user creates a new view, self will be NewId in "_compute_warning_info",
so eventually in "_get_inheriting_views" method, self will be NewId,
so eventually self.ids will be [] here,
https://github.com/odoo/odoo/blob/855612ce254a4d4d547fc65b553b37c2876fcce2/odoo/addons/base/models/ir_ui_view.py#L611
so it will lead to the above traceback.
sentry-5675367115
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prMobile users will no longer see the send button stay visually highlighted after sending a message. The voice recording stop control is also easier to use because tapping the whole control now stops recording, not just the small icon.
Original PR description
Before this commit, when sending a message on mobile device with the dedicated send button "fa-plane-o", the button was highligted after composer content being cleared from posted message. This happens because the button, while being `:disabled`, has `:active` and `:hover`, both of which applies background active color and removes opacity rules of `:disabled`. This is unintentional, so this commit fixes the issue by enforcing the `:disabled` style even when composer button actions are `:active` and `:hover`. This commit also fixes another small UX issue where the voice recording stop button works only on red circle icon. This commit makes the whole component click acts as the trigger. Task-4107211 <img width="855" alt="Screenshot 2024-08-13 at 11 52 12" src="https://github.com/user-attachments/assets/7ee7780b-9589-4979-a1e3-844c9e8b86c7">
The Inventory Aging report is visible again from the Inventory reporting menu. This makes it easier for users to find aging information without needing to know it is also available inside the valuation pivot view.
Original PR description
Steps to reproduce: - Inventroy > Reporting Inventory aging is gone from the menu, removed in commit 92c4e7f719975027b6ac726f331e4a9262d001cf. The view is still available in the pivot view of Valuation but customers might not find it there. opw-4090460 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Creating a new view from Settings no longer triggers an unnecessary error or warning before the view is saved. This makes the view editing flow smoother and avoids confusing users during setup or customization.
Original PR description
It is not necessary to add a warning in the view editing interface if the view has not yet been created in the database.The error comes from the method to combine inherited arch which uses a custom sql query. issue: Go to the settings menu and try to create a view opw-4107450
Fixed an issue that caused a technical error when users clicked New from the Bank view in the Accounting dashboard while in debug mode. Users can now create new bank reconciliation transactions without interruption.
Original PR description
This PR fixes a technical error that occurs while trying to create new transaction in Bank Reconciliation Screen. Steps to reproduce error: - Install Accounting module - Activate debug mode - Go to Accounting Dashboard -> Bank (Kanban View) - Click New. A technical error will be raised. Desired behaviour after this commit: The technical error is resolved. TaskID: 4095322