Ajout PDF infos CorpContact

This commit is contained in:
Claude Paroz 2023-07-10 17:22:41 +02:00
parent f6cc953014
commit da46061a5a
4 changed files with 29 additions and 2 deletions

View file

@ -571,6 +571,18 @@ class PrintCompensationForm(PDFBaseView):
return super().get(request, *args, **kwargs)
class PrintExpertInfoForm(PDFBaseView):
pdf_class = pdf.ExpertInfoForm
def get_object(self):
return CorpContact.objects.get(pk=self.kwargs['pk'])
def filename(self, obj):
return slugify(
'{0}_{1}'.format(obj.last_name, obj.first_name)
) + f'_Info.pdf'
class PrintExpertEDSCompensationForm(PrintExpertEDECompensationForm):
"""
Imprime le PDF à envoyer à l'expert EDS en accompagnement du