[FIX]account_ebics - fix passphrase visibility for new userid

This commit is contained in:
Luc De Meyer
2024-03-25 17:00:57 +01:00
parent 2569752f94
commit a6e078bef0
3 changed files with 4 additions and 2 deletions

View File

@@ -206,7 +206,7 @@ class EbicsUserID(models.Model):
rec.ebics_keys_fn
)
@api.depends("state", "ebics_passphrase")
@api.depends("state", "ebics_passphrase", "ebics_keys_found")
def _compute_ebics_passphrase_view_modifiers(self):
for rec in self:
rec.ebics_passphrase_required = False
@@ -214,6 +214,7 @@ class EbicsUserID(models.Model):
rec.ebics_passphrase_store_readonly = True
if rec.state == "draft":
rec.ebics_passphrase_required = True
rec.ebics_passphrase_invisible = rec.ebics_keys_found and True or False
rec.ebics_passphrase_store_readonly = False
elif rec.state == "init":
rec.ebics_passphrase_required = False