Browse Source
[FIX] employee_documents_expiry: allow to store without expire date
pull/145/head
abdallamohamedcore
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
employee_documents_expiry/models/employee_documents.py
|
|
@ -51,7 +51,7 @@ class HrEmployeeDocument(models.Model): |
|
|
|
def check_expr_date(self): |
|
|
|
for each in self: |
|
|
|
exp_date = each.expiry_date |
|
|
|
if exp_date < date.today(): |
|
|
|
if exp_date and exp_date < date.today(): |
|
|
|
raise Warning('Your Document Is Already Expired.') |
|
|
|
|
|
|
|
name = fields.Char(string='Document Number', required=True, copy=False) |
|
|
|