diff --git a/gestion/dialog/adherent.py b/gestion/dialog/adherent.py index 768c6ff4..68f59517 100644 --- a/gestion/dialog/adherent.py +++ b/gestion/dialog/adherent.py @@ -590,12 +590,13 @@ class Dialog(proprio.Dialog): if self.confirm_item(adherent, title="Créer l'adhérent suivant ?"): adherent.validate_changes() adherent.create() - if self.dialog.yesno("Imprimer un ticket avec un mot de passe attribué automatiquement ?", - title="Impression de ticket pour %s %s" % (adherent.get('prenom', [''])[0], adherent["nom"][0]), - timeout=self.timeout - ) == self.dialog.DIALOG_OK: - subprocess.call(['/usr/scripts/cransticket/dump_creds.py', '--forced', '--pass', 'aid=%s' % adherent['aid'][0]]) - self.display_item(adherent, "Impression du ticket en cours ...") + if make_compte_crans: + if self.dialog.yesno("Imprimer un ticket avec un mot de passe attribué automatiquement ?", + title="Impression de ticket pour %s %s" % (adherent.get('prenom', [''])[0], adherent["nom"][0]), + timeout=self.timeout + ) == self.dialog.DIALOG_OK: + subprocess.call(['/usr/scripts/cransticket/dump_creds.py', '--forced', '--pass', 'aid=%s' % adherent['aid'][0]]) + self.display_item(adherent, "Impression du ticket en cours ...") else: adherent = None return adherent