diff options
| author | HDA (OpenERP) <hda@tinyerp.com> | 2010-02-01 13:59:39 +0530 |
|---|---|---|
| committer | HDA (OpenERP) <hda@tinyerp.com> | 2010-02-01 13:59:39 +0530 |
| commit | 93bd614c8e25553ae6fc7eef8eb52105c22a02e6 (patch) | |
| tree | a91657d0fbef7e2ad4c663172ce757955f20f23e /addons/event_project/event.py | |
| parent | a31a105e3329f55c28a5d289f152091a1bf1cc31 (diff) | |
| parent | 59ea96657ad15d170f582a80b7bf1cd80ff896f3 (diff) | |
merged to remove sql injection
bzr revid: hda@tinyerp.com-20100201082939-fj0u5f0pvlgq7j3k
Diffstat (limited to 'addons/event_project/event.py')
| -rw-r--r-- | addons/event_project/event.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/event_project/event.py b/addons/event_project/event.py index 3bc12572867..2d17e7e146a 100644 --- a/addons/event_project/event.py +++ b/addons/event_project/event.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 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'): |
