Monday, July 22, 2024
3 changes · 17.0
Resolved issues and error corrections
This fix resolves a system crash that occurred when restaurant staff added an empty internal note to a product order in the Point of Sale system. The issue caused the order processing to fail with a technical error. With this fix, empty internal notes are now handled correctly, allowing orders to process smoothly without interruption.
Original PR description
When a customer adds an empty internal note and tries to order the product, a traceback will appear. Steps to reproduce the error: - Open PoS restaurant session - Add any product > Order - Add same…
When a customer adds an empty internal note and tries to order the product,
a traceback will appear.
Steps to reproduce the error:
- Open PoS restaurant session
- Add any product > Order
- Add same product again > Add an empty internal note
- Order
Traceback:
```
KeyError: (3, 'pou', '[]')
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 "home/odoo/src/enterprise/saas-17.2/pos_restaurant_preparation_display/models/preparation_display_order.py", line 33, in process_order
res = super().process_order(order_id, cancelled, note_history)
File "home/odoo/src/enterprise/saas-17.2/pos_preparation_display/models/preparation_display_order.py", line 28, in process_order
data = order._process_preparation_changes(cancelled, note_history)
File "home/odoo/src/enterprise/saas-17.2/pos_preparation_display/models/pos_order.py", line 95, in _process_preparation_changes
quantity_data[key_new]["display"] += old_quantity["display"]
```
https://github.com/odoo/enterprise/blob/4077a5e39fba7197d32d5db05171ad9c8f98c392/pos_preparation_display/models/pos_order.py#L95
Here when customer adds an empty internal note, ```quantity_data``` will become empty,
So, it will lead to the above traceback.
sentry-5494183916Fixed an issue where the shopfloor display was showing all workcenters instead of only the one selected when opening from a specific workcenter, workorder, or production order. This improvement helps users focus on their relevant work area and reduces confusion when managing multiple production lines.
Original PR description
When opening the shopfloor from a specific workcenter, workorder or production order, only the concerned workcenter should be shown. task-4060857
Fixed an issue where only the first 25 WhatsApp message templates were being synced when users attempted to sync all templates from their WhatsApp Business Account. The system now properly fetches all available templates by requesting up to 200 per page and automatically retrieving additional pages as needed, ensuring users have access to their complete template library.
Original PR description
Only a few templates are fetched when the user tries to sync all the templates from the `WhatsApp Business Account` form view. Problem: The API request used to fetch all templates incorporates pagination. In the current scenario, the next URL to the subsequent page is included in the response, but we are not using it. Also, the limit parameter is not utilized in our API request to restrict the number of templates on a single page. Consequently, by default, 25 templates are received on the first page. As a result, only templates received on the first page are being created or updated(i.e. 25). Solution: The limit to fetch 200 templates on a single page is added to obtain 200 templates in the first request. However, if there are more than 200 templates, the remaining ones will be fetched from the next page. This process will continue in a loop until all templates are received. Task-3903321