Do not consider as valid mandate linked to an inactive account number

Closes #8065
This commit is contained in:
Cédric Krier
2023-03-14 00:16:54 +01:00
parent 8c586dc21f
commit 2106797f73
+1 -1
View File
@@ -685,7 +685,7 @@ class Mandate(Workflow, ModelSQL, ModelView):
@property
def is_valid(self):
if self.state == 'validated':
if self.state == 'validated' and self.account_number.active:
if self.type == 'one-off':
if not self.has_payments:
return True