Monday, September 25, 2023
2 changes · master
Resolved issues and error corrections
Cashiers can now close Point of Sale sessions even when the POS setup does not include a cash payment method. This prevents a silent blocking error and keeps store closing workflows running smoothly, especially in databases without demo data.
Original PR description
Since a869ee87f28c517c67d782b132b65aaf86309d1e, the cashier can no longer close a session from the frontend UI if the POS config has not a cash payment method. Steps to reproduce: - Remove any cash payment method from the POS config you want to use - Open a POS session for the previous POS config - Make an order - Try to close the session A (silent) error is raised, the user cannot close the session. This error is particularly noticeable when we don't use demo data (--without-demo=True). The fix consists in correctly checking if there is a cash payment method or not. task-id: 3519547
This fixes an issue where editing a related record in a form could trigger a failed automatic update on the parent record and leave the edited field in an unsafe state. The form now restores the previous valid value, helping users avoid inconsistent data after an error.
Original PR description
When the onchange triggered by an x2m fails on the parent record, we want to reuse a valid value (the one before the onchange).
How to reproduce:
- Go to a form view with an x2m (onchange=true) that contains at least one record
- Edit the record in the x2m
- onchange on parent record fails
Before this commit:
The value is unchanged.
After this commit:
The value of the edited field is replaced by its old value.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr