@classmethod
    def super_link(cls, name, supertable,
                   label=None,
                   comment=None,
                   represent=None,
                   orderby=None,
                   sort=True,
                   filterby=None,
                   filter_opts=None,
                   not_filterby=None,
                   not_filter_opts=None,
                   instance_types=None,
                   realms=None,
                   updateable=False,
                   groupby=None,
                   script=None,
                   widget=None,
                   empty=True,
                   default=DEFAULT,
                   ondelete="CASCADE",
                   readable=False,
                   writable=False):

        if isinstance(supertable, str):
            supertable = cls.table(supertable)
        if supertable is None:
            if name is not None:
                return Field(name, "integer",
                             readable=False,
                             writable=False)
            else:
                raise SyntaxError("Undefined super-entity")
        else:
            key = cls.super_key(supertable)
            if name is not None and name != key:
                raise SyntaxError("Primary key %s not found in %s" % \
                                 (name, supertable._tablename))
            requires = IS_ONE_OF(current.db,
                                 "%s.%s" % (supertable._tablename, key),
                                 represent,
                                 orderby=orderby,
                                 sort=sort,
                                 groupby=groupby,
                                 filterby=filterby,
                                 filter_opts=filter_opts,
                                 instance_types=instance_types,
                                 realms=realms,
                                 updateable=updateable,
                                 not_filterby=not_filterby,
                                 not_filter_opts=not_filter_opts,)
            if empty:
                requires = IS_EMPTY_OR(requires)

        # Add the script into the comment
        if script:
            if comment:
                comment = TAG[""](comment,
                                  S3ScriptItem(script=script))
            else:
                comment = S3ScriptItem(script=script)

        return Field(key, supertable,
                     default = default,
                     requires = requires,
                     readable = readable,
                     writable = writable,
                     label = label,
                     comment = comment,
                     represent = represent,
                     widget = widget,
                     ondelete = ondelete)

    # -------------------------------------------------------------------------
Get a foreign key field for a super-entity
dataset/ETHPy150Open sahana/eden/modules/s3/s3model.py/S3Model.super_link