Rifakat (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.1-opw-584196-rha into lp:openobject-addons/6.1.
Requested reviews: Naresh(OpenERP) (nch-openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-584196-rha/+merge/144478 Hello, It should not be possible to re-open a closed period while its fiscal year is still closed. Currently it is possible to open a period of a closed fiscal year and able to pose journal entries which is wrong. I put a restriction on re-opening. Thanks for your review. Regards, Rifakat Haradwala -- https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-584196-rha/+merge/144478 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.1-opw-584196-rha.
=== modified file 'account/account.py' --- account/account.py 2012-10-09 09:58:14 +0000 +++ account/account.py 2013-01-23 11:21:21 +0000 @@ -1059,6 +1059,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