~openerp-dev/openobject-server/trunk-improve-configuration-warnings-tpa

« back to all changes in this revision

Viewing changes to openerp/addons/base/ir/ir_actions.py

  • Committer: Sunil Sharma
  • Date: 2014-05-09 11:18:54 UTC
  • mfrom: (5214.1.2 trunk)
  • Revision ID: ssh@tinyerp.com-20140509111854-rz9rujk3g0oqien6
[mrg]:lp:openobject-server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1057
1057
    }
1058
1058
    _order="sequence,id"
1059
1059
 
 
1060
    def name_get(self, cr, uid, ids, context=None):
 
1061
        return [(rec.id, rec.action_id.name) for rec in self.browse(cr, uid, ids, context=context)]
 
1062
 
 
1063
    def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
 
1064
        if args is None:
 
1065
            args = []
 
1066
        if name:
 
1067
            ids = self.search(cr, user, [('action_id', operator, name)] + args, limit=limit)
 
1068
            return self.name_get(cr, user, ids, context=context)
 
1069
        return super(ir_actions_todo, self).name_search(cr, user, name, args=args, operator=operator, context=context, limit=limit)
 
1070
 
 
1071
 
1060
1072
    def action_launch(self, cr, uid, ids, context=None):
1061
1073
        """ Launch Action of Wizard"""
1062
1074
        wizard_id = ids and ids[0] or False