From b42f8f310d896e52cd89b8ed0e2bd0b55d55be6f Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Wed, 20 Oct 2010 19:13:32 +0530 Subject: [PATCH] [FIX] Account : Correction on closing fiscalyear:journal should be centralizaed and the boolean of skip draft state should be False bzr revid: jvo@tinyerp.com-20101020134332-tzd7uf13nk4vigom --- addons/account/wizard/account_fiscalyear_close.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index 2f793b77d67..4ab6201b507 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -79,9 +79,9 @@ class account_fiscalyear_close(osv.osv_memory): if not new_journal.default_credit_account_id or not new_journal.default_debit_account_id: raise osv.except_osv(_('UserError'), _('The journal must have default credit and debit account')) - if not new_journal.centralisation: + if (not new_journal.centralisation) or new_journal.entry_posted: raise osv.except_osv(_('UserError'), - _('The journal must have centralised counterpart')) + _('The journal must have centralised counterpart without the Skipping draft state option checked!')) move_ids = obj_acc_move_line.search(cr, uid, [ ('journal_id', '=', new_journal.id), ('period_id.fiscalyear_id', '=', new_fyear.id)])