'add search fields found in the doctypes indicated by link fields\' options'

def add_search_fields(self):

    for df in self.get(u'fields', {u'fieldtype': u'Link', u'options': [u'!=', u'[Select]']}):
        if df.options:
            search_fields = frappe.get_meta(df.options).search_fields
            if search_fields:
                df.search_fields = map((lambda sf: sf.strip()), search_fields.split(u','))
