[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
This commit is contained in:
Thomas Rehn 2014-10-06 10:51:55 +02:00 committed by Denis Ledoux
parent 85b2e607bf
commit 937b9575c0
1 changed files with 1 additions and 1 deletions

View File

@ -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,))