summaryrefslogtreecommitdiff
path: root/bin/report/render
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2009-10-08 22:50:28 +0300
committerP. Christeas <p_christ@hol.gr>2009-10-08 22:50:28 +0300
commitffb287777caaa42c2fcaf5b982c117e3c0c8fbe5 (patch)
tree3d18a1e9eeb0dd5ae23bb1f5342f59d4f323569e /bin/report/render
parentafd06e6bf2f2b5be4b0de9b5056ace5c36f134fc (diff)
parent3c28a101b9c353973a7516c710134405ba55baca (diff)
Merge remote branch 'origin/master' into xrg
Conflicts: bin/addons/base/ir/ir_cron.py bzr revid: p_christ@hol.gr-20091008195028-eth801qgzj78zrm1
Diffstat (limited to 'bin/report/render')
-rw-r--r--bin/report/render/rml2pdf/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/report/render/rml2pdf/utils.py b/bin/report/render/rml2pdf/utils.py
index 59724d7d1b4..8e747f5b02a 100644
--- a/bin/report/render/rml2pdf/utils.py
+++ b/bin/report/render/rml2pdf/utils.py
@@ -42,6 +42,7 @@ import reportlab
from lxml import etree
import copy
import tools
+import locale
_regex = re.compile('\[\[(.+?)\]\]')
@@ -133,6 +134,15 @@ units = [
def unit_get(size):
global units
if size:
+ if size.find('.') == -1:
+ decimal_point = '.'
+ try:
+ decimal_point = locale.RADIXCHAR
+ except:
+ decimal_point = locale.localeconv()['decimal_point']
+
+ size = size.replace(decimal_point, '.')
+
for unit in units:
res = unit[0].search(size, 0)
if res: