ODT Template clarification

hello,

Can somebody clarify the functionality of the ODT templates. In the invoicing module I have enabled the DOL_DATA_ROOT/doctemplates/invoices option which contains a file template_invoice.odt.

If I go to the invoice section to generate an invoice I now have the option to use template_invoice.odt to generate the PDF. However when I generate I get a file FA1207-0001_invoice.odt and not a PDF file.

Is this correct? I assumed the example would generate a PDF file with the same format as the template_invoice.odt. Am I misunderstanding something?

Regards
Paul

yes we try to find a solution

Testing updated version 3.2.1 and this problem still occurs. Should I be getting a file template_invoice.pdf or do I need to edit template_invoice.odt to make this work?

Thanks
Paul

models “ODT” only generate ODT documents, we can not make PDF automatically in dolibarr for the moment. In the meantime, you can convert ODT to PDF with “openoffice” or “libreoffice”.

Thanks for clarifying that. I misunderstood the functionality sorry for the confusion.
Regards
Paul

Hi Regis,

As per discussion…, making a PDF with OpenOffice or LibreOffice will not do if you want to sent de invoice by e-mail. Would be nice if it would be converted automatically to PDF. I also have heard that it maybe will be possible in a future release, but for that you guys need to investigate on implementing OO-libraries right?

Kind regards
Edwin

I had a quick look at the possibility of doing this.

To convert odt to html, I found a suggestion to convert to html first and then to pdf.

There is a GIST explaining how to convert to html, which looks easy to me:

And converting from html to pdf should not be too hard either.

I had a similar issue with the invoicing odt and pdf. I have started another thread about changing my php to change the layout of the pdf and it isn’t too difficult to change and make it your own.