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):