From 8fa26be212f791ea51d86256d6d90f0bbc70bd3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 19 Dec 2014 18:05:41 +0100 Subject: [PATCH] Take into account party_required when clearing move lines issue4225 review11521002 --- payment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/payment.py b/payment.py index 8b257cdce2..57406e1c9b 100644 --- a/payment.py +++ b/payment.py @@ -90,7 +90,8 @@ class Payment: line.amount_second_currency = (-self.line.amount_second_currency if self.line.amount_second_currency else None) line.second_currency = self.line.second_currency - line.party = self.line.party + line.party = (self.line.party + if self.line.account.party_required else None) counterpart = Line() counterpart.debit = self.amount if self.line.debit else Decimal(0) counterpart.credit = self.amount if self.line.credit else Decimal(0)