[FIX] account trial balance: correctly selecting accounts with movements(#17562)

This commit is contained in:
Yenthe V.G
2017-06-22 16:26:42 +02:00
committed by qdp-odoo
parent a03fc2d849
commit d6751e5b6a
+3 -1
View File
@@ -50,7 +50,9 @@ class ReportTrialBalance(models.AbstractModel):
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