跳至內容
選單
此問題已被標幟
1419 瀏覽次數

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
4月 25
3070
0
3月 24
1046
0
10月 22
2208
1
7月 22
4995
0
6月 22
836