From eca2ee0fe276856b96b61a2f97efdc4d81be7b0f Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Thu, 1 Nov 2012 18:45:42 +0530 Subject: [PATCH] [FIX]account:fixed the issue of traceback instead of constraint while selecting account of view type during journal entry creation bzr revid: ssu@tinyerp.com-20121101131542-3mit3a2qok17q7uz --- addons/account/account_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 67a55d8f451..4f38b7dfe3d 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -582,7 +582,7 @@ class account_move_line(osv.osv): lines = self.browse(cr, uid, ids, context=context) for l in lines: if l.account_id.type == 'view': - raise osv.except_osv(_('Error!'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) + return False return True def _check_no_closed(self, cr, uid, ids, context=None):