Rifakat (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.0-opw-584196-rha into lp:openobject-addons/6.0.
Requested reviews: Naresh(OpenERP) (nch-openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-584196-rha/+merge/144660 Hello, This fix does not let the user re-open fiscal period whose financial year is already closed. We should restrict to re-open a period so that anyone won't be able to post any journal entry. Thanks for your review and feedback. Regards, Rifakat Haradwala -- https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-584196-rha/+merge/144660 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.0-opw-584196-rha.
=== modified file 'account/account.py' --- account/account.py 2012-04-18 06:45:09 +0000 +++ account/account.py 2013-01-24 09:43:31 +0000 @@ -927,6 +927,9 @@ def action_draft(self, cr, uid, ids, *args): mode = 'draft' for id in ids: + period = self.browse(cr, uid, id) + if period.fiscalyear_id.state == 'done': + raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year')) cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id)) cr.execute('update account_period set state=%s where id=%s', (mode, id)) return True
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp