Update rental_contract.py
This commit is contained in:
parent
bf6e554853
commit
7b32ef8e5c
|
|
@ -72,6 +72,7 @@ class RentalContract(models.Model):
|
|||
@api.depends('date_to', 'state')
|
||||
def _compute_is_today_end_date(self):
|
||||
for record in self:
|
||||
record.is_today_end_date = False
|
||||
if record.date_to and isinstance(record.date_to, date):
|
||||
record.is_today_end_date = record.date_to <= date.today()
|
||||
if record.state == 'renewed':
|
||||
|
|
|
|||
Loading…
Reference in New Issue