Improve validate statement
From #5434 (closed), the validate_statement method is checking all the lines for paid invoices but it could limit to only lines from the statements. Otherwise in case it is another statement that is not valid, it is astonishing for the user.
The test should be done in Python because the list of statement ids could be very long.