Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1678 Zobrazení

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 25
3490
0
bře 24
1297
0
říj 22
2495
1
čvc 22
5335
0
čvn 22
836