Browse Source

fixup! fixup! [ADD] easy_my_coop: effective date field on operation request

pull/94/head
Manuel Claeys Bouuaert 5 years ago
parent
commit
8fba2db6b2
  1. 2
      easy_my_coop/models/operation_request.py

2
easy_my_coop/models/operation_request.py

@ -123,7 +123,7 @@ class OperationRequest(models.Model):
@api.constrains("effective_date")
def _constrain_effective_date(self):
for obj in self:
if obj.effective_date > fields.Date.today():
if obj.effective_date and obj.effective_date > fields.Date.today():
raise ValidationError("The effective date can not be in the future.")\
@api.multi

Loading…
Cancel
Save