summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/special_fields.js
diff options
context:
space:
mode:
authormgh-odoo <mgh@odoo.com>2019-03-12 06:09:18 +0000
committerVincent Schippefilt <vsc@odoo.com>2019-05-31 06:58:57 +0000
commita8f64e6e22a2583a4d038e0fde032960cb65a58e (patch)
treec5d2034eb4d70affbfe93f5f5e494b763ea11bdb /addons/web/static/src/js/fields/special_fields.js
parenta9370e810c862a65ac598137bdb8a386cb35416e (diff)
[IMP] base : Timezone alert
- icon displayed next to field if user haven't set timezone - added relevant tooltip - test case added for field not set alert Task: #1916132 Closes: #29448 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/fields/special_fields.js')
-rw-r--r--addons/web/static/src/js/fields/special_fields.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/fields/special_fields.js b/addons/web/static/src/js/fields/special_fields.js
index 0aac16822d0..7b8e53095e1 100644
--- a/addons/web/static/src/js/fields/special_fields.js
+++ b/addons/web/static/src/js/fields/special_fields.js
@@ -74,6 +74,7 @@ var FieldTimezoneMismatch = FieldSelection.extend({
this.$el.last().filter('.o_tz_warning').remove();
this.$el = this.$el.first();
var value = this.$el.val();
+ var $span = $('<span class="fa fa-exclamation-triangle o_tz_warning"/>');
if (this.$option) {
this.$option.html(this.$option.html().split(' ')[0]);
@@ -90,15 +91,18 @@ var FieldTimezoneMismatch = FieldSelection.extend({
}
if (this.mismatch){
- var $span = $('<span class="fa fa-exclamation-triangle o_tz_warning"/>');
$span.insertAfter(this.$el);
- $span.attr('title', _t("Timezone Mismatch : The timezone of your browser doesn't match the selected one. The time in Odoo is displayed according to the timezone set on your user's preferences."));
+ $span.attr('title', _t("Timezone Mismatch : This timezone is different from that of your browser.\nPlease, set the same timezone as your browser's to avoid time discrepancies in your system."));
this.$el = this.$el.add($span);
this.$option = this.$('option').filter(function () {
return $(this).attr('value') === value;
});
this._renderDateTimeTimezone();
+ } else if (value == "false") {
+ $span.insertAfter(this.$el);
+ $span.attr('title', _t("Set a timezone on your user"));
+ this.$el = this.$el.add($span);
}
},
/**