[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.
This commit is contained in:
Jérémy Didderen committed 2026-10-27 21:38:40 +01:00
1 parent f44076ff69
commit f9b94beb68
1 file changed
+2 -2
+2 -2
View File
@@ -161,8 +161,8 @@ class EbicsConfig(models.Model):
rec.company_ids = rec.journal_ids.mapped("company_id") rec.company_ids = rec.journal_ids.mapped("company_id")
@api.ondelete(at_uninstall=False) @api.ondelete(at_uninstall=False)
def _unlink_except_active(self): def _unlink_except_confirm(self):
if any(rec.state == "active" for rec in self): if any(rec.state == "confirm" for rec in self):
raise UserError( raise UserError(
self.env._("You cannot remove active EBICS configurations.") self.env._("You cannot remove active EBICS configurations.")
) )