[MERGE] forward port branch 11.0 up to 213759b03e

This commit is contained in:
Christophe Simonis
2018-09-05 18:52:27 +02:00
81 changed files with 918 additions and 269 deletions
@@ -440,7 +440,7 @@ var FieldDate = InputField.extend({
this.datewidget = this._makeDatePicker();
this.datewidget.on('datetime_changed', this, function () {
var value = this._getValue();
if ((!value && this.value) || (value && !value.isSame(this.value))) {
if ((!value && this.value) || (value && !this._isSameValue(value))) {
this._setValue(value);
}
});
@@ -2340,19 +2340,18 @@ var FieldDomain = AbstractField.extend({
// Convert char value to array value
var value = this.value || "[]";
var domain = Domain.prototype.stringToArray(value);
// Create the domain selector or change the value of the current one...
var def;
if (!this.domainSelector) {
this.domainSelector = new DomainSelector(this, this._domainModel, domain, {
this.domainSelector = new DomainSelector(this, this._domainModel, value, {
readonly: this.mode === "readonly" || this.inDialog,
filters: this.fsFilters,
debugMode: session.debug,
});
def = this.domainSelector.prependTo(this.$el);
} else {
def = this.domainSelector.setDomain(domain);
def = this.domainSelector.setDomain(value);
}
// ... then replace the other content (matched records, etc)
return def.then(this._replaceContent.bind(this));