dolibarr-bugtrack
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-bugtrack] [Bug #1856] ODT Templates - Templating keys are not


From: Doliforge
Subject: [Dolibarr-bugtrack] [Bug #1856] ODT Templates - Templating keys are not always recognized
Date: Sat, 07 Mar 2015 13:10:00 +0100

Doliforge
Is this email not displaying correctly?
update email preferences.

ODT Templates - Templating keys are not always recognized

Latest modifications

2015-03-07 13:10 (Europe/Madrid)
The bug has been corrected. Pull request send inside GIT sources
(http://www.github.com/Dolibarr/dolibarr) and waiting to merge
into develop branch.
Changes:
  • Summary: 
-ODT Templates - total amounts format mismatch 
+ODT Templates - Templating keys are not always recognized 
  • Resolution: 
NoneFixed

Answer now

Snapshot

 Details
Last Modified On:  2015-03-07 11:54 Submitted by:  Manuel Pintor (m.pintor)
Submitted on:  2015-02-17 18:35 
Summary:  ODT Templates - Templating keys are not always recognized
Description:  Total amounts format is not as expected while unit price is OK.

In lines of documents, Total amount is NNN, unit price is NNN,NN.

Same in the sums underneath the lines.

This has been described in french 8 month ago here : http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50638-modeles-odt-plusieurs-problemes

A solution has also been proposed to devs in the same thread.
Step to reproduce bug:  
Detected in version:  3.6.2 Category:  Other
Severity:  5 - Major OS Type/Version:  
PHP version:   Database type and version:  
 Status
Status:  Open Assigned to:  Marcos García (marcosgdf)
Resolution:  Fixed 

Comments

Marcos García 2015-03-07 13:10
The bug has been corrected. Pull request send inside GIT sources
(http://www.github.com/Dolibarr/dolibarr) and waiting to merge
into develop branch.
Marcos García 2015-03-07 11:54
It seems that LO doesn't always remove the style. I'm currently working on a solution.
Manuel Pintor 2015-03-06 13:34
Thanks. My LibreOffice current version is 4.2.8.2 Build ID: 420m0(Build:2)

There's something I must be missing because when I select for instance {line_price_ht_locale} and clean it using Ctrl M (erase paragraph formatting), I still get no number but the code.

So I just selected the whole text of this template and erased any paragraph formatting as required : I still get code instead of values EXCEPT for the {object_total_ht_locale} which is now properly displayed in the resulting ODT invoice!!!

Then, I rewrote the whole line from scratch : same song!

Then, I deleted _locale from {line_up_locale}, selected the whole page (Ctrl A) and erased paragraph formatting (Ctrl M) : I get correct values for unit prices...

I think I'm going nuts...

What else can I do to remove any remaining paragraph (or whatever) formatting??
Marcos García 2015-03-06 13:04
Hi Manuel,

Yes it seems to be.

"<text:span text:style-name="T12">{</text:span>line_price_ht_locale<text:span text:style-name="T12">}</text:span>"

You can see you have style applied to the "{" and to the "}".

Regards, Marcos.
Manuel Pintor 2015-03-06 12:50
Thanks Marcos for the help you provide here, but paragraph formatting dos not seem to be the point.
I'm just attaching an invoice ODT sample for you or anyone to test it. On my configuration, adding _locale to the tags does not work at all.
Thanks
Marcos García 2015-03-06 12:02
Remember to clean tag format and then apply it again.

This is because when the same text has different formats, LO Writer does: {line_up<text:format....>_locale}</text> which leads to an incorrect tag. You can remove it by selecting the text and click "Erase format" from the Paragraph style menu. Then if you select all the tag, you can apply a format without breaking it.
Manuel Pintor 2015-03-06 11:44
Ola Marcos,

Adding _locale to the end of the tags does not help, here's what I get on the resulting invoice ODT :

My product description | {line_up_locale} | 1 | | {line_price_ht_locale}

instead of :

My product description | 300,00 | 1 | | 300,00

Just as if tags were not interpreted...

Marcos García 2015-03-06 11:30
Hi Manuel:

If you want to have locale format, then add _locale to the end of the tag. This tags are available:

line_fulldesc
line_product_ref
line_product_label
line_desc
line_vatrate
line_up
line_up_locale
line_qty
line_discount_percent
line_price_ht
line_price_ttc
line_price_vat
line_price_ht_locale
line_price_ttc_locale
line_price_vat_locale
line_date_start
line_date_start_rfc
line_date_end
line_date_end_rfc

Regards, Marcos.
Manuel Pintor 2015-03-06 10:28
Let's say a line is defined the following way through 5 colons :
[!-- BEGIN row.lines --]{line_fulldesc} {line_up} {line_qty} {line_discount_percent} {line_price_ht}[!-- END row.lines --]

The result gives for instance :

My product description | 300,00 | 1 | | 300

while I should see :

My product description | 300,00 | 1 | | 300,00

Same for the Totals sum beneath : 300 instead of 300,00
Marcos García 2015-03-06 10:17
Why do you say it does not work as expected? It is working as expected for me.

Can you please describe the bug?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]