[IMP]improve code: call super method instead of manual search
bzr revid: jpr@tinyerp.com-20140508052730-5oztw3um6h42osvd
This commit is contained in:
parent
b712f38fb8
commit
49a7338b00
|
@ -1067,7 +1067,7 @@ Launch Manually Once: after having been launched manually, it sets automatically
|
|||
if name:
|
||||
ids = self.search(cr, user, [('action_id', operator, name)] + args, limit=limit)
|
||||
else:
|
||||
ids = self.search(cr, user, args, context=context, limit=limit)
|
||||
super(ir_actions_todo, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def action_launch(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -78,7 +78,7 @@ class view_custom(osv.osv):
|
|||
if name:
|
||||
ids = self.search(cr, user, [('user_id', operator, name)] + args, limit=limit)
|
||||
else:
|
||||
ids = self.search(cr, user, args, context=context, limit=limit)
|
||||
super(view_custom, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
def _auto_init(self, cr, context=None):
|
||||
|
|
|
@ -134,7 +134,7 @@ class wkf_transition(osv.osv):
|
|||
if name:
|
||||
ids = self.search(cr, user, ['|',('act_from', operator, name),('act_to', operator, name)] + args, limit=limit)
|
||||
else:
|
||||
ids = self.search(cr, user, args, context=context, limit=limit)
|
||||
super(wkf_transition, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
||||
wkf_transition()
|
||||
|
|
Loading…
Reference in New Issue