[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
This commit is contained in:
Saurang Suthar 2012-11-01 18:45:42 +05:30
parent b006809773
commit eca2ee0fe2
1 changed files with 1 additions and 1 deletions

View File

@ -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):