Hello,
in the module & application builder I created a new module. Then in the descriptor file I edited the module_parts array to set substitutions to 1. I created the folder hierarchy
/usr/share/dolibarr/htdocs/custom/imrotec/core/substitutions
and in there created a file with name functions_imrotec.lib.php and copied the content that the wiki article has:
/** Function called to complete substitution array (before generating on ODT, or a personalized email)
* functions xxx_completesubstitutionarray are called by make_substitutions() if file
* is inside directory htdocs/core/substitutions
*
* @param array $substitutionarray Array with substitution key=>val
* @param Translate $langs Output langs
* @param Object $object Object to use to get values
* @return void The entry parameter $substitutionarray is modified
*/
function imrotec_completesubstitutionarray(&$substitutionarray,$langs,$object)
{
global $conf,$db;
$myvalue='Put here calculated value to insert';
$substitutionarray['myowntag']=$myvalue;
}
Now the module is activated but when I generate my ODT the tag “myowntag” is not being replaced. Any idea why ? Is this maybe outdated?