From 082b3fe53c651f74457a33c0dd13ecb2ded319a5 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 21 May 2015 11:00:07 +0300 Subject: [PATCH] [FIX] Skip empty lines if any - reconcile_partial throws an error when passing empty list --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 3bd12a08..cf1ade22 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -45,6 +45,8 @@ class POSOrder(models.Model): grouped_data[key].append(line.id) break for key, value in grouped_data.iteritems(): + if not value: + continue self.pool.get('account.move.line').reconcile_partial( cr, SUPERUSER_ID, value)