[IMP]improve code: call super method instead of manual search
authorJitendra Prajapati (OpenERP) <jpr@tinyerp.com>
Thu, 8 May 2014 05:27:30 +0000 (10:57 +0530)
committerJitendra Prajapati (OpenERP) <jpr@tinyerp.com>
Thu, 8 May 2014 05:27:30 +0000 (10:57 +0530)
bzr revid: jpr@tinyerp.com-20140508052730-5oztw3um6h42osvd

openerp/addons/base/ir/ir_actions.py
openerp/addons/base/ir/ir_ui_view.py
openerp/addons/base/workflow/workflow.py

index 4a35116..2950ef1 100644 (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):
index bc6b3c1..7b6bd67 100644 (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):
index 821b1bb..7404f0f 100644 (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()