Adding the customer person information to ODT

I’m creating a Template in ODT for my proposals, it’s very cool and straightforward!

Nevertheless, I’m trying to export the third party user information, think to it in this way: my proposal is a letter which begins with a line which sounds as: “To the attention of: Mr. Doe [person of the customer firm], ecc”

I already read the instruction on the wiki, but it appears that I don’t want to create a new module as the Proposal model is already enough for me. So how should I modify the PHP files (I’m a programmer) in order to add this tag for the template?

1 Like

You will find a basic template in root: htdocs\install\doctemplates\proposals

You can use the tag on {object_options_YOURATTRIBUTE} and your attribute can be updated on the modules page.

For eg: Your Attribute for proposals can be updated in setup-> module->proposals->complementary attributes

Hope this helps.

you also need to just place the tag appropriately on your template so it comes out as desired. I am using the same fopr my proposals.

For you reference I have attached a snapshot of my ODT template.

All the best

Dear Nithin,

i have the same problems with my ODT, I have created a complimentary attributes in Project Module, and i use {object_options_xxx} but dont seem to be working, i tried to move around but in-vain.

Can you help me in this please

Hi all,

I’m having the same problem with the order ODT.

I have two custom fields:

Label Attribute code
Contact Name - Local cust_att_2
Shipping Address - Local cust_att_1

Please would someone help me, what are the explicit tag values I should be using?

Thak you,
Sarkasha

Everyone keeps on telling me to use {object_options_xxx} where xxx is the code of the extra field, but to me it doesnt work with the odt file, it seems like it is not pre-defined somewhere.
Not sure if i have to modify some php codes first for this to work
Please help

Which version of dolibarr are you currently using??

I am using Dolibarr 3.6.0

I’m using the 3.5.4

Me as well, it is unclear though what is the code and where to change it

{object_options_cust_att_2} and {object_options_cust_att_2} would be a way to go for the Customer Order ODT

bibotech could you name your attributes which you created for your project module. I myself am not using that particular module, however I can give it a shot to test if it’s working for me.

@ saraksha, have you found where the template location is? if not here you go

C:\dolibarr\www\dolibarr\htdocs\install

I installed dolibarr in my c drive, change your root directory appropriately.
and you also will have to specify your directory on your customer order module setup page.

@nithin,
Thank you, didn’t work though (I’ve tried it once before)

I think that both our problems (me and bibotech) is because we need to use the extra fields of the “third party” or “company” in another module. In my case it’s the orders. That’s why I believe bibotech is right and we need to init the custom fields in php before we can access them. basically, we are not trying too address the correct object with the {object_options}

@sarkasha and @nithin

what sarkasha says is true, my created attribute is (justif) and i have tried to set {object_options_justif} but did not work.

i think there’s a function or Class to add for this to work

I’ve tried testing this theory by changing the ODT template for Third Perties and adding the {object_options_XXX} tag but with no avail.

It still does not work. Which further supports the theory that the tag needs to be initiated some how.

Hi

Would anyone be so kind as to direct me to the code that odes the initiation to all other attributed to tags of the third party?

Thank you,
sarkasha

OK

I found the solution:

To use the customers additional attributes the label should be : {company_options_xxx}

Works like a charm!

But doesnt work with Project and Proposals right ?

just try it