From 937b9575c034cacebc645544f7e2410a2cf0a797 Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Mon, 6 Oct 2014 10:51:55 +0200 Subject: [PATCH] [FIX] account: check for profit/loss accounts in method `button_confirm_cash` of `account.cash.statement` The check was verifying that the profit/loss account was set on the journal, and if it was, it raised that it wasn't, which is obviously wrong. This was solved in Odoo 8.0 by replacing the code by something more readable in 9dc9169, and the same logic to check that the profit/loss accounts are set is still there. Closes #2924 --- addons/account/account_cash_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index bd053b22352..11efed54d08 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -296,7 +296,7 @@ class account_cash_statement(osv.osv): continue for item_label, item_account in TABLES: - if getattr(obj.journal_id, item_account): + if not getattr(obj.journal_id, item_account): raise osv.except_osv(_('Error!'), _('There is no %s Account on the journal %s.') % (item_label, obj.journal_id.name,))