From 6129520931c6a7414f2d437c4b273c1612a92e10 Mon Sep 17 00:00:00 2001 From: Guillem Barba Date: Thu, 30 Jun 2016 16:42:10 +0200 Subject: [PATCH] Don't put the processing account to statement move line if account is filled --- statement.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/statement.py b/statement.py index 2c7ff62..76f6b8c 100644 --- a/statement.py +++ b/statement.py @@ -35,7 +35,8 @@ class StatementMoveLine: methods=['invoice']) def on_change_payment(self): changes = super(StatementMoveLine, self).on_change_payment() - if self.payment and not self.invoice and self.payment.processing_move: + if (self.payment and not self.invoice and self.payment.processing_move + and not self.account): for line in self.payment.processing_move.lines: if line.account != self.payment.line.account: changes['account'] = line.account.id