From 2b392636c44dbf68f2e181574c5dfd80d3257cff Mon Sep 17 00:00:00 2001 From: Darshan Kalola Date: Thu, 8 Mar 2018 17:45:26 +0530 Subject: [PATCH] [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 --- addons/web_editor/static/src/js/editor/snippets.options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 382bae0d4a7..e134f5fe67a 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -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(), },