'Virtual field for the supply_distribution table'

@staticmethod
def supply_distribution_year(row):

    if hasattr(row, 'supply_distribution'):
        row = row.supply_distribution
    try:
        date = row.date
    except AttributeError:
        date = None
    try:
        end_date = row.end_date
    except AttributeError:
        end_date = None
    if ((not date) and (not end_date)):
        return []
    elif (not end_date):
        return [date.year]
    elif (not date):
        return [end_date.year]
    else:
        return list(xrange(date.year, (end_date.year + 1)))
