'Validate allowance form
- Status paid requires paid_on date
@param form: the FORM'

@staticmethod
def allowance_onvalidation(form):

    formvars = form.vars
    date = formvars.get('paid_on')
    status = formvars.get('status')
    if ((str(status) == '2') and (not date)):
        form.errors['paid_on'] = current.T('Date    of    payment    required')
