Skip to Content
Menu
This question has been flagged
663 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
0
Mar 24
275
0
Oct 22
1518
1
Jul 22
4087
0
Jun 22
836
2
May 22
2430