Skip to content
Snippets Groups Projects
Unverified Commit 8117907b authored by Odoo's Mergebot's avatar Odoo's Mergebot Committed by GitHub
Browse files

[FW][FIX] web: unsafe access to config property & extract lib's input setter


During TempusDominus autobinding to fields matching its default classes
(like `.datetimepicker-input` used by our DatePicker widget) and no
config was previously provided to the library (like when we disable it
on mobile), an unsafe access to the config's `_options` property results
into an error as the config is `undefined`.

This PR fixes it by first checking for config existence before
attempting to access its property.

It also extracts the DatePicker widget's input setter to allow
overriding it and preventing from calling the `datetimepicker` lib when
not initialized (like on mobile).

opw-2242880

closes odoo/odoo#54068

Forward-port-of: odoo/odoo#54039
Forward-port-of: odoo/odoo#54005
Related: odoo/enterprise#11654
Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: default avatarPierre Paridans <pparidans@users.noreply.github.com>
parents 88786d61 c9ba9dc9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment