From 917ba745ea188a622279b8e51723d6d3b8815535 Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Tue, 12 Sep 2017 14:25:03 +0200 Subject: [FIX] web, account: display partner in reconciliation When selecting a partner in the reconciliation widget, using the SelectCreateDialog (Search More), the partner wasn't correctly displayed. This was due to a difference between the change format of the many2one ; when using the dialog, only the `id` is sent (while the `id` and `display_name` are sent when using the many2one dropdown). These two behaviours are now standardized and both now send `id` and `display_name`. It has the advantage of sparing some `name_get`s called by the model because the `display_name` was missing. This change implies some refactoring where the SelectCreateDialog was used. --- addons/web/static/src/js/widgets/debug_manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src/js/widgets') diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js index e9abd2794f2..719cb581ba2 100644 --- a/addons/web/static/src/js/widgets/debug_manager.js +++ b/addons/web/static/src/js/widgets/debug_manager.js @@ -169,11 +169,11 @@ var DebugManager = Widget.extend({ title: _t('Select a view'), disable_multiple_selection: true, domain: [['type', '!=', 'qweb'], ['type', '!=', 'search']], - on_selected: function (element_ids) { + on_selected: function (records) { self._rpc({ model: 'ir.ui.view', method: 'search_read', - domain: [['id', '=', element_ids[0]]], + domain: [['id', '=', records[0].id]], fields: ['name', 'model', 'type'], limit: 1, }) -- cgit v1.2.3