[SOLVED] {line_options_xxx} in ODT files broke

{object_options_xxx} is working fine for me on Dolibarr 9.0.1

Try testing out by defining a new line options and inserting that field in your ODT. This would at least help in ruling out if the option is working altogether or if there is a bug

Hi,

I have just test on my 9.0.1 and it is working great.

Could you please send a screenshot of the extrafield configuration and the odt file ?

Thanks.

Here are the 9.0.1 screenshots

I added a new extra field in the products.
Doesn’t work either

Pièces jointes :

I see nothing attached…

Second attempt

Hi,

THis is completely normal that it doesn’t work.
You have created your extrafield on product.
And you try to display it as it was a line delivery extrafield

Impossible !

Same template but used in Dolibarr 8.0.4
So where is impossible now!

The extrafield configuration is different, with the screens above it should not work.
You have other extra field configured

Thanks for your help.
But it’s exactly the same template
But in an earlier reply som e one asked to add a new field and use that one in the template to exclude that it was my extra filed configuration.
That’s why there is an extra field called test and I used that one in the template.

Other than that it is the exact same configuration and template

HI,

I finally find some times to analyse your case.

After a review of the code there is a change between V8 and V9 :
V8 : https://github.com/Dolibarr/dolibarr/blob/8.0/htdocs/core/class/commondocgenerator.class.php#L550
V9 : https://github.com/Dolibarr/dolibarr/blob/9.0/htdocs/core/class/commondocgenerator.class.php#L580

So the Product Extra field of a line changed from {line_xxxx} to {line_product_xxxx}

Could you try ?

Hi,

First of all, thanks for helping me out.

I change {line_options_xxx} to {line_product_xxx} where xxx is the name of the attribute code --> no result
Then I change {line_options_xxx} to {line_product_options_xxx} where xxx is the name of the attribute code --> no result

HI,

Just to be sure, you have done it on a V9 ?

Hi,

I have just made the test and I confirm that if you have a product extrafiled defined and that you use the product on a proposal, on the ODT file the {line_product_options_xxxx} is working !

So up to V8 use {line_options_xxxx}
Above V9 use [code]
{line_product_options_xxxx}[/code

I tried it in V9

Just to check. I use my template in the order not in proposal.

I will test it also on propsal but I need it on order.

Hi,

The test I did :
- Create an Extrafield in product.
- fill it for one product
- Use the {line_product_options_xxxx} in Propal ODT
- Create a Propal with the product
- Generate a Propal ODT

It should be the same on Order

I will check.
Again, thanks man!

Could you attach your template.
I will change the attribute name in one of my extra fields.
See i that works

template_proposal.odt (17.3 KB)

Thanks.

I tested proposal and order with the default template.
I had to type the code cause copy/paste won’t work (Libreoffice code?)

All extra fields are filled correctly.

So I have to redo my own template.

Thanks again!

Hey there!

I know this post is a little bit old, but I’m facing the same issue.

the tag {line_product_options_icms} isn’t working for me. I’m using v7.0.2.

I did exactly how KSAR explained on hi comment

The test I did :
- Create an Extrafield in product.
- fill it for one product
- Use the {line_product_options_xxxx} in Propal ODT
- Create a Propal with the product
- Generate a Propal ODT

My attribute code is icms, that’s why i’m using {line_product_options_icms}.

Any suggestion? I tried many different ways and none of them works!

Any help is appreciated.

Pièces jointes :