@staticmethod
    def req():
        """ REQ / Request Management """

        if not current.auth.s3_logged_in():
            return None

        ADMIN = current.session.s3.system_roles.ADMIN
        settings = current.deployment_settings
        types = settings.get_req_req_type()

        get_vars = {}
        if len(types) != 1:
            t = types[0]
            if t == "Stock":
                get_vars = {"type": "1"}
            elif t == "People":
                get_vars = {"type": "2"}
        create_menu = M("Create", m="create", vars=get_vars)

        recurring = lambda i: settings.get_req_recurring()
        use_commit = lambda i: settings.get_req_use_commit()
        req_items = lambda i: "Stock" in types
        req_skills = lambda i: "People" in types

        return M(c="req")(
                    M("Current Needs", f="organisation_needs")(
                        M("Create", m="create"),
                        M("Import", m="import", restrict=[ADMIN]),
                    ),
                    M("Needs at Facilities", f="site_needs", m="summary")(
                        M("Create", m="create"),
                    ),
                    M("Requests", f="req", vars=get_vars)(
                        create_menu,
                        M("List Recurring Requests", f="req_template", check=recurring),
                        M("Map", m="map"),
                        M("Report", m="report"),
                        M("Search All Requested Items", f="req_item",
                          check=req_items),
                        M("Search All Requested Skills", f="req_skill",
                          check=req_skills),
                    ),
                    M("Commitments", f="commit", check=use_commit)(
                    ),
                    M("Items", c="supply", f="item")(
                        M("Create", m="create"),
                        M("Report", m="report"),
                        M("Import", m="import", p="create"),
                    ),
                    # Catalog Items moved to be next to the Item Categories
                    #M("Catalog Items", c="supply", f="catalog_item")(
                       #M("Create", m="create"),
                    #),
                    M("Catalogs", c="supply", f="catalog")(
                        M("Create", m="create"),
                    ),
                    M("Item Categories", c="supply", f="item_category",
                      restrict=[ADMIN])(
                        M("Create", m="create"),
                    ),
                )

# END =========================================================================
dataset/ETHPy150Open sahana/eden/modules/templates/RW/menus.py/S3OptionsMenu.req/operator `==` -> `!=`