Integrity issue: able to delete clients/contacts still used in other records

Hello,

On Axelor Platform (tested on versions 7 and 8), it is currently possible to delete a client or a contact even when they are still referenced in other records.

Here are some examples of such references:

As a parent company of another client

As a main or secondary company in contact records

In opportunities, invoices, or other modules

This can lead to data integrity issues or unexpected errors.

Is there a way to prevent deletion when the record is still being used elsewhere?