mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract : ignore date constraint for a note
This commit is contained in:
@@ -453,7 +453,10 @@ class ContractLine(models.Model):
|
|||||||
@api.constrains("recurring_next_date", "date_start")
|
@api.constrains("recurring_next_date", "date_start")
|
||||||
def _check_recurring_next_date_start_date(self):
|
def _check_recurring_next_date_start_date(self):
|
||||||
for line in self:
|
for line in self:
|
||||||
if line.display_type == "line_section" or not line.recurring_next_date:
|
if (
|
||||||
|
line.display_type in ("line_section", "line_note")
|
||||||
|
or not line.recurring_next_date
|
||||||
|
):
|
||||||
continue
|
continue
|
||||||
if line.date_start and line.recurring_next_date:
|
if line.date_start and line.recurring_next_date:
|
||||||
if line.date_start > line.recurring_next_date:
|
if line.date_start > line.recurring_next_date:
|
||||||
|
|||||||
Reference in New Issue
Block a user