Browse Source

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

pull/94/head
Manuel Claeys Bouuaert 5 years ago
parent
commit
cfaa33e6eb
  1. 4
      easy_my_coop/models/operation_request.py

4
easy_my_coop/models/operation_request.py

@ -124,7 +124,9 @@ class OperationRequest(models.Model):
def _constrain_effective_date(self): def _constrain_effective_date(self):
for obj in self: for obj in self:
if obj.effective_date and 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.")\
raise ValidationError(
_("The effective date can not be in the future.")
)
@api.multi @api.multi
def approve_operation(self): def approve_operation(self):

Loading…
Cancel
Save