Code for custom attributes in ODT templates

Hi again all…

my latest issue is with my ODT templates. Templates work fine for regular fields, but cannot get it to use my Complimentary attributes (object or lines). Whenever I use the field name:

{line_options_xxx}
OR
{object_options_xxx}

I get the actual text above printed on the document, it is not pulling anything from the DB. I tried to create both regular attributes and line attributes with no success. Should these field names be different now in 6.0.4 (they were created in 4.x.x)? Since it is actually spitting back the above code it leads me to believe it is no invoking it correctly, or am I mistaken?

We are not using a bunch of attributes (and have moved away from any 3rd party add-on) but need to place our internal Sales Order # on our packing lists.

Help would be greatly appreciated!

Thanks in advance.

Follow @ophion’s information in the link below and make sure to place those lines after the ‘write_file’ line. Don’t forget to make a custom php template or backup the original before testing.

www.dolibarr.org/t/solved-how-to-print-a-new-customfields/15213/2

Hi

The function {line_options_xxx} actually functions with Dolibarr 6.0.5. But the function {object_options_xxx} does not work. I am also trying to sort out.

The difference is, line function is used in recursive printing i.e., between [!-- BEGIN row.lines --]…[!-- END row.lines --], for the variables from complementary attributes (lines). and {object_options_xxx} is for variable from complementary attributes.

Thanks

Thanks for the input. I am heading to Europe for a few days, and will test when I return. The issue is that {line_options_xxx} OR {object_options_xxx} is showing up just as typed, and not returning any info from the DB. The first link/reply below seemed helpful, aside from it referenced the customFields module, and I stopped using that since it was causing errors in other places. But maybe need to adjust wherer the ‘write_file’ line falls in the template.

I will report back next week to let everyone know what the issue was in case someone has similar problems.

Thanks!

Hi All,

In fact I use 6.03 for long time and ODT Tags works ok. Now update to 6.05 and object_options did not work with the templates which we have till now and works well?
How to solve the issue?

Ooops,
I test it again.
The issue is only when object is not validated.
If object is validated - extra fields ODT {object_options_xxx} works ok.
Tested only with Proposals

Hello All,
any suggestions on object_options tags for 6.05 ? How we can fix it?