diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-01-31 08:58:06 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2018-01-31 14:40:23 +0100 |
| commit | a4c7481f249a7e3d999189cfac907dadcd847a6a (patch) | |
| tree | c45c0345476c4c2d51f4b0afba57e49c9b6595f9 /addons/web/static/src/js/fields | |
| parent | b97b6de12cde9e05d77191cce377a8f9b0bee4d6 (diff) | |
[FIX] web: auto-refresh of time
When a TZ mismatch is detected, the datetime value is displayed in the
widget. However, on MacOS, this forces the dropdown list to close at
each refresh of the value, which occurs every second.
The refresh interval is set to 1 minute in case of MacOS.
opw-804035
Diffstat (limited to 'addons/web/static/src/js/fields')
| -rw-r--r-- | addons/web/static/src/js/fields/special_fields.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/special_fields.js b/addons/web/static/src/js/fields/special_fields.js index 19db97fe985..6bd5d03ac69 100644 --- a/addons/web/static/src/js/fields/special_fields.js +++ b/addons/web/static/src/js/fields/special_fields.js @@ -20,7 +20,8 @@ var FieldTimezoneMismatch = FieldSelection.extend({ * @override */ start: function () { - this._datetime = setInterval(this._renderDateTimeTimezone.bind(this), 1000); + var interval = navigator.platform.toUpperCase().indexOf('MAC') >= 0 ? 60000 : 1000; + this._datetime = setInterval(this._renderDateTimeTimezone.bind(this), interval); return this._super.apply(this, arguments); }, /** |
