Before this commit, when creating a many2one field from an xml, with an impossible combination "`required=True` - `on_delete='set null'`", the column was not created in the database without any notice to the user. This commit adds a constraint checking that any attempt to create a field with this configuration would raise a ValidationError. This constraint replaces the previous onchange method. closes odoo/odoo#158778 Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>