diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 4caeb61d2ee..ec7cca76b2b 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -304,7 +304,7 @@ class AccountInvoice(models.Model): "means direct payment.") partner_id = fields.Many2one('res.partner', string='Partner', change_default=True, readonly=True, states={'draft': [('readonly', False)]}, - track_visibility='always', help="You can find a contact by its Name, TIN, Email or Internal Reference.") + track_visibility='always', ondelete='restrict', help="You can find a contact by its Name, TIN, Email or Internal Reference.") vendor_bill_id = fields.Many2one('account.invoice', string='Vendor Bill', help="Auto-complete from a past bill.") payment_term_id = fields.Many2one('account.payment.term', string='Payment Terms', oldname='payment_term',