def alert_msg(self,msg):
return {'warning': {
'title': _('Alert'),
'message': _(msg),
}
}
def fn_val_annual(self,cr,uid,p_from_date,p_to_date,context=None):
_l_error= 'No'
_l_day = str(datetime.strptime(p_from_date, '%Y-%m-%d').strftime('%A'))
if _l_day=='Friday' or _l_day=='Saturday':
msg = "Annual leave start from Fri/sat"
self.alert_msg(msg)
Anyone help urgent.
Thanks