[FIX] web_editor: rpc of 'many2one' snippet option

Before this commit, changing the value of a many2one field on the
frontend was not possible anymore since 11.0 because the RPC 'order'
parameter was not properly formatted with the new conventions.

See task-1767802
Closes https://github.com/odoo/odoo/pull/23545
This commit is contained in:
Darshan Kalola
2018-03-13 11:37:59 +01:00
committed by qsm-odoo
parent 66c7e130d5
commit 2b392636c4
@@ -1291,7 +1291,7 @@ registry.many2one = SnippetOption.extend({
method: 'search_read',
args: [domain, this.Model === 'res.partner' ? ['name', 'display_name', 'city', 'country_id'] : ['name', 'display_name']],
kwargs: {
order: 'name DESC',
order: [{name: 'name', asc: false}],
limit: 5,
context: weContext.get(),
},