From 44221b8ffc1ecdb3756a3215f3f2dbccd07de8f6 Mon Sep 17 00:00:00 2001 From: ?ngel ?lvarez Date: Sat, 2 Feb 2019 07:38:17 +0100 Subject: [PATCH] fix _credit function --- invoice.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/invoice.py b/invoice.py index ce6a303..e8438e6 100644 --- a/invoice.py +++ b/invoice.py @@ -197,10 +197,10 @@ class Invoice: return invoice def _credit(self): - res = super(Invoice, self)._credit() + credit = super(Invoice, self)._credit() if self.target_company: - res['target_company'] = self.target_company.id - return res + credit.target_company = self.target_company.id + return credit class InvoiceLine: @@ -304,6 +304,6 @@ class InvoiceLine: return line def _credit(self): - res = super(InvoiceLine, self)._credit() - res['intercompany_account'] = self.intercompany_account - return res + credit = super(InvoiceLine, self)._credit() + credit.intercompany_account = self.intercompany_account + return credit