mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_timeline: order group_by field
Fix bug #2266: before this fix, the lines of the timeline view were always sorted by alphabetical order, ignoring the native order of the model on which the group_by field points to. Fix duplicate entries in the 'fields' argument when the 'colors' parameters uses the same field in multiple conditions.
This commit is contained in:
committed by
CarlosRoca13
parent
40b956b513
commit
607da7c379
@@ -11,6 +11,7 @@ odoo.define("web_timeline.TimelineModel", function (require) {
|
||||
load: function (params) {
|
||||
this.modelName = params.modelName;
|
||||
this.fieldNames = params.fieldNames;
|
||||
this.default_group_by = params.default_group_by;
|
||||
if (!this.preload_def) {
|
||||
this.preload_def = $.Deferred();
|
||||
$.when(
|
||||
@@ -55,9 +56,12 @@ odoo.define("web_timeline.TimelineModel", function (require) {
|
||||
return this._rpc({
|
||||
model: this.modelName,
|
||||
method: "search_read",
|
||||
context: this.data.context,
|
||||
fields: this.fieldNames,
|
||||
domain: this.data.domain,
|
||||
kwargs: {
|
||||
fields: this.fieldNames,
|
||||
domain: this.data.domain,
|
||||
order: [{name: this.default_group_by}],
|
||||
context: this.data.context,
|
||||
},
|
||||
}).then((events) => {
|
||||
this.data.data = events;
|
||||
this.data.rights = {
|
||||
|
||||
Reference in New Issue
Block a user