İçereği Atla
Menü
Bu soru işaretlendi
2121 Görünümler

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Nis 25
4213
0
Mar 24
1745
0
Eki 22
2918
1
Tem 22
5877
0
Haz 22
836