[IMP]:event_project sql queries to parameterized query
bzr revid: nch@tinyerp.com-20091126122057-7rbcaa5nz7a3t9ty
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -36,8 +36,8 @@ class one2many_mod_task(fields.one2many):
|
||||
for id in ids:
|
||||
res[id] = []
|
||||
for id in ids:
|
||||
query = "select project_id from event_event where id = %i" %id
|
||||
cr.execute(query)
|
||||
query = "select project_id from event_event where id = %s"
|
||||
cr.execute(query,(id,))
|
||||
project_ids = [ x[0] for x in cr.fetchall()]
|
||||
ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',project_ids),('state','<>','done')], limit=self._limit)
|
||||
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
|
||||
|
||||
Reference in New Issue
Block a user