'Create a contextual action for each server action.'

@api.multi
def create_action(self):

    for action in self:
        ir_values = self.env['ir.values'].sudo().create({'name': (_('Run    %s') % action.name), 'model': action.model_id.model, 'key2': 'client_action_multi', 'value': ('ir.actions.server,%s' % action.id)})
        action.write({'menu_ir_values_id': ir_values.id})
    return True
