[MERGE] forward port branch 11.0 up to bb6f6c57f9
This commit is contained in:
@@ -2096,6 +2096,18 @@ var FieldProgressBar = AbstractField.extend({
|
||||
this.$('.o_progressbar_value').focus().select();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* The progress bar has more than one field/value to deal with
|
||||
* i.e. max_value
|
||||
*
|
||||
* @override
|
||||
* @private
|
||||
*/
|
||||
_reset: function () {
|
||||
this._super.apply(this, arguments);
|
||||
var new_max_value = this.recordData[this.nodeOptions.max_value];
|
||||
this.max_value = new_max_value !== undefined ? new_max_value : this.max_value;
|
||||
},
|
||||
isSet: function () {
|
||||
return true;
|
||||
},
|
||||
|
||||
@@ -468,6 +468,7 @@ var FieldMany2One = AbstractField.extend({
|
||||
initial_ids: ids ? _.map(ids, function (x) { return x[0]; }) : undefined,
|
||||
initial_view: view,
|
||||
disable_multiple_selection: true,
|
||||
no_create: !self.can_create,
|
||||
on_selected: function (records) {
|
||||
self.reinitialize(records[0]);
|
||||
self.activate();
|
||||
|
||||
@@ -141,6 +141,7 @@ var AbstractView = Class.extend({
|
||||
modelName: params.modelName,
|
||||
res_id: params.currentId,
|
||||
res_ids: params.ids,
|
||||
orderedBy: params.context ? params.context.orderedBy : [],
|
||||
};
|
||||
if (params.modelName) {
|
||||
this.loadParams.modelName = params.modelName;
|
||||
|
||||
@@ -3365,7 +3365,7 @@ var BasicModel = AbstractModel.extend({
|
||||
model: params.modelName,
|
||||
offset: params.offset || (type === 'record' ? _.indexOf(res_ids, res_id) : 0),
|
||||
openGroupByDefault: params.openGroupByDefault,
|
||||
orderedBy: params.orderedBy || (params.context && params.context.orderedBy) || [],
|
||||
orderedBy: params.orderedBy || [],
|
||||
orderedResIDs: params.orderedResIDs,
|
||||
parentID: params.parentID,
|
||||
rawContext: params.rawContext,
|
||||
@@ -4279,7 +4279,7 @@ var BasicModel = AbstractModel.extend({
|
||||
if (orderData1 > orderData2) {
|
||||
return order.asc ? 1 : -1;
|
||||
}
|
||||
return compareRecords(record1ID, record2ID, level + 1);
|
||||
return compareRecords(resId1, resId2, level + 1);
|
||||
};
|
||||
utils.stableSort(list.res_ids, compareRecords);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user