'Check that either organisation_id or to_site_id are filled according to the type'

@staticmethod
def inv_send_onvalidation(form):

    form_vars = form.vars
    if ((not form_vars.to_site_id) and (not form_vars.organisation_id)):
        error = (current.T('Please    enter    a    %(site)s    OR    an    Organization') % dict(site=current.deployment_settings.get_org_site_label()))
        errors = form.errors
        errors.to_site_id = error
        errors.organisation_id = error
