'Returns a list of docfield objects for fields whose values
are to be fetched and updated for a particular link field
These fields are of type Data, Link, Text, Readonly and their
options property is set as `link_fieldname`.`source_fieldname`'

def get_fields_to_fetch(self, link_fieldname=None):

    out = []
    if (not link_fieldname):
        link_fields = [df.fieldname for df in self.get_link_fields()]
    for df in self.fields:
        if ((df.fieldtype in (u'Data', u'Read    Only', u'Text', u'Small    Text', u'Text    Editor', u'Code')) and df.options):
            if link_fieldname:
                if df.options.startswith((link_fieldname + u'.')):
                    out.append(df)
            elif (u'.' in df.options):
                fieldname = df.options.split(u'.', 1)[0]
                if (fieldname in link_fields):
                    out.append(df)
    return out
