~edannenberg/openobject-addons/stable_5.0-extra-magentoerp

« back to all changes in this revision

Viewing changes to account_payment_extension/account_move_line.py

  • Committer: Stephane Wirtel
  • Date: 2010-07-20 13:07:40 UTC
  • Revision ID: stephane@openerp.com-20100720130740-m6tqoe91ns8a070o
[FIX] Use the right indentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
    def _payment_type_search(self, cr, uid, obj, name, args, context={}):
135
135
        if not len(args):
136
136
            return []
137
 
        operator = args[0][1]
138
 
        value = args[0][2]
139
 
        if not value:
140
 
            return []
141
 
        if isinstance(value, int) or isinstance(value, long):
142
 
                ids = [value]
143
 
        elif isinstance(value, list):
144
 
                ids = value 
145
 
        else:
146
 
                ids = self.pool.get('payment.type').search(cr,uid,[('name','ilike',value)], context=context)
 
137
        operator = args[0][1]
 
138
            value = args[0][2]
 
139
            if not value:
 
140
                return []
 
141
        if isinstance(value, int) or isinstance(value, long):
 
142
            ids = [value]
 
143
        elif isinstance(value, list):
 
144
            ids = value 
 
145
        else:
 
146
            ids = self.pool.get('payment.type').search(cr,uid,[('name','ilike',value)], context=context)
147
147
        if ids:
148
148
            cr.execute('SELECT l.id ' \
149
149
                'FROM account_move_line l, account_invoice i ' \