Skip to content
Snippets Groups Projects
Commit 937b9575 authored by Thomas Rehn's avatar Thomas Rehn Committed by Denis Ledoux
Browse files

[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 9dc9169f, and the same
logic to check that the profit/loss accounts are
set is still there.

Closes #2924
parent 85b2e607
Branches
Tags
No related merge requests found
......@@ -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,))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment