From 4653ee14a4a468f2569a862fd592b44fbed51316 Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Fri, 26 Jun 2020 18:13:18 +0200 Subject: [PATCH] Add invoice date on credit wizard issue8925 --- invoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/invoice.py b/invoice.py index ad1df8a..a528a3c 100644 --- a/invoice.py +++ b/invoice.py @@ -122,10 +122,10 @@ class Invoice(metaclass=PoolMeta): super(Invoice, cls).draft(invoices) @classmethod - def credit(cls, invoices, refund=False): + def credit(cls, invoices, refund=False, **values): pool = Pool() MoveLine = pool.get('account.move.line') - new_invoices = super(Invoice, cls).credit(invoices, refund) + new_invoices = super(Invoice, cls).credit(invoices, refund, **values) if refund: for invoice, new_invoice in zip(invoices, new_invoices): if new_invoice.state == 'paid': @@ -200,8 +200,8 @@ class Invoice(metaclass=PoolMeta): invoice.lines = lines return invoice - def _credit(self): - credit = super(Invoice, self)._credit() + def _credit(self, **values): + credit = super(Invoice, self)._credit(**values) if self.target_company: credit.target_company = self.target_company.id return credit