Hello,
I want to use personalized tags with ODT template for the default modules :
- propal (proposal)
- commande (order)
- facture (invoice)
For that, i have followed the tutorial available here
I have created this file :
htdocs/core/substitutions/functions_mymodule.lib.php
with this code :
/** 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 mymodule_completesubstitutionarray(&$substitutionarray,$langs,$object)
{
global $conf,$db;
$myvalue='Put here calculated value to insert';
$substitutionarray['myowntag']=$myvalue;
}
And when i am testing in debug if it’s work, my debugger does’nt stop in the function.
And if am looking in the file :
functions.lib.php
the function :
function complete_substitutions_array(&$substitutionarray,$outputlangs,$object='',$parameters=null,$callfunc="completesubstitutionarray")
with a breakpoint, the array
$conf->modules_parts['substitutions']
still always empty.
If a someone have an idea, this will be greatfull.
I am using dolibarr 3.3.1
Thank’s for your help