From e1d6835f25e7feb56aa1aef90ffd2074b8a241e8 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Sat, 18 Apr 2020 20:09:32 +0000 Subject: [PATCH 1/2] Fix wrong template used for invoices sent by email --- cotisations/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cotisations/utils.py b/cotisations/utils.py index facc1197..95672dd4 100644 --- a/cotisations/utils.py +++ b/cotisations/utils.py @@ -73,7 +73,8 @@ def send_mail_invoice(invoice): "tpl_path": os.path.join(settings.BASE_DIR, LOGO_PATH), } - pdf = create_pdf("cotisations/factures.tex", ctx) + template = CotisationsOption.get_cached_value("invoice_template").template.name.split("/")[-1] + pdf = create_pdf(template, ctx) template = get_template("cotisations/email_invoice") ctx = { From adda6ec898a4da9504f275d9cfbc5d314d602db7 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Sat, 18 Apr 2020 20:10:57 +0000 Subject: [PATCH 2/2] Copy default templates during install --- install_re2o.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install_re2o.sh b/install_re2o.sh index 6cc9a2fb..dcc8d971 100755 --- a/install_re2o.sh +++ b/install_re2o.sh @@ -745,6 +745,7 @@ interactive_guide() { install_webserver "$web_serveur" "$is_tls" "$url_server" + copy_templates_files ###########################