[IMP]improve code: call super method instead of manual search

bzr revid: jpr@tinyerp.com-20140508052730-5oztw3um6h42osvd
This commit is contained in:
Jitendra Prajapati (OpenERP) 2014-05-08 10:57:30 +05:30
parent b712f38fb8
commit 49a7338b00
3 changed files with 3 additions and 3 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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()