From f00cf2f4df72f99091919f778b0834c4fef6f866 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 13 Nov 2008 11:04:32 +0530 Subject: [PATCH] bug fix: when move line is already reconciled and we try to reconciled it again gave error : AssertionError: Wrong ID for the browse record, got False, expected an integer bzr revid: mra@tinyerp.com-20081113053432-ja1bscyl43n2rc7w --- addons/account/account_move_line.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 2b0a8aee54d..f1a1050cf81 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -492,6 +492,8 @@ class account_move_line(osv.osv): #TODO: move this check to a constraint in the account_move_reconcile object if len(r) != 1: raise osv.except_osv(_('Error'), _('Entries are not of the same account or already reconciled ! ')) + if not unrec_lines: + raise osv.except_osv(_('Error'), _('Entry is already reconciled')) account = self.pool.get('account.account').browse(cr, uid, account_id, context=context) if not account.reconcile: raise osv.except_osv(_('Error'), _('The account is not defined to be reconcile !'))