Ravish(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-1011178-rmu into
lp:openobject-addons.
Requested reviews:
Amit Parik (OpenERP) (amp-openerp)
OpenERP Core Team (openerp)
Related bugs:
Bug #1011178 in OpenERP Addons: "account move line wrong error message"
https://bugs.launchpad.net/openobject-addons/+bug/1011178
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1011178-rmu/+merge/109610
Hello,
I have improved the error message in account move line's _update_journal_check
method .This will raise when you try to create entry for period which is
already closed .
Thanks..!!!
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1011178-rmu/+merge/109610
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-1011178-rmu.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2012-05-22 16:10:55 +0000
+++ account/account_move_line.py 2012-06-11 11:29:22 +0000
@@ -1188,7 +1188,9 @@
result = cr.fetchall()
for (state,) in result:
if state == 'done':
- raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.'))
+ journal = journal_obj.read(cr, uid, journal_id, ['name'])
+ period = period_obj.read(cr, uid, period_id, ['name'])
+ raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period['name'],journal['name'])))
if not result:
journal = journal_obj.browse(cr, uid, journal_id, context=context)
period = period_obj.browse(cr, uid, period_id, context=context)
_______________________________________________
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