From b0d497ee5f912bb9eea74997fa9a5aad87a7859e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 10 Apr 2008 11:22:16 +0200 Subject: [PATCH] Make post function works also for one id --- move.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/move.py b/move.py index 82c1edc0bd..1730c9ce10 100644 --- a/move.py +++ b/move.py @@ -220,6 +220,10 @@ class Move(OSV): def post(self, cursor, user, ids, context=None): currency_obj = self.pool.get('account.currency') sequence_obj = self.pool.get('ir.sequence') + + if isinstance(ids, (int, long)): + ids = [ids] + moves = self.browse(cursor, user, ids, context=context) for move in moves: amount = Decimal('0.0')