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
This commit is contained in:
Mustufa Rangwala 2008-11-13 11:04:32 +05:30
parent 3fe0ee2d96
commit f00cf2f4df
1 changed files with 2 additions and 0 deletions

View File

@ -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 !'))