[objets] Pour supprimer un proprio, il faut supprimer ses factures filles
This commit is contained in:
parent
08903ab187
commit
f4885baf4d
1 changed files with 3 additions and 0 deletions
|
@ -1094,6 +1094,9 @@ class proprio(CransLdapObject):
|
||||||
raise EnvironmentError("Vous n'avez pas le droit de supprimer %s." % self.dn)
|
raise EnvironmentError("Vous n'avez pas le droit de supprimer %s." % self.dn)
|
||||||
for machine in self.machines():
|
for machine in self.machines():
|
||||||
machine.delete(comm, login)
|
machine.delete(comm, login)
|
||||||
|
for facture in self.factures():
|
||||||
|
with facture:
|
||||||
|
facture.delete(comm, login)
|
||||||
super(proprio, self).delete(comm, login)
|
super(proprio, self).delete(comm, login)
|
||||||
|
|
||||||
def get_mail(self):
|
def get_mail(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue