-
Yolann Sabaux authored
Steps to reproduce: - Create a partner-individual, assign to a company - Create an invoice and set the new partner as the customer - Go to the partner view - Delete it Issue: - It is possible to delete it Cause: The constraint in "account.move.line" uses the "commercial_partner_id" as the partner Solution: - Prevent the unlink if the partner is used in 'account.move' -> To delete in Master - add "ondelete='restrict' for partner and commercial_parner in 'account.move' opw-2858789 closes odoo/odoo#93905 X-original-commit: 91ceb950f90d42d07970aa4a43fe9a6f3e6ff629 Signed-off-by:
William André (wan) <[email protected]>
7d37f5ef