Tuesday, April 9, 2024
2 changes · saas-17.2
Resolved issues and error corrections
Uploading a file in a newly opened live chat now works reliably instead of causing an error. The system now saves the chat on the server before starting the upload, improving the support experience for users and agents.
Original PR description
Before this PR, uploading a file to a temporary thread would lead to errors because the thread only exists locally. This PR ensures the thread is saved on the server before uploading like it's done when a message is posted. This PR adapts the attachment upload service to rely on models instead of components: - Service should not be coupled to views - Thread is updated when calling `uploadFile` so the hook passed to this function is outdated and we cannot access the new thread hook (it's not even mounted yet). Steps to reproduce the issue: - Log in as admin - Go to the live chat support page - Open a chat - Click on upload file and upload one - Crash occurs https://github.com/odoo/enterprise/pull/60165
Reloading a product page opened from Physical Inventory no longer triggers an error page. This keeps inventory workflows stable and prevents customers from being interrupted by a traceback when refreshing the browser.
Original PR description
When the customer opens the product from Physical Inventory and tries to reload the page, a traceback will appear. Steps to reproduce the error: - Go to Inventory > Operations > Physical Inventory -…
When the customer opens the product from Physical Inventory and tries to reload
the page, a traceback will appear.
Steps to reproduce the error:
- Go to Inventory > Operations > Physical Inventory
- Open any product > reload the page
Traceback:
```
KeyError: 'display_name'
File "odoo/http.py", line 2251, in __call__
response = request._serve_db()
File "odoo/http.py", line 1827, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1847, 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 1825, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1832, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2057, 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 739, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/action.py", line 74, in load_breadcrumbs
name = act['display_name'] if any(view[1] != 'form' and view[1] != 'search' for view in act['views']) else None
```
https://github.com/odoo/odoo/blob/853bd97eda1f4eca5f9f63ef1c5909fddaa98d27/addons/stock/models/stock_quant.py#L388-L396
Here, 'display_name' key is not present.
https://github.com/odoo/odoo/blob/853bd97eda1f4eca5f9f63ef1c5909fddaa98d27/addons/web/controllers/action.py#L74 When Customer reloads the page,
It will try to access 'display_name' here, but it is not present.
So, It will lead to the above traceback.
sentry-5132471164
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr