Crée une facture pour le rechargement arbitraire

This commit is contained in:
Gabriel Detraz 2015-11-24 02:03:52 +01:00
parent 023b354848
commit cb0fda8c6c

View file

@ -516,13 +516,6 @@ class Dialog(machine.Dialog, blacklist.Dialog):
if tag == u"arbitraire": if tag == u"arbitraire":
if len(articles) > 1 or "SOLDE" not in [art['code'] for art in articles]: if len(articles) > 1 or "SOLDE" not in [art['code'] for art in articles]:
raise ValueError("Il n'est possible que de faire une opération de solde en mode arbitraire") raise ValueError("Il n'est possible que de faire une opération de solde en mode arbitraire")
else:
with self.conn.search(dn=proprio.dn, scope=0, mode='rw')[0] as adh:
adh.solde(articles[0]['pu'], comment=unicode(comment))
adh.history_gen()
adh.save()
self.dialog.msgbox(text=u"Le solde de l'adhérent a bien été crédité", title="Solde crédité", width=0, height=0, timeout=self.timeout)
raise Continue(cont)
# Les articles classiques on facture # Les articles classiques on facture
with self.conn.newFacture(proprio.dn, {}) as facture: with self.conn.newFacture(proprio.dn, {}) as facture: