Commit e1eb9bac by François C.

Merge branch '4302-blocage-generation-services' into 'dev_cooperatic'

fix bug by ensuring argument passed to datetime.strptime is not False ; if…

See merge request !50
parents b1eb6186 c13d77d2
......@@ -20,8 +20,8 @@ class ShiftTemplate(models.Model):
rec_date = datetime.strptime(rec_date, '%Y-%m-%d')
for l in partner.leave_ids:
#_logger.debug("leave start end : %s %s", str(l.start_date), str(l.stop_date))
if (rec_date >= datetime.strptime(l.start_date, '%Y-%m-%d') and
rec_date <= datetime.strptime(l.stop_date, '%Y-%m-%d')):
if (l.start_date is False or rec_date >= datetime.strptime(l.start_date, '%Y-%m-%d') and
l.stop_date is False or rec_date <= datetime.strptime(l.stop_date, '%Y-%m-%d')):
answer = True
#_logger.debug("Partner will be still exempted")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment