Issue 10730

Title
Add grouping to True when using lang.format on quantities
Priority
feature
Status
resolved
Nosy list
ced, mrichez, pokoli, reviewbot, roundup-bot, tbruyere
Assigned to
mrichez
Keywords
review

Created on 2021-09-09.13:38:04 by mrichez, last changed 1 month ago by roundup-bot.

Messages

New changeset 5a29d600ace2 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/tryton-env/rev/5a29d600ace2
New changeset 9ca2feb6cc84 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/trytond/rev/9ca2feb6cc84
New changeset b7c1fe255cb8 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/stock_lot/rev/b7c1fe255cb8
New changeset 97dd291f26c8 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/stock_assign_manual/rev/97dd291f26c8
New changeset 41637a594568 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/stock/rev/41637a594568
New changeset 948fdc92306b by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/sale_subscription/rev/948fdc92306b
New changeset 8eacfee9f37d by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/sale_shipment_tolerance/rev/8eacfee9f37d
New changeset 47ce4cfdaf98 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/sale_opportunity/rev/47ce4cfdaf98
New changeset 574b39d1bc73 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/sale/rev/574b39d1bc73
New changeset b99e71ba0d8c by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/purchase_requisition/rev/b99e71ba0d8c
New changeset c04eed4937c1 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/purchase_request_quotation/rev/c04eed4937c1
New changeset 106057e5a667 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/purchase_request/rev/106057e5a667
New changeset 030efcb9d8f4 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/purchase/rev/030efcb9d8f4
New changeset e7ca68625a5e by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/product_kit/rev/e7ca68625a5e
New changeset 226b0092a2b8 by Maxime Richez in branch 'default':
Add methods to format number and symbol on Lang
https://hg.tryton.org/modules/account_invoice/rev/226b0092a2b8
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-09-15.07:58:05
On 2021-09-14 22:48, Maxime Richez wrote:
> 
> Maxime Richez <maxime.richez@saluc.com> added the comment:
> 
> > I think we could also have a format_symbol which will place the symbol next to the formatted number at the right position.
> 
> In the same review ?

Most of the replaced strftime calls are for quantity with symbol so I
think it is better to replace them once.
Author: [hidden] (mrichez)
Date: 2021-09-14.22:48:19

I think we could also have a format_symbol which will place the symbol next to the formatted number at the right position.

In the same review ?

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-09-14.22:42:46

I think we could also have a format_symbol which will place the symbol next to the formatted number at the right position.

Author: [hidden] (mrichez)
Date: 2021-09-13.14:43:57

It would be useful. Much clearer with a specific function with default values. I will improve my patch.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-09-13.13:23:08

It will be a good addition if this simplifies the development.
It won't if it makes it more complex.

Do you think it will be usefull?

Author: [hidden] (mrichez)
Date: 2021-09-13.10:17:17

Maybe but who decide to create such function?

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-09-09.14:33:39

I'm wondering if it makes sense to have a format_number function like we have on reports which formats the number.

Author: [hidden] (mrichez)
Date: 2021-09-09.13:38:04

Lang.format has a grouping parameter (with default value: False) which allows to group numbers for better readability. Most of the time this parameter is not set.
It should be set to True when formating quantities for a better readability of large numbers.

History
Date User Action Args
2021-10-04 18:53:38roundup-botsetmessages: + msg70650
2021-10-04 18:53:27roundup-botsetmessages: + msg70649
2021-10-04 18:53:23roundup-botsetmessages: + msg70648
2021-10-04 18:53:18roundup-botsetmessages: + msg70647
2021-10-04 18:53:13roundup-botsetmessages: + msg70646
2021-10-04 18:53:07roundup-botsetmessages: + msg70645
2021-10-04 18:52:58roundup-botsetmessages: + msg70644
2021-10-04 18:52:51roundup-botsetmessages: + msg70643
2021-10-04 18:52:45roundup-botsetmessages: + msg70642
2021-10-04 18:52:35roundup-botsetmessages: + msg70641

Showing 10 items. Show all history (warning: this could be VERY long)