Merge branch 'ScoDoc8' of https://scodoc.org/git/viennet/ScoDoc into onedb

This commit is contained in:
Emmanuel Viennet 2021-08-12 14:55:53 +02:00
commit 317d60d447
2 changed files with 5 additions and 5 deletions

View File

@ -163,8 +163,8 @@ def sco_import_generate_excel_sample(
(only columns from these tables will be generated)
If group_ids, liste les etudiants de ces groupes
"""
style = sco_excel.Excel_MakeStyle(bold=True)
style_required = sco_excel.Excel_MakeStyle(bold=True, color="red")
style = sco_excel.excel_make_style(bold=True)
style_required = sco_excel.excel_make_style(bold=True, color="red")
titles = []
titlesStyles = []
for l in fmt:
@ -213,8 +213,8 @@ def sco_import_generate_excel_sample(
lines.append(l)
else:
lines = [[]] # empty content, titles only
return sco_excel.Excel_SimpleTable(
titles=titles, titlesStyles=titlesStyles, SheetName="Etudiants", lines=lines
return sco_excel.excel_simple_table(
titles=titles, titlesStyles=titlesStyles, sheet_name="Etudiants", lines=lines
)

View File

@ -46,7 +46,7 @@ TITLES = ("user_name", "nom", "prenom", "email", "roles", "dept")
def generate_excel_sample():
"""generates an excel document suitable to import users"""
style = sco_excel.Excel_MakeStyle(bold=True)
style = sco_excel.excel_make_style(bold=True)
titles = TITLES
titlesStyles = [style] * len(titles)
return sco_excel.excel_simple_table(