Make post function works also for one id

This commit is contained in:
Cédric Krier committed 2008-04-10 11:22:16 +02:00
1 parent 024c9b3ce6
commit b0d497ee5f
1 file changed
+4
+4
View File
@@ -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')