Closed hokolomopo closed 1 month ago
Small functional comment - the "zero" format that we propose for the custom currency formats isn't that good, having the symbol or code adjacent to the dash "-", that is. Could we imagine adding some padding, maybe a simple space or 2 for that case?
Small functional comment - the "zero" format that we propose for the custom currency formats isn't that good, having the symbol or code adjacent to the dash "-", that is. Could we imagine adding some padding, maybe a simple space or 2 for that case?
That's fixed in the follow up task https://www.odoo.com/odoo/2328/tasks/3965246 where I add the *
character support in the format. But I can also put some spaces here, it's free 🤷
yayyy
@robodoo r+ rebase-ff
Merge method set to rebase and fast-forward.
[IMP] format: implement multi-part format
This commits adds the possibility to have a format with multiple parts, as well as improving/fixing the behaviour of currently implemented formats.
The formats are now tokenized and parsed in a more structured way, which allows for more complex formats to be implemented. Some example of things that are now supported are:
[
characters inside of them0[$$]0
would return123$123
instead of12$3
)[IMP] format: handled more complex text format
Also removed the
PLAIN_TEXT_FORMAT
variable. The variable made it looks like the@
was an immutable special case, whereas@
is just a text placeholder that can be used in more complex text formats.[IMP] currency format: add accounting format:
This commits adds the accounting format. This is similar to a currency format, except that negative values are displayed in parentheses and zero is displayed as a dash.
Also changed the model config
defaultCurrencyFormat
todefaultCurrency
, so it can be used for both currency and accounting formats.Task: : 4083126
review checklist