Skip to content

Commit

Permalink
[FIX] survey: handle error.datetimepicker in survey's datetimepicker
Browse files Browse the repository at this point in the history
Purpose of this commit is to handle error.datetimepicker event of
datetimepicker element. If not handled then window.onerror will handle it and
give unexpected warning via crashmanager. Note that this issue comes from commit
e6d4ab8 which binds window.onerror in frontend
also and hence uncaught javascript error is also handled by it.

As we do not want to raise crashmanager if user enters wrong value in
datetimepicker let us handle it in survey.js correctly.

Task 2044512
Also see odoo#32132

closes odoo#35609

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
msh-odoo authored and tde-banana-odoo committed Aug 13, 2019
1 parent 20efea9 commit d4de4cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/survey/static/src/js/survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ if(!the_form.length) {
allowInputToggle: true,
keyBinds: null,
});
$('#' + date_field.id).on('error.datetimepicker', function () {
return false;
});
});
// Launch prefilling
prefill();
Expand Down

0 comments on commit d4de4cd

Please sign in to comment.