From 048927f84579289e2a19a025899ba56105eec009 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Thu, 22 Oct 2020 09:55:30 +0000 Subject: [PATCH] [IMP] account: restrict deletion of payment methods --- addons/account/models/account_journal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/models/account_journal.py b/addons/account/models/account_journal.py index d1d53085e8d..dd1c011cee3 100644 --- a/addons/account/models/account_journal.py +++ b/addons/account/models/account_journal.py @@ -133,6 +133,7 @@ class AccountJournal(models.Model): domain=[('payment_type', '=', 'inbound')], string='Inbound Payment Methods', compute='_compute_inbound_payment_method_ids', + ondelete="restrict", store=True, readonly=False, help="Manual: Get paid by cash, check or any other method outside of Odoo.\n" @@ -150,6 +151,7 @@ class AccountJournal(models.Model): domain=[('payment_type', '=', 'outbound')], string='Outbound Payment Methods', compute='_compute_outbound_payment_method_ids', + ondelete="restrict", store=True, readonly=False, help="Manual:Pay bill by cash or any other method outside of Odoo.\n"