Ok, in Wiki it says I can use {line_product_label} but doesn’t work.
Also in file htdocs/includes/modules/facture/doc/doc_generic_invoice_odt.modules.php I see function get_substitutionarray_lines that generates the tags.
“line_product_label” is not in there.
I added it but doesn’t work either.
So far I tried:
line_product_label=>$line->product_label
line_product_label=>$line->label
line_product_label=>$line->product_libelle
line_product_label=>$line->libelle
You can’t do that with Dolibarr below 3.3 (the current experimental branch), because the yourmodule_completesubstitutionarray() function can only work on non-line substitutions.
For product lines, you must have Dolibarr >= 3.3 and use the following substitution function: yourmodule_completesubstitutionarray_lines(&$substitutionarray,$outputlangs,$object,$line)
This one will be called for each product/service and will provide you with the $line object.
This is a functionality that I implemented by myself, so I know it works because I thoroughly tested it