From dd18c5f421368d55476077a918fc8d186cd87a5f Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 6 Jun 2016 11:21:52 +0200 Subject: [PATCH] Don't group payment lines that use structured communication --- account_payment_order/models/account_payment_line.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_payment_order/models/account_payment_line.py b/account_payment_order/models/account_payment_line.py index 1460a2da9..2ac4fbfac 100644 --- a/account_payment_order/models/account_payment_line.py +++ b/account_payment_order/models/account_payment_line.py @@ -89,8 +89,11 @@ class AccountPaymentLine(models.Model): # Don't group the payment lines that are attached to the same supplier # but to move lines with different accounts (very unlikely), # for easier generation/comprehension of the transfer move - # TODO Alexis : but this is for ???? values.append(unicode(self.move_line_id.account_id or False)) + # Don't group the payment lines that use a structured communication + # otherwise it would break the structured communication system ! + if self.communication_type != 'normal': + values.append(unicode(self.id)) hashcode = '-'.join(values) return hashcode