Formatting Plomino column #519

Open
lucamancini opened this Issue Jan 9, 2014 · 3 comments

Projects

None yet

2 participants

Hello everybody.
Displaying a column sum of float values (.2f) which are currency fields, all my views show the total with more than 2 decimals (see below).

view

Moreover, as you can see above, some of the fields have only one zero instead of two. Last but not least it could be convenient to show "." as group separator and "," as decimal separator.
Could you help me?

Luca

Owner

Hello,

Unfortunately, if you use the dynamic rendering, the sums are computed in javascript so the Python decimal formatting is not applied.
It could be improved by changing this:
https://github.com/plomino/Plomino/blob/github-main/Products/CMFPlomino/browser/javascript/plomino.dynamicview.js#L116

Ok. And what about the question on group and decimal separator?
I would like to allow users to input . as group separator and , as decimal.

@lucamancini lucamancini reopened this Jan 10, 2014
Owner

As far as I remember, that's not possible with Python 2.7 number formatting.
So the best approach is to create computed string field where you enter a formula able to produce the format you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment