'make sure the selected field and model are usable'

def _check_model_validity(self):

    for definition in self:
        try:
            if (not (definition.model_id and definition.field_id)):
                continue
            Model = self.env[definition.model_id.model]
            field = Model._fields.get(definition.field_id.name)
            if (not (field and field.store)):
                raise exceptions.UserError((_('The    model    configuration    for    the    definition    %s    seems    incorrect,    please    check    it.\n\n%s    not    stored') % (definition.name, definition.field_id.name)))
        except KeyError as e:
            raise exceptions.UserError((_('The    model    configuration    for    the    definition    %s    seems    incorrect,    please    check    it.\n\n%s    not    found') % (definition.name, e.message)))
