Rifakat (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/7.0-opw-584196-rha into lp:openobject-addons/7.0.
Requested reviews: Naresh(OpenERP) (nch-openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-584196-rha/+merge/144662 Hello, This fix does not let any 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 journal entry. Thanks for your review and feedback. Regards, Rifakat Haradwala -- https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-584196-rha/+merge/144662 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/7.0-opw-584196-rha.
=== modified file 'account/account.py' --- account/account.py 2013-01-07 13:55:07 +0000 +++ account/account.py 2013-01-24 09:46:26 +0000 @@ -1026,6 +1026,9 @@ def action_draft(self, cr, uid, ids, *args): mode = 'draft' + for period in self.browse(cr, uid, ids): + 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 in %s', (mode, tuple(ids),)) cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),)) 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