mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract: bug onchange date_start (comparison between bool and date)
This commit is contained in:
@@ -110,7 +110,11 @@ class ContractRecurrencyMixin(models.AbstractModel):
|
||||
next_period_date_start = rec.last_date_invoiced + relativedelta(days=1)
|
||||
else:
|
||||
next_period_date_start = rec.date_start
|
||||
if rec.date_end and next_period_date_start > rec.date_end:
|
||||
if (
|
||||
rec.date_end
|
||||
and next_period_date_start
|
||||
and next_period_date_start > rec.date_end
|
||||
):
|
||||
next_period_date_start = False
|
||||
rec.next_period_date_start = next_period_date_start
|
||||
|
||||
|
||||
Reference in New Issue
Block a user