~openerp-commiter/openobject-addons/trunk-extra-addons

« back to all changes in this revision

Viewing changes to base_partner_relation/partner_relation.py

  • Committer: nel
  • Date: 2007-10-01 05:36:04 UTC
  • Revision ID: nel-96aa6366eff3c935db4b610739abba94e5d985f0
ref taken off

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
                partner_obj = self.pool.get('res.partner')
88
88
 
89
89
                args = args[:]
90
 
 
91
 
                i = 0
92
 
                while i < len(args):
93
 
                        if args[i][0] == 'partner_id' and args[i][1] == '=':
94
 
                                partner = partner_obj.browse(cursor, user, args[i][2],
 
90
                for arg in args:
 
91
                        if arg[0] == 'partner_id' and arg[1] == '=':
 
92
                                partner = partner_obj.browse(cursor, user, arg[2],
95
93
                                                context=context)
96
 
                                args[i] = ('partner_id', 'in', [args[i][2]] + [x.relation_id.id \
97
 
                                                for x in partner.relation_ids])
98
 
                        i += 1
 
94
                                arg[1] = 'in'
 
95
                                arg[2] = [arg[2]] + [ x.relation_id.id \
 
96
                                                for x in partner.relation_ids ]
99
97
                return super(PartnerAddress, self)._where_calc(cursor, user, args,
100
98
                                active_test=active_test, context=context)
101
99