changeset 0ab649829988 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=0ab649829988
description:
        Add missing alias on migration query of Deferrals

        issue11072
        review360881005
diffstat:

 account.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 3bb05ae28b9d -r 0ab649829988 account.py
--- a/account.py        Fri Feb 04 15:39:41 2022 +0100
+++ b/account.py        Thu Feb 10 13:35:19 2022 +0100
@@ -1652,7 +1652,8 @@
                 .join(move, condition=move_line.move == move.id)
                 .join(period, condition=move.period == period.id)
                 .select(
-                    move_line.account, period.fiscalyear, Count(Literal('*')),
+                    move_line.account, period.fiscalyear,
+                    Count(Literal('*')).as_('line_count'),
                     group_by=[move_line.account, period.fiscalyear]))
             cursor.execute(*deferral.update(
                     [deferral.line_count], [counting_query.line_count],

Reply via email to