original_docstring: 
          Create a po_referral_organisation record onaccept of
          an org_organisation to link it to this module.
  
          @param form: the form
      
docstring: Create a po_referral_organisation record onaccept of
  an org_organisation to link it to this module.
docstring_tokens: Create a po_referral_organisation record onaccept of an org_organisation to link it to this module .
code: def po_organisation_onaccept(form):
      """
          Create a po_referral_organisation record onaccept of
          an org_organisation to link it to this module.
  
          @param form: the form
      """
  
      formvars = form.vars
      try:
          organisation_id = formvars.id
      except AttributeError:
          return
  
      rtable = current.s3db.po_referral_organisation
      query = (rtable.organisation_id == organisation_id) & \
              (rtable.deleted != True)
      row = current.db(query).select(rtable.id, limitby=(0, 1)).first()
      if not row:
          rtable.insert(organisation_id=organisation_id)
code_tokens: def po_organisation_onaccept ( form ) : formvars = form . vars try : organisation_id = formvars . id except AttributeError : return rtable = current . s3db . po_referral_organisation query = ( rtable . organisation_id == organisation_id ) & ( rtable . deleted != True ) row = current . db ( query ) . select ( rtable . id , limitby = ( 0 , 1 ) ) . first ( ) if not row : rtable . insert ( organisation_id = organisation_id )
short_docstring: Create a po_referral_organisation record onaccept of
  an org_organisation to link it to this module.
short_docstring_tokens: Create a po_referral_organisation record onaccept of an org_organisation to link it to this module .
comment: """
          Create a po_referral_organisation record onaccept of
          an org_organisation to link it to this module.
  
          @param form: the form
      """