From 45f41162313af9095d35167e2c34f95b86462bcf Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Fri, 7 Jun 2019 12:16:05 +0200 Subject: [PATCH] Replace old_lines to self.lines to append new lines --- invoice.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index 975e2ec..ad1df8a 100644 --- a/invoice.py +++ b/invoice.py @@ -178,7 +178,6 @@ class Invoice(metaclass=PoolMeta): isinstance(field, fields.Function)): continue values[name] = getattr(self, name) - old_lines = self.lines if not self.target_company.intercompany_user: return @@ -196,7 +195,7 @@ class Invoice(metaclass=PoolMeta): invoice.on_change_party() invoice.account = self.get_intercompany_account() lines = [] - for line in old_lines: + for line in self.lines: lines.append(line.get_intercompany_line()) invoice.lines = lines return invoice