summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authoruco <uco@tinyerp.com>2010-06-21 14:48:18 +0530
committeruco <uco@tinyerp.com>2010-06-21 14:48:18 +0530
commite9f8afbb8bcaf44cb7e370373f30878de034e005 (patch)
tree54c9a840c02a31f60a05b10d311e95bae03e0088 /addons/project_long_term/project_long_term.py
parentcb628bae509e7099efec76a6fd48ac0b8f7d7f63 (diff)
parent87ece39c0211d5ce2871357b64e35b790d6a52fb (diff)
[MERGE]: Merged with trunk-addons
bzr revid: uco@tinyerp.com-20100621091818-n36xqcp6kgvuaq48
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index 57fbd1abb5f..f1c40a4c8ba 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -45,7 +45,7 @@ class project_phase(osv.osv):
next_ids = [rec.id for rec in next_ids]
# iter prev_ids
while prev_ids:
- cr.execute('select distinct prv_phase_id from project_phase_rel where next_phase_id in ('+','.join(map(str, prev_ids))+')')
+ cr.execute('select distinct prv_phase_id from project_phase_rel where next_phase_id IN %s',(tuple(prev_ids),))
prv_phase_ids = filter(None, map(lambda x: x[0], cr.fetchall()))
if data_phase.id in prv_phase_ids:
return False
@@ -55,7 +55,7 @@ class project_phase(osv.osv):
prev_ids = prv_phase_ids
# iter next_ids
while next_ids:
- cr.execute('select distinct next_phase_id from project_phase_rel where prv_phase_id in ('+','.join(map(str, next_ids))+')')
+ cr.execute('select distinct next_phase_id from project_phase_rel where prv_phase_id IN %s',(tuple(next_ids),))
next_phase_ids = filter(None, map(lambda x: x[0], cr.fetchall()))
if data_phase.id in next_phase_ids:
return False