diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index 8fe9af39e00..cf7532c058f 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -89,10 +89,10 @@ class account_balance(report_sxw.rml_parse, common_report_header): self.sum_debit += account_rec['debit'] self.sum_credit += account_rec['credit'] if disp_acc == 'bal_movement': - if currency_obj.is_zero(self.cr, self.uid, currency, res['credit']) > 0 or currency_obj.is_zero(self.cr, self.uid, currency, res['debit']) > 0 or currency_obj.is_zero(self.cr, self.uid, currency, res['balance']) != 0: + if (not currency_obj.is_zero(self.cr, self.uid, currency, res['debit'])) or (not currency_obj.is_zero(self.cr, self.uid, currency, res['credit'])) or not (currency_obj.is_zero(self.cr, self.uid, currency, res['balance'])): self.result_acc.append(res) elif disp_acc == 'bal_solde': - if currency_obj.is_zero(self.cr, self.uid, currency, res['debit']) != 0: + if not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']): self.result_acc.append(res) else: self.result_acc.append(res) diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py index 8762b44e1e2..4e918ac0e1b 100644 --- a/addons/account/report/account_balance_sheet.py +++ b/addons/account/report/account_balance_sheet.py @@ -143,10 +143,10 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header) if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_cr += account.balance if data['form']['display_account'] == 'bal_movement': - if currency_pool.is_zero(self.cr, self.uid, currency, account.credit) > 0 or currency_pool.is_zero(self.cr, self.uid, currency, account.debit) > 0 or currency_pool.is_zero(self.cr, self.uid, currency, account.balance) != 0: + if (not currency_pool.is_zero(self.cr, self.uid, currency, account.credit)) or (not currency_pool.is_zero(self.cr, self.uid, currency, account.debit)) or (not currency_pool.is_zero(self.cr, self.uid, currency, account.balance)): accounts_temp.append(account_dict) elif data['form']['display_account'] == 'bal_solde': - if currency_pool.is_zero(self.cr, self.uid, currency, account.balance) != 0: + if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance): accounts_temp.append(account_dict) else: accounts_temp.append(account_dict) diff --git a/addons/account/report/account_profit_loss.py b/addons/account/report/account_profit_loss.py index c17d2e7b23e..06692bf19e9 100644 --- a/addons/account/report/account_profit_loss.py +++ b/addons/account/report/account_profit_loss.py @@ -113,10 +113,10 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header): if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit): self.result_sum_cr += abs(account.debit - account.credit) if data['form']['display_account'] == 'bal_movement': - if currency_pool.is_zero(self.cr, self.uid, currency, account.credit) > 0 or currency_pool.is_zero(self.cr, self.uid, currency, account.debit) > 0 or currency_pool.is_zero(self.cr, self.uid, currency, account.balance) != 0: + if (not currency_pool.is_zero(self.cr, self.uid, currency, account.credit)) or (not currency_pool.is_zero(self.cr, self.uid, currency, account.debit)) or (not currency_pool.is_zero(self.cr, self.uid, currency, account.balance)): accounts_temp.append(account) elif data['form']['display_account'] == 'bal_solde': - if currency_pool.is_zero(self.cr, self.uid, currency, account.balance) != 0: + if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance): accounts_temp.append(account) else: accounts_temp.append(account)