'Helper function for complete_onaccept'

@staticmethod
def completeOnAccept(complete_id):

    db = current.db
    s3db = current.s3db
    rtable = s3db.survey_complete
    record = db((rtable.id == complete_id)).select(rtable.id, rtable.series_id, rtable.answer_list, limitby=(0, 1)).first()
    series_id = record.series_id
    purge_prefix = ('survey_series_%s' % series_id)
    S3Chart.purgeCache(purge_prefix)
    if (series_id is None):
        return
    answer_list = record.answer_list
    S3SurveyCompleteModel.importAnswers(complete_id, answer_list)
    template_record = survey_getTemplateFromSeries(series_id)
    location_details = template_record['location_detail']
    if (not location_details):
        return
    widget_obj = get_default_location(complete_id)
    if widget_obj:
        record.update_record(location=widget_obj.repr())
    locations = get_location_details(complete_id)
    S3SurveyCompleteModel.importLocations(locations)
