Invoice Template - How To?

Hello,
I am trying to create a new .ODT invoice template using Open Office 4.1.1 and Dolibarr 3.6.0. I can open the existing template file (dolibarr/documents/doctemplates/invoices/template_invoice.odt) in Open Office and save it using a different name - and it will work.
It will not work anymore after deleting parts of the document.
If I create a new .ODT document as described in the dolibarr wiki (http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template) entering just a simple tag like {mycompany_name} it will not work returning the messages “facture_pdf_create Error: ‘lines’ segment not found in the document” and " ErrorBadValueForParamNotAString".
What is the ‘lines segment’?
How to create a working .ODT document?
Can someone help, please?
Thanks in advance!
virtilia

Try create new ODT file and be careful the tags must be rounded with {} or [] for arrays (see later) and must be typed with no stop using Office suite (with no backward and no copy-paste). If not doing that, Office suite add some invisible informations making replacement not possible.

Thank you, ndrosis. Thats exactly what I did - I created a new .ODT text file and entered the tag {my company_logo} without deleting any characters or any further typing or cut/copy-paste. I saved the file in the correct location, but when I chose that template file instead of crabe or the provided template_invoice.odt (which both work) an error message screen appears with error messages like “facture_pdf_create Error: ‘lines’ segment not found in the document” and " ErrorBadValueForParamNotAString".
I tried the same using LibreOffice instead of Open Office with no difference, so it is apparently not an issue caused by a wrong Office version.
If the tag wasn’t surrounded by “{}” wouldn’t Dolibarr just ignore the tag and not replace it by content instead of crashing with those error messages?

You have inserted the Lines of object?

Yes, to test lines of object I entered in a brand new .ODT document:

[!-- BEGIN lies –]
{line_fulldesc}
{line_up}
{line_qty}
{line_price_ttc}
[!-- END lines –]

When trying to create the invoice I get:

Dolibarr has detected a technical error.
This is information that can help diagnostic:
Date: 20140921164103
Dolibarr: 3.6.0
Level of features: 0
PHP: 5.5.10
Server: Apache

Requested Url: /dolibarr/htdocs/compta/facture.php?facid=3
Referer: https://virtilia.endofinternet.org:8890/dolibarr/htdocs/compta/facture.php?facid=3
Menu manager: eldy_menu.php

Database type manager: mysqli
Request for last database access in error: No request in error
Return code for last database access in error: No request in error
Information for last database access in error: No request in error

Message: facture_pdf_create Error: ‘lines’ segment not found in the document
Dolibarr has detected a technical error.
This is information that can help diagnostic:
Date: 20140921164103
Dolibarr: 3.6.0
Level of features: 0
PHP: 5.5.10
Server: Apache

Requested Url: /dolibarr/htdocs/compta/facture.php?facid=3
Referer: https://virtilia.endofinternet.org:8890/dolibarr/htdocs/compta/facture.php?facid=3
Menu manager: eldy_menu.php

Database type manager: mysqli
Request for last database access in error: No request in error
Return code for last database access in error: No request in error
Information for last database access in error: No request in error

Message: ErrorBadValueForParamNotAString

Try add this
[!-- BEGIN row.lies --]
{line_fulldesc}
{line_up}
{line_qty}
{line_price_ttc}
[!-- END row.lines --]

[!-- BEGIN row.lines --] {line_fulldesc} {line_up} {line_qty} {line_price_ttc} [!-- END row.lines --]

Yes, I did - same error message as before. What makes me wonder is that the error statement names “facture_pdf_create”:
Message: facture_pdf_create Error: ‘lines’ segment not found in the document
Does it mean that the corresponding PHP module for creating a PDF file is called? I wanted to create an .ODT invoice, not a PDF…

An invoice will only be created if “crabe” is selected as pdf template or if the original “template_invoice.odt” is used. Also a copy of “template_invoice.odt” will work, but no other .ODT file that has been exactly created according to the rules (no backspace, no copy-paste etc.). I am desperate.

I had the same error you got there. I was editing the odt invoice template to suite my needs. I was adding a column No. in the table and was expecting to fill in with row number of product/service and left blank for a while. I got the error when push the ‘Generate’ invoice with my template. Remove the column and back to normal.

Anyway, how can I add row number to the table?

Having exact same issues here. [url=www.dolibarr.org/t/something-fishy-in-odt-templates/11536/1 to post[/url]

As this seems to be an issue to more than just us here, it would be nice to crack.

hi,
I am new to Dolibarr and linux OS.
I have just installed ubuntu 14.04 and Dolibarr. I have read other posts on how to customise the invoice and tried to follow the instructions. I am trying to create a new .ODT invoice template using Open Office 4.1.1 and Dolibarr 3.3.4. I can not find the path (dolibarr/documents/doctemplates/invoices/template_invoice.odt) in Open Office.