-
- Downloads
[FIX] web: form: reset date field value if onchange fails
Have a form view with a date or datetime field with onchange.
Change its value to trigger the onchange. If the onchange fails,
we want to revert the value to the original one. Before this commit
it didn't work, because the datepicker blocked the update when the
props were the same, which was the case in this situation.
Task~3498849
closes odoo/odoo#134792
Signed-off-by:
Francois Georis (fge) <fge@odoo.com>
Showing
- addons/web/static/src/core/datepicker/datepicker.js 7 additions, 3 deletionsaddons/web/static/src/core/datepicker/datepicker.js
- addons/web/static/src/views/fields/date/date_field.js 2 additions, 0 deletionsaddons/web/static/src/views/fields/date/date_field.js
- addons/web/static/src/views/fields/date/date_field.xml 1 addition, 0 deletionsaddons/web/static/src/views/fields/date/date_field.xml
- addons/web/static/src/views/fields/datetime/datetime_field.js 2 additions, 0 deletions...ns/web/static/src/views/fields/datetime/datetime_field.js
- addons/web/static/src/views/fields/datetime/datetime_field.xml 1 addition, 0 deletions...s/web/static/src/views/fields/datetime/datetime_field.xml
- addons/web/static/tests/views/form/form_view_tests.js 48 additions, 0 deletionsaddons/web/static/tests/views/form/form_view_tests.js
Loading
Please register or sign in to comment