From: Ila Rana Date: Mon, 10 Oct 2011 08:50:07 +0000 (+0530) Subject: [FIX]:Journal Entries is posted without movelines-case(18038) X-Git-Tag: 6.0.4-server~205^2 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=5f3619d3e7f2f648eb2f06e7b183883855ea0a75;p=odoo%2Fodoo.git [FIX]:Journal Entries is posted without movelines-case(18038) bzr revid: ira@tinyerp.com-20111010085007-8vo4hjbr2j2dvy5o --- diff --git a/addons/account/account.py b/addons/account/account.py index 32e8fb9..18605e2 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1419,8 +1419,11 @@ class account_move(osv.osv): 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)