From 486021e965a60a32e3498b2775c656d7a20be2aa Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 7 Dec 2011 15:24:29 +0530 Subject: [PATCH] [FIX] Pass result's ids to the name get method in listview. bzr revid: bth@tinyerp.com-20111207095429-sb9qhnnstlwst9ax --- addons/web_mobile/static/src/js/list_mobile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web_mobile/static/src/js/list_mobile.js b/addons/web_mobile/static/src/js/list_mobile.js index 67058bf72f6..7dd9d87983d 100644 --- a/addons/web_mobile/static/src/js/list_mobile.js +++ b/addons/web_mobile/static/src/js/list_mobile.js @@ -30,12 +30,16 @@ openerp.web_mobile.ListView = openerp.web.Widget.extend({ }, on_search_data: function(ev){ var self = this; + var list_ids = []; var datasearch = new openerp.web.DataSetSearch(self, self.action.res_model,self.action.context); datasearch.domain = self.action.domain; datasearch.read_slice(['name'], {context:datasearch.context, domain: datasearch.domain, limit:80}, function(listresult){ + _.each(listresult, function(i) { + list_ids.push(i.id); + }); _.extend(self.action.context,{"html_name_get" : true}); var dataset = new openerp.web.DataSet(self, datasearch.model,datasearch.context); - dataset.name_get(listresult,function(res){ + dataset.name_get(list_ids,function(res){ var additional = ""; if(res['html_name_get']){ additional = res['display'];