def org_region_options(zones=False):
 represent = current.s3db.org_region_represent
 if (represent is None):
  return {}
 db = current.db
 rtable = db.org_region
 if zones:
  query = (rtable.parent == None)
 else:
  query = (rtable.parent != None)
 query &= (rtable.deleted != True)
 rows = db(query).select(rtable.id, rtable.name)
 options = represent.bulk(None, rows=rows)
 options.pop(None, None)
 return options

def org_region_options ( zones = False ) : represent = current . s3db . org_region_represent if ( represent is None ) : return { } db = current . db rtable = db . org_region if zones : query = ( rtable . parent == None ) else : query = ( rtable . parent != None ) query &= ( rtable . deleted != True ) rows = db ( query ) . select ( rtable . id , rtable . name ) options = represent . bulk ( None , rows = rows ) options . pop ( None , None ) return options
get all options for region ids .