[FIX] avoid to delete BOM if linked to a MO

This PR fixes #3417 
When you try to delete a BOM, it warns you if the BOM is linked to a MO.