From d6751e5b6ae9cfdcc9ce46ec89106c5d27281ca2 Mon Sep 17 00:00:00 2001 From: "Yenthe V.G" Date: Thu, 22 Jun 2017 16:26:42 +0200 Subject: [PATCH] [FIX] account trial balance: correctly selecting accounts with movements(#17562) --- addons/account/report/account_balance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index 4422ddd5db342..96b8fb6adb509 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -50,7 +50,9 @@ def _get_accounts(self, accounts, display_account): res['balance'] = account_result[account.id].get('balance') if display_account == 'all': account_res.append(res) - if display_account in ['movement', 'not_zero'] and not currency.is_zero(res['balance']): + if display_account == 'not_zero' and not currency.is_zero(res['balance']): + account_res.append(res) + if display_account == 'movement' and (not currency.is_zero(res['debit']) or not currency.is_zero(res['credit'])): account_res.append(res) return account_res