From 819be734555ed0b87b20406c2bb76000ed05cc4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Dec 2008 19:07:21 +0100 Subject: [PATCH] Improve delete and post move --- statement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/statement.py b/statement.py index a1973ae426..ad8b345513 100644 --- a/statement.py +++ b/statement.py @@ -470,11 +470,12 @@ class Line(OSV): def post_move(self, cursor, user, lines, context=None): move_obj = self.pool.get('account.move') - move_obj.post(cursor, user, [l.move.id for l in lines], context=context) + move_obj.post(cursor, user, [l.move.id for l in lines if l.move], + context=context) def delete_move(self, cursor, user, lines, context=None): move_obj = self.pool.get('account.move') - move_obj.delete(cursor, user, [l.move.id for l in lines], + move_obj.delete(cursor, user, [l.move.id for l in lines if l.move], context=context) def _get_move_lines(self, cursor, user, statement_line, context=None):