Issue 10596

Title
Add digits mixin
Priority
feature
Status
testing
Nosy list
ced, reviewbot
Assigned to
ced
Keywords
review

Created on 2021-07-21.16:54:18 by ced, last changed 2 days ago by reviewbot.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-07-21.17:04:23

Here is review338511002 which implement the mixin for currency.
Later a second patch will convert quantities with unit.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-07-21.16:54:18

A common pattern is to create Function fields to store the digits to use to display a number. Usually the digits come from a referential record like the currency or the product unit.
To simplify the declaration I propose to allow to use a field name as digits value. In such case the field should point to a Model with a get_digits method (which will be cached) that returns the real tuple to use.
The ModelStorage should be adapted to support such definition but also the clients which should make RPC calls (like for the symbol).

History
Date User Action Args
2021-07-23 10:15:12reviewbotsetmessages: + msg69034
2021-07-21 17:17:34reviewbotsetmessages: + msg68989
nosy: + reviewbot
2021-07-21 17:04:23cedsetmessages: + msg68987
2021-07-21 17:03:35cedsetkeyword: + review
reviews: 338511002
status: in-progress -> testing
2021-07-21 16:54:18cedcreate

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