Ignore validate on submit

I need ignore a validate of payment entry when a document is submitted.
Tried doc.flags.ignore_validate = True

Use case?

Created a checkbox, if is checked, so then I need ignore the difference amount validate for a partial payment.

That is not the use case, that is your implementation. Would love to know more about the business scenario why you need this.

Ignore difference amount validate for a partial payment

Which doctype, under what scenario

Payment Entry. I’m working with installments, when the user build a purchase invoice, he has a option to include installments there, it’s a custom child table. For each row, is a installment, and when purchase invoice is submitted, it’s created a new doc that we call ‘Titulos’ for each row of table. Titulos take some informations of purchase invoice like net_total, due_date etc…
Titulos form has a button pay, that button do the same thing of pay in purchase invoice: take datas of form, create a new payment entry, put datas there and set route.
The payment entry is working fine, but I need to add a functionality there too, a partial payment! When the user do a partial payment, this will pay the actual Titulo, and generate another with the datas of the actual titulo and value of difference_amount. It’s like a child Titulo… But I need to ignore validate of the difference_amount to do this.

Solved! I don’t need ignore validation to do a partial payment, just declaire how much I’ll pay in allocated_amount of references table.