[FIX] Improve in message of method update_journal_check in acount_move_line

lp bug: https://launchpad.net/bugs/1011178 fixed

bzr revid: rmu@tinyerp.com-20120611063352-agnsyq9l50fp883x
This commit is contained in:
Ferdinand @ Camptocamp 2012-06-11 12:03:52 +05:30 committed by Ravish Murari (OpenERP)
parent c95b6d26ab
commit 1a48187c3b
1 changed files with 3 additions and 1 deletions

View File

@ -1188,7 +1188,9 @@ class account_move_line(osv.osv):
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)