[FIX] Pass result's ids to the name get method in listview.
bzr revid: bth@tinyerp.com-20111207095429-sb9qhnnstlwst9ax
This commit is contained in:
parent
014731ce5c
commit
486021e965
|
@ -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'];
|
||||
|
|
Loading…
Reference in New Issue