Created on 2020-05-09.18:18:35 by risto3, last changed 2 days ago by reviewbot.
It is not really a bug but more a feature request to support more term units.
Indeed the current day and month are mainly the same unit with a factor 30 (normalized month).
But it is not really useful and it will be better to have weeks, months and years which are not factor of days.
as indicated in https://discuss.tryton.org/t/how-to-print-balance-by-party-by-account/1976/5, there appears to be a problem with dates at least when using months. The following applied to get_unit_factor() seems to easily fix the issue: @@ -2194,9 +2194,9 @@ class AgedBalance(ModelSQL, ModelView): context = Transaction().context unit = context.get('unit', 'day') if unit == 'month': - return datetime.timedelta(days=30) + return relativedelta(months=1) elif unit == 'day': - return datetime.timedelta(days=1) + return relativedelta(days=1)
|2020-10-22 10:39:57||reviewbot||set||messages: + msg61148|
nosy: + reviewbot
status: in-progress -> testing
|2020-10-22 00:34:08||ced||set||assignedto: ced|
component: + account
messages: + msg61146
nosy: + ced
priority: bug -> feature
status: unread -> in-progress
type: feature request
Showing 10 items. Show all history (warning: this could be VERY long)