Skip to content

Commit 21a6de0

Browse files
committed
[OU] account: Improve amount_total_in_currency_query
1 parent 8a3789e commit 21a6de0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

openupgrade_scripts/scripts/account/15.0.1.2/pre-migration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,9 @@ def _fast_fill_account_move_amount_total_in_currency_signed(env):
150150
CASE
151151
WHEN move_type = 'entry'
152152
THEN ABS(amount_total)
153-
WHEN move_type IN ('in_invoice', 'out_refund', 'in_receipt')
154-
THEN -amount_total
155-
ELSE amount_total
156-
END""",
153+
ELSE -amount_total
154+
END
155+
WHERE move_type in ('in_invoice', 'out_refund', 'in_receipt', 'entry')""",
157156
)
158157

159158

0 commit comments

Comments
 (0)