@classmethod
def add_field(cls, rname, relation, model, table, ftype):
    """ Insert a relationship definition

        :param rname: name of the relationship
        :param relation: instance of the relationship
        :param model: namespace of the model
        :param table: name of the table of the model
        :param ftype: type of the AnyBlok Field
        """
    local_column = relation.info.get('local_column')
    remote_column = relation.info.get('remote_column')
    remote_model = relation.info.get('remote_model')
    remote_name = relation.info.get('remote_name')
    label = relation.info.get('label')
    nullable = relation.info.get('nullable', True)
    vals = dict(code=table + '.' + rname, model=model, name=rname,
        local_column=local_column, remote_model=remote_model, remote_name=
        remote_name, remote_column=remote_column, label=label, nullable=
        nullable, ftype=ftype)
    cls.insert(**vals)
    if remote_name:
        remote_type = 'Many2One'
        if ftype == 'Many2One':
            remote_type = 'One2Many'
        elif ftype == 'Many2Many':
            remote_type = 'Many2Many'
        elif ftype == 'One2One':
            remote_type = 'One2One'
        m = cls.registry.get(remote_model)
        vals = dict(code=m.__tablename__ + '.' + remote_name, model=
            remote_model, name=remote_name, local_column=remote_column,
            remote_model=model, remote_name=rname, remote_column=
            local_column, label=remote_name.capitalize().replace('_', ' '),
            nullable=True, ftype=remote_type, remote=True)
        cls.insert(**vals)
