[FIX] Fixed previous fix: where clause might be empty.

bzr revid: jth@openerp.com-20100804155117-gazy6gibbyk01wqz
This commit is contained in:
Julien Thewys
2010-08-04 17:51:17 +02:00
parent b6823a7378
commit 6eff548f0b
+4 -1
View File
@@ -3823,7 +3823,10 @@ class orm(orm_template):
offset_str = offset and ' offset %d' % offset or ''
where.extend(qu1_join)
where_str = " WHERE %s" % " AND ".join(where)
if where:
where_str = " WHERE %s" % " AND ".join(where)
else:
where_str = ""
if count:
cr.execute('select count(%s.id) from ' % self._table +