Friday, March 3, 2023
2 changes · master
Resolved issues and error corrections
Point of Sale shops can now open normally when Worldline is enabled and a Worldline terminal is linked to a payment method. This prevents an unnecessary startup blockage, even when that payment method is not used in the shop.
Original PR description
Currenlty, PoS shop cannot be opened if we activate Worldline and create a pos payment method with an associated Worldline terminal (even without adding it to the shop) This PR solves this issue
Fixes an issue where changing a recurring planning shift to a single occurrence could delete the current shift and leave users stuck on an error screen. The form now returns to the previous view instead, keeping scheduling workflows smooth.
Original PR description
Steps: - Create a planning shift, set a recurrence for ever. - Go few occurences later (form via kanban) and set... ...recurrence type to "Number of Occurences", ...recurrence nmber to 1. - Save. Issue: "This record doesn't exist". Cause: The write method will update the recurrence so that it only contains only one occurrence. Consequently, the record you just updated is deleted. Then we try to fetch the record to display its form again. Because de read returns [], _fetchRecord rejects the promise, and we're stuck. Fix: In community commit, we make `FormController.saveButtonClicked` call `Record.save` with its params. In this commit, we override `FormController.saveButtonClicked` to call super with the arg `throwOnError` so that, if the shift is deleted when updating its recurrence, we will catch it and, rather than staying on its form, go back to the previous view. Related: https://github.com/odoo/odoo/pull/112335