Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1933 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 25
3916
0
mar 24
1531
0
ott 22
2705
1
lug 22
5612
0
giu 22
836