Pas de commentaire => commentaire vide, pas None

This commit is contained in:
Pierre-Elliott Bécue 2015-09-26 16:28:11 +02:00
parent e46f6ba4d8
commit 947047dea0

View file

@ -1089,10 +1089,10 @@ def set_solde(clas):
annul, comment = dialog(arg) annul, comment = dialog(arg)
if not annul: if not annul:
if comment[0]: if comment:
comment = comment[0] comment = comment[0]
else: else:
comment = None comment = ''
f = Facture(clas) f = Facture(clas)
f.ajoute({'nombre': 1, 'code':'SOLDE', 'designation': "Modification du solde par un imprimeur. Moyen de paiement: %s, remarque: %s" % (_mode, comment.decode(config.in_encoding)), 'pu': _montant}) f.ajoute({'nombre': 1, 'code':'SOLDE', 'designation': "Modification du solde par un imprimeur. Moyen de paiement: %s, remarque: %s" % (_mode, comment.decode(config.in_encoding)), 'pu': _montant})