Thursday, November 26, 2020
1 change · master
Resolved issues and error corrections
Fixes an issue where the Point of Sale settings page could show an error after users discarded edits. This makes configuration changes smoother and avoids unnecessary interruptions for users managing POS setup.
Original PR description
Prior to 28762b79e3398dc883af9e0caef7c86cc5c051e0, `_enableButtons` method is mainly called after saving changes in the record, now, it is also called when discarding such that its argument can become `undefined`. This causes error in pos.config form because it uses a custom form which hooked to the said method in order to reload the window when a module_ or group_ field is modified. This commit prevents this error by having a fallback empty array when `changedFields` is `undefined`. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr