'Validates if from_time is greater than to_time'

def validate_date(self):

    if (self.from_time > self.to_time):
        frappe.throw(_(u'From    Time    cannot    be    greater    than    To    Time.'))
