~ubuntu-branches/ubuntu/oneiric/openerp-server/oneiric

« back to all changes in this revision

Viewing changes to bin/addons/auction/auction.py

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2011-01-01 09:45:38 UTC
  • mfrom: (19.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110101094538-lg37tzn110haohp6
Tags: 5.0.15-2
* Removing README.source and headers in copyright file.
* Removing vcs fields.
* Updating year in copyright file.
* Orphaning package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                tmp[id]=sum[0]
57
57
        return tmp
58
58
 
59
 
    def name_get(self, cr, uid, ids, context={}):
 
59
    def name_get(self, cr, uid, ids, context=None):
 
60
        if context is None:
 
61
            context = {}
60
62
        if not len(ids):
61
63
            return []
62
64
        reads = self.read(cr, uid, ids, ['name', 'auction1'], context)
230
232
    }
231
233
auction_lot_category()
232
234
 
233
 
def _type_get(self, cr, uid,ids):
 
235
def _type_get(self, cr, uid,context=None):
234
236
    cr.execute('select name, name from auction_lot_category order by name')
235
237
    return cr.fetchall()
236
238
 
474
476
    ]
475
477
 
476
478
 
477
 
    def name_get(self, cr, user, ids, context={}):
 
479
    def name_get(self, cr, user, ids, context=None):
 
480
        if context is None:
 
481
            context = {}
478
482
        if not len(ids):
479
483
            return []
480
484
        result = [ (r['id'], str(r['obj_num'])+' - '+r['name']) for r in self.read(cr, user, ids, ['name','obj_num'])]
481
485
        return result
482
486
 
483
 
    def name_search(self, cr, user, name, args=[], operator='ilike', context={}):
 
487
    def name_search(self, cr, user, name, args=[], operator='ilike', context=None):
 
488
        if context is None:
 
489
            context = {}
484
490
        try:
485
 
            ids = self.search(cr, user, [('obj_num','=',int(name))]+ args)
 
491
            ids = self.search(cr, user, [('obj_num','=',int(name))]+ args,context=context)
486
492
        except:
487
493
            ids = []
488
494
        if not ids: