Hardik Ansodariya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-573839-han 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-573839-han/+merge/102446
Hello,
Fixed the issue of allowing cancellation of journal entries of closed periods.
Thanks
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-573839-han/+merge/102446
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-573839-han.
=== modified file 'account/account.py'
--- account/account.py 2012-03-22 12:24:19 +0000
+++ account/account.py 2012-04-18 07:16:19 +0000
@@ -1351,7 +1351,9 @@
def button_cancel(self, cr, uid, ids, context=None):
for line in self.browse(cr, uid, ids, context=context):
- if not line.journal_id.update_posted:
+ if line.period_id.state == 'done':
+ raise osv.except_osv(_('Error !'), _('You can not modify a posted entry of closed periods'))
+ elif not line.journal_id.update_posted:
raise osv.except_osv(_('Error !'), _('You can not modify a posted entry of this journal !\nYou should set the journal to allow cancelling entries if you want to do that.'))
if ids:
cr.execute('UPDATE account_move '\
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp