Line 16:
Line 16:
= Create your new template =
= Create your new template =
−
For security, we will retain the original models. For the example, we assume we creates a new module we call 'mycompanyblue' and inspired by the module 'azur':
+
For security, we will retain the original models. For the example, we assume we creates a new template we call 'mycompanyblue' and inspired by the template 'azur':
* Copy and paste file pdf_propale_azur.modules.php
* Copy and paste file pdf_propale_azur.modules.php
* Rename the copy into pdf_propale_mycompanyblue.modules.php
* Rename the copy into pdf_propale_mycompanyblue.modules.php
Line 22:
Line 22:
# Rename 'Class pdf_propale_azur { ' into 'Class pdf_propale_mycompanyblue { '
# Rename 'Class pdf_propale_azur { ' into 'Class pdf_propale_mycompanyblue { '
# Rename 'Function pdf_propale_azur ($db=0)' into 'Function pdf_propale_mycompanyblue ($db=0)'
# Rename 'Function pdf_propale_azur ($db=0)' into 'Function pdf_propale_mycompanyblue ($db=0)'
−
# For invoices, rename 'crabe' in '$this->name = "crabe";' to change the modelname.
+
# Rename constant $this->name to match your new template name. For example for 'azur' template, change line '$this->name = "azur";' into '$this->name = "mycompanyblue";'.
# Save file. Now template is available in the list of models into Dolibarr
# Save file. Now template is available in the list of models into Dolibarr
# Test this model (see previous section) before going further ...
# Test this model (see previous section) before going further ...