[IMP] Change the calling search_read method of dataset to function DatasetSearch from js.
bzr revid: jra@tinyerp.com-20110623124300-37ldh9oeh6g6xdsq
This commit is contained in:
parent
30f799ad09
commit
cc4c2d20ba
|
@ -125,6 +125,15 @@ openerp.base.list.editable = function (openerp) {
|
|||
'class': $(row).attr('class'),
|
||||
click: function (e) {e.stopPropagation();}
|
||||
})
|
||||
.delegate('button.oe-edit-row-save', 'click', function () {
|
||||
self.save_row();
|
||||
})
|
||||
.delegate('button.oe-edit-row-cancel', 'click', function () {
|
||||
self.cancel_edition();
|
||||
})
|
||||
.delegate('button', 'keyup', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
})
|
||||
.keyup(function (e) {
|
||||
switch (e.which) {
|
||||
case KEY_RETURN:
|
||||
|
@ -136,12 +145,6 @@ openerp.base.list.editable = function (openerp) {
|
|||
default:
|
||||
return;
|
||||
}
|
||||
})
|
||||
.delegate('button.oe-edit-row-save', 'click', function () {
|
||||
self.save_row();
|
||||
})
|
||||
.delegate('button.oe-edit-row-cancel', 'click', function () {
|
||||
self.cancel_edition();
|
||||
});
|
||||
if (row) {
|
||||
$new_row.replaceAll(row);
|
||||
|
|
|
@ -90,11 +90,8 @@ openerp.web_mobile.ListView = openerp.base.Controller.extend({
|
|||
on_action: function(action) {
|
||||
var self = this;
|
||||
var view_id = action.views[0][0];
|
||||
var model = action.res_model;
|
||||
|
||||
self.rpc('/base/dataset/search_read', {
|
||||
model: model
|
||||
},function(result){
|
||||
(new openerp.base.DataSetSearch(this.session, action.res_model, null, null))
|
||||
.read_slice(false, false, false, function(result){
|
||||
this.listview = new openerp.web_mobile.ListView(this.session, "oe_app");
|
||||
self.$element.html(QWeb.render("ListView", {'records' : result}));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue