[FIX] osv: broken SQL query.
authorVo Minh Thu <vmt@openerp.com>
Tue, 23 Aug 2011 12:45:24 +0000 (14:45 +0200)
committerVo Minh Thu <vmt@openerp.com>
Tue, 23 Aug 2011 12:45:24 +0000 (14:45 +0200)
bzr revid: vmt@openerp.com-20110823124524-p0e1jq49vgssgb1y

openerp/osv/osv.py

index 0831e6f..1c564cb 100644 (file)
@@ -277,7 +277,7 @@ class TransientModel(Model):
         # No access rules for transient models.
         if self._log_access and uid != openerp.SUPERUSER:
             cr.execute("SELECT distinct create_uid FROM " + self._table + " WHERE"
-                " id in ", (tuple(ids),))
+                " id IN %s", (tuple(ids),))
             uids = [x[0] for x in cr.fetchall()]
             if len(uids) != 1 or uids[0] != uid:
                 raise orm.except_orm(_('AccessError'), '%s access is '