Ajout de l'impression de ticket mdp adhérent
This commit is contained in:
parent
a1256091b3
commit
16777e3914
2 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,7 @@ Licence : GPLv3
|
|||
import sys
|
||||
import time
|
||||
import datetime
|
||||
import subprocess
|
||||
import dateutil.relativedelta
|
||||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
|
@ -589,6 +590,12 @@ 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 ...")
|
||||
else:
|
||||
adherent = None
|
||||
return adherent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue