Created on 2020-05-09.18:18:35 by risto3, last changed 2 months ago by roundup-bot.
New changeset b4e352fb1311 by Cédric Krier in branch 'default': Add more term units to aged balance https://hg.tryton.org/tryton-env/rev/b4e352fb1311
New changeset 35a3c18b040d by Cédric Krier in branch 'default': Add more term units to aged balance https://hg.tryton.org/modules/account/rev/35a3c18b040d
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-11-12 22:08:30||roundup-bot||set||messages: + msg61878|
nosy: + roundup-bot
status: testing -> resolved
|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)