From 277da7d3a23efeab4a0e7be80823f40a2315b6fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 12 Jun 2008 09:20:55 +0200 Subject: [PATCH] Don't set move field from line if there are empty for issue51 --- move.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/move.py b/move.py index a9f08350d7..7e4bbae7aa 100644 --- a/move.py +++ b/move.py @@ -773,6 +773,8 @@ class Line(OSV): name = 'state' if name not in ('period', 'journal', 'date', 'state'): raise Exception('Invalid name') + if not value: + return move_obj = self.pool.get('account.move') line = self.browse(cursor, user, id, context=context) move_obj.write(cursor, user, line.move.id, {