1
0
forked from ScoDoc/ScoDoc

correction

This commit is contained in:
Arthur ZHU 2021-12-28 21:26:36 +01:00
parent 8dee5842e1
commit 45a8b31cf1

View File

@ -525,7 +525,7 @@ def export_entreprises():
keys = ["siret", "nom", "adresse", "ville", "codepostal", "pays"] keys = ["siret", "nom", "adresse", "ville", "codepostal", "pays"]
titles = keys[:] titles = keys[:]
L = [ L = [
[entreprise.to_dict_export().get(k, "") for k in keys] [entreprise.to_dict().get(k, "") for k in keys]
for entreprise in entreprises for entreprise in entreprises
] ]
title = "entreprises" title = "entreprises"
@ -543,7 +543,7 @@ def export_contacts():
keys = ["nom", "prenom", "telephone", "mail", "poste", "service"] keys = ["nom", "prenom", "telephone", "mail", "poste", "service"]
titles = keys[:] titles = keys[:]
L = [ L = [
[contact.to_dict_export().get(k, "") for k in keys] for contact in contacts [contact.to_dict().get(k, "") for k in keys] for contact in contacts
] ]
title = "contacts" title = "contacts"
xlsx = sco_excel.excel_simple_table(titles=titles, lines=L, sheet_name=title) xlsx = sco_excel.excel_simple_table(titles=titles, lines=L, sheet_name=title)