[MERGE] fix better error handling for move.line constraint on view accounts

bzr revid: fp@tinyerp.com-20121113075131-wl4i5t3nb280hv4m
This commit is contained in:
Fabien Pinckaers 2012-11-13 08:51:31 +01:00
commit 72998137dd
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):