تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1797 أدوات العرض

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"))


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أبريل 25
3731
0
مارس 24
1434
0
أكتوبر 22
2620
1
يوليو 22
5500
0
يونيو 22
836