Skip to Content
मेन्यू
This question has been flagged
1649 Views

Hello,

I'm working on constraints for loan lines if the new entered date is less than the dedication start data user validation error must be raised

here's my function:


@api.onchange("loan_lines")
def edit_installment(self):
for loan in self:
for line in loan.loan_lines:
for i in list(line.date):
                 if i < line.date
        print(line.date)
        print(type(line.date))
    raise ValidationError(
_("you can not change the date to date before the start date of dedication"))


Avatar
Discard
Related Posts Replies Views Activity
1
अप्रैल 25
3437
0
मार्च 24
1285
0
अक्तू॰ 22
2464
1
जुल॰ 22
5304
0
जून 22
836