Own tag and issue with substitutions for ODT template

Hi there,

I would like to enable the substitutions function to have my own tags, for my module, and unfortunatly it does not work.

I did follow the how to: https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template#Other_personalized_tags

And I read the various posts on this topic (which seems to be a reccurring issue to make it working right!) but for completion:

  • I have my own function in the /custom/mymodule/core/substitutions/functions_mymodule.lib.php
    the function name is “function mymodule_completesubstitutionarray (…) { … }”

  • mod.class.php does have the entry ‘substitutions’ => 1,

  • entry in DB in llx_const exists as main_module__substitutions with value 1

  • tags is {bpBirthDate} and has been set properly in the ODT template (for info the other standard “tags” work well)

  • the main object for generating the ODT doc is the 3rd parties (societe in French) -> no specific customizing whatsoever exists, “on the shelf object” from the V11.

Any help would be appreciated.

Thanks and best regards
Gwilhom

I found a workaround which I am not satisfied with…but at least I can follow-up…which is :

-> create a computed field with a PHP code
-> add this computed field as _options_XXX in the ODT template

=> however if somebody can provide help on the original question it would be greatly appreciated.
Thanks a lot.