Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1763 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
abr. 25
3640
0
mar. 24
1379
0
out. 22
2561
1
jul. 22
5426
0
jun. 22
836