From befc1d3edaeaba3b39d9b02f6e406b92726eec62 Mon Sep 17 00:00:00 2001 From: "Ferdinand @ Camptocamp" <> Date: Wed, 18 May 2011 16:46:24 +0530 Subject: [PATCH] [FIX] account_move_line._update_check - please include move_id.name in error message lp bug: https://launchpad.net/bugs/772476 fixed bzr revid: ara@tinyerp.com-20110518111624-cwu4622ddx2nlvql --- addons/account/account_move_line.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 83a67df9178..96f62d3dafd 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1198,10 +1198,11 @@ class account_move_line(osv.osv): def _update_check(self, cr, uid, ids, context=None): done = {} for line in self.browse(cr, uid, ids, context=context): + err_msg = _('Move name (id): ') + line.move_id.name +' ('+ str(line.move_id.id) +')' if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted): - raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry ! Please note that you can just change some non important fields !')) + raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry ! Please note that you can just change some non important fields ! \n%s') % err_msg) if line.reconcile_id: - raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry ! Please note that you can just change some non important fields !')) + raise osv.except_osv(_('Error !'), _('You can not do this modification on a reconciled entry ! Please note that you can just change some non important fields ! \n%s') % err_msg) t = (line.journal_id.id, line.period_id.id) if t not in done: self._update_journal_check(cr, uid, line.journal_id.id, line.period_id.id, context)