Skip to content

Commit

Permalink
[FIX] account: check for profit/loss accounts
Browse files Browse the repository at this point in the history
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 odoo#2924
  • Loading branch information
Thomas Rehn authored and beledouxdenis committed Aug 13, 2015
1 parent 85b2e60 commit 937b957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/account_cash_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def button_confirm_cash(self, cr, uid, ids, context=None):
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,))

Expand Down

0 comments on commit 937b957

Please sign in to comment.