Ila Rana(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-18038-ira into 
lp:openobject-addons/6.0.

Requested reviews:
  Raphael Collet (OpenERP) (rco-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18038-ira/+merge/78808

Hello,

The system allows to post and approve journal entry without amount/move_lines,

I have made changes in account_move object's method. So ,one can't post journal 
entries without amount/move_line.

Thanks,
Ila Rana
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-18038-ira/+merge/78808
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-18038-ira.
=== modified file 'account/account.py'
--- account/account.py	2011-09-23 08:34:17 +0000
+++ account/account.py	2011-10-10 09:27:24 +0000
@@ -1419,8 +1419,11 @@
         valid_moves = [] #Maintains a list of moves which can be responsible to create analytic entries
         obj_analytic_line = self.pool.get('account.analytic.line')
         obj_move_line = self.pool.get('account.move.line')
+
         for move in self.browse(cr, uid, ids, context):
             # Unlink old analytic lines on move_lines
+            if not move.line_id:
+                raise osv.except_osv(_('No Move Lines !'), _('Please create some move lines.'))
             for obj_line in move.line_id:
                 for obj in obj_line.analytic_lines:
                     obj_analytic_line.unlink(cr,uid,obj.id)

_______________________________________________
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