[ADD] Added DataSet#select_id()
bzr revid: fme@openerp.com-20111020162022-l9wifgvi6qvjb5a2
This commit is contained in:
parent
05dcbcf7ab
commit
688cd2730c
|
@ -263,6 +263,15 @@ openerp.web.DataSet = openerp.web.Widget.extend( /** @lends openerp.web.DataSet
|
|||
}
|
||||
return this;
|
||||
},
|
||||
select_id: function(id) {
|
||||
var idx = _.indexOf(this.ids, id);
|
||||
if (idx === -1) {
|
||||
return false;
|
||||
} else {
|
||||
this.index = idx;
|
||||
return true;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Read records.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue