Thursday, November 26, 2020
2 changes · 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
This fixes a mobile issue where tapping certain elements inside embedded lists could show an error instead of responding normally. Users working on phones or tablets should no longer see a traceback when interacting with those list fields.
Original PR description
When performing a "touch" on some elements (e.g. a list view inside a form view) on mobile, a traceback is displayed with the error "Cannot read property 'length' of undefined". In this context, the "undefined" is the property "this.selection" in the ListRender. It happens due to an unintentional override of the event handler methods used for the "touchstart" and "touchend" events in both BasicRenderer and ListRenderer, making the first one calling the second one event handler. Those were introduced respectively in 4ee338a and ab8932f . Steps to reproduce (on mobile): - Open Fleet app (but not specific to this app) - Car > Create - Scroll to "Fiscality: Disallowed Expenses Rates" field (which is a list) - Click on the "%" symbol => Traceback This commit fixes it by giving more specific names to the event handler's methods on both BasicRenderer and ListRenderer.