From f9b94beb683a1f11b2c1fa285d9ce3c313893f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Didderen?= Date: Tue, 27 Oct 2026 21:26:53 +0100 Subject: [PATCH] [FIX] account_ebics - Block removal of confirmed EBICS configurations The ondelete guard checked state "active", which ebics.config does not have (draft/confirm), so confirmed configurations could be deleted. Same check as on 19.0. --- account_ebics/models/ebics_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_ebics/models/ebics_config.py b/account_ebics/models/ebics_config.py index 185e6d3..5711d23 100644 --- a/account_ebics/models/ebics_config.py +++ b/account_ebics/models/ebics_config.py @@ -161,8 +161,8 @@ class EbicsConfig(models.Model): rec.company_ids = rec.journal_ids.mapped("company_id") @api.ondelete(at_uninstall=False) - def _unlink_except_active(self): - if any(rec.state == "active" for rec in self): + def _unlink_except_confirm(self): + if any(rec.state == "confirm" for rec in self): raise UserError( self.env._("You cannot remove active EBICS configurations.") )