From c68aa2f5cf0f4993f0b8996532d2fd3b964d35bf Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Wed, 20 May 2015 09:11:18 +0300 Subject: [PATCH] [FIX] Trade Receivable records was not properly matched --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index d4f7a26a..4c99d3ad 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -39,8 +39,9 @@ class POSOrder(models.Model): grouped_data[key].append(line.id) for key, value in grouped_data.iteritems(): for line in order.account_move.line_id: - if (line.account_id.id == key[1] and - line.partner_id.id == key[0]): + if (line.partner_id.id == key[0] and + line.account_id.id == key[1] and + (line.debit > 0) == key[2]): grouped_data[key].append(line.id) break for key, value in grouped_data.iteritems():