Saurang Suthar(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1067665-ssu into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1067665 in OpenERP Web: "[trunk] 7.0 Wish Journal Entry - Field Account 
show view type accounts"
  https://bugs.launchpad.net/openerp-web/+bug/1067665

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1067665-ssu/+merge/132548

Hello,

I have fixed the issue of raising traceback instead of proper constraint while 
selecting account of view type during creation of  Journal Entry.

Kindly review it.

Thank you.
Saurang Suthar 

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1067665-ssu/+merge/132548
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1067665-ssu.
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py	2012-10-24 20:14:24 +0000
+++ account/account_move_line.py	2012-11-01 13:28:22 +0000
@@ -582,7 +582,7 @@
         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):

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to