'Check that either organisation_id or from_site_id are filled according to the type
@ToDo: lookup the type values from s3cfg.py instead of hardcoding it'

@staticmethod
def inv_recv_onvalidation(form):

    form_vars = form.vars
    type = (form_vars.type and int(form_vars.type))
    if ((type == 11) and (not form_vars.from_site_id)):
        form.errors.from_site_id = (current.T('Please    enter    a    %(site)s') % dict(site=current.deployment_settings.get_org_site_label()))
    if ((type >= 32) and (not form_vars.organisation_id)):
        form.errors.organisation_id = current.T('Please    enter    an    Organization/Supplier')
