Solved a few bugs

bzr revid: nicolas.vanhoren@openerp.com-20130826125254-smlkkh5m3n36cklw
This commit is contained in:
niv-openerp 2013-08-26 14:52:54 +02:00
parent 8ee25f9856
commit 5e8315730b
2 changed files with 4 additions and 2 deletions

View File

@ -201,7 +201,7 @@ class im_user(osv.osv):
def search_users(self, cr, uid, text_search, fields, limit, context=None):
my_id = self.get_my_id(cr, uid, None, context)
found = self.search(cr, uid, [["name", "ilike", text_search], ["id", "<>", my_id]], limit=limit, context=context)
found = self.search(cr, uid, [["name", "ilike", text_search], ["id", "<>", my_id], ["uuid", "=", False]], limit=limit, context=context)
return self.read(cr, uid, found, fields, context=context)
def im_connect(self, cr, uid, uuid=None, context=None):

View File

@ -102,9 +102,11 @@ function declare($, _, openerp) {
def = im_common.connection.rpc("/longpolling/im/gen_uuid", {}).then(function(my_uuid) {
uuid = my_uuid;
localStorage["oe_livesupport_uuid"] = uuid;
return im_common.connection.model("im.user").call("assign_name", [uuid, self.options.userName]);
});
}
def = def.then(function() {
return im_common.connection.model("im.user").call("assign_name", [uuid, self.options.userName]);
});
}
return def.then(function() {