diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2018-11-28 09:35:39 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2018-11-28 09:35:39 +0000 |
| commit | 2e109db01b23077044e89bcffd8802c2f95c291d (patch) | |
| tree | 69cbd40fd6a50f65813dfd1ca24a09b88455a2ac /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | 679cf0d83fa527ca28c3debc347dedac0d5a5a5b (diff) | |
[FIX] web: context orderedBy not propagated to x2m
Have:
- Model A with a x2m to model B
- Object A with multiple objects B in x2m (that will be sorted)
- On the list view of model A, click on a column to sort by a field
- this field shall not exist in B
- open a record A (towards form view)
Before this commit, the sorting of the x2m crashed, because the key orderedBy was propagated
Due to commit e713ed2a69af9fe97fbe2d54843adc8f1ce689aa
After this commit, it doesn't crash
OPW 1913133
closes odoo/odoo#29094
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index 3ee8e001258..04a10b46442 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -3332,7 +3332,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, |
