Merge lp:~openerp-dev/openobject-client/6.1-opw-575181-rha into lp:openobject-client/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-client/6.1-opw-575181-rha
Merge into: lp:openobject-client/6.1
Diff against target: 15 lines (+0/-5)
1 file modified
bin/tools/ (+0/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.1-opw-575181-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Information
Review via email:

Description of the change


When we have a language configured with thousand separator as white space then GTK
client should take care of the thousand separator as ' '.

Float values are correctly displayed whith white space in web client, but gtk doesn't.

Thanks for your review.

Rifakat Haradwala

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :


The patch want fix anything because the default values for the separator, decimal point will be taken from the locale of the system if the language does not provide a one. so you want be able to have space there. something like :

>>> from locale import localeconv
>>> localeconv()
{'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []}

If we want to allow white space as a thousand separator then we need to check that prior to assigning the default format values.

could please check this.


review: Needs Information

Unmerged revisions

2064. By Rifakat Husen (OpenERP)

[FIX] tools: removed the code which was removing white space from the floeat values

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/tools/'
--- bin/tools/ 2011-11-22 09:03:26 +0000
+++ bin/tools/ 2012-05-30 07:26:18 +0000
@@ -186,11 +186,6 @@
186 parts[0], seps = group(parts[0], monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)186 parts[0], seps = group(parts[0], monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)
188 formatted = decimal_point.join(parts)188 formatted = decimal_point.join(parts)
189 while seps:
190 sp = formatted.find(' ')
191 if sp == -1: break
192 formatted = formatted[:sp] + formatted[sp+1:]
193 seps -= 1
194 elif percent[-1] in 'diu':189 elif percent[-1] in 'diu':
195 if grouping:190 if grouping:
196 formatted = group(formatted, monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)[0]191 formatted = group(formatted, monetary=monetary, grouping=lang_grouping, thousands_sep=thousands_sep)[0]


People subscribed via source and target branches