pdf template name doesn't change

Hi All,

I’ve made changes in pdf_einstein.modules.php and saved it as a new template with the name pdf_ordertotalonly.modules.php
To do this I used this guide: http://wiki.dolibarr.org/index.php/Create_a_PDF_document_template

Everything works fine and the new template shows up in the module setup.

However if I create a new order for a customer and want to generate a PDF the model is still named “einstein”.
I have even tried to replace every word “einstein” with “ordertotalonly” in pdf_ordertotalonly.modules.php. But no succes.

I must be doing something wrong and hope somebody here has an answer.

You probably miss one string. did you check using a non case sensitive search ?

Hi Eldy,

Yes, tried that to. Didn’t work. It took a re-install of Dolibarr for the right name to show up. Maybe you could look into that?

What I need is an order and invoice template with only the columns description and Qty and at the bottom the total price.

I do not have any knowledge about php. I just opened the file in Notepad++ and read it very carefully. That way I (sort of) found out what part of the code to delete but I have no idea if I did it the right way.

Is it possible to use ODT templates for orders? If not, would you mind helping me a bit with the PDF template?

Many thanks.

I tried this yesterday in Dolibarr v3.1.1 and it worked exactly as written in the guide. There was only one more string with the old name in the file:

$this->name = "crabe";

Therefore, I just started my active Dolibarr-career and made an edit to the manual :happy:

> For invoices, rename ‘crabe’ in ‘$this->name = “crabe”;’ to change the modelname. <

If this didn’t work for you (as you described), what version are you using?

Also, I would appreciate if an experienced user would be so kind to check my modification.

You’re right, this step was missing into documentation. Thanks for fixing this into documentation.

Dear Friends,

Dolibar is AWESOME and I think this FREEWARE-OPENSOURCE ERP must be considered one of the best, simple and versatile ERP developed ever.

At this time I’m trying to create an Einstein alternative model for my business invoice but…

As JURRY said before:
“I’ve made changes in pdf_einstein.modules.php and saved it as a new template with the name pdf_ordertotalonly.modules.php
To do this I used this guide: wiki.dolibarr.org/index.php/Create_a_PDF_document_template

and… “Everything works fine and the new template shows up in the module setup.”

But in my case, it does not shows up in the module setup. I can’t see any change in Dolibarr. What I’m doing wrong?

I will appreciate any help.
My Dolibar version is 3.2.0 (It didn’t work with 3.1.0)