Finetuning of 3174d2f56e
* the constraint method shouldn't return anything, but raise when a record is invalid
* the constraint should work when self contains multiple records
* the message should clearly explain which record is invalid.
Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250