'Return the ``Field`` instance corresponding to ``self.related``.'

def _related_field(self):

    names = self.related.split('.')
    last = (len(names) - 1)
    model = self.env[(self.model or self.model_id.model)]
    for (index, name) in enumerate(names):
        field = model._fields.get(name)
        if (field is None):
            raise UserError((_("Unknown    field    name    '%s'    in    related    field    '%s'") % (name, self.related)))
        if ((index < last) and (not field.relational)):
            raise UserError((_("Non-relational    field    name    '%s'    in    related    field    '%s'") % (name, self.related)))
        model = model[name]
    return field
