[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:
parent
b006809773
commit
eca2ee0fe2
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue