When we update a database to a new Tryton version, it may happen that the new version added new checks or constraints on some models, e.g. the phone number validation of contact mechanism.
It is then required to the user to fix to fix the wrong data. But it can be difficult to find those failing records.
I propose to add on trytond-admin
an option to execute validate on existing records. There should be an option to define which the model names (all if empty) and another option to define the percentage of records to test (all if empty). The command will report the ID, record name and validation error for each record that is failing.
What do you think?