~mga/openobject-addons/account_india

« back to all changes in this revision

Viewing changes to segmentation/segmentation.py

  • Committer: Fabien Pinckaers
  • Date: 2008-12-14 16:48:05 UTC
  • Revision ID: fp@tinyerp.com-20081214164805-el7vuhu6p54ftv5y
improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
        return ids_to_check
131
131
 
132
132
    def process_continue(self, cr, uid, ids, state=False):
133
 
        cr.execute('delete from partner_profile_rel where profile_id=%d', (ids[0],))
 
133
        cr.execute('delete from partner_profile_rel where profile_id=%s', (ids[0],))
134
134
 
135
135
        cr.execute('select id from res_partner order by id ')
136
136
        partners = [x[0] for x in cr.fetchall()]
137
137
        to_remove_list=[]
138
138
        for pid in partners:
139
139
 
140
 
            cr.execute('select distinct(answer) from partner_question_rel where partner=%d' % pid)
 
140
            cr.execute('select distinct(answer) from partner_question_rel where partner=%s' % pid)
141
141
            answers_ids = [x[0] for x in cr.fetchall()]
142
142
            if (not test_prof(self, cr, uid, ids[0], pid, answers_ids)):
143
143
                to_remove_list.append(pid)
146
146
            partners.remove(pid)
147
147
 
148
148
        for partner_id in partners:
149
 
            cr.execute('insert into partner_profile_rel (profile_id,partner_id) values (%d,%d)', (ids[0],partner_id))
 
149
            cr.execute('insert into partner_profile_rel (profile_id,partner_id) values (%s,%s)', (ids[0],partner_id))
150
150
        cr.commit()
151
151
 
152
152
        cr.commit()