From e7f20ff1f1f321410822bd1107625c0df165e188 Mon Sep 17 00:00:00 2001 From: Kevin Kempf Date: Thu, 1 Sep 2022 16:33:39 +0000 Subject: [PATCH] =?UTF-8?q?fix=20error.=20add=20url=20f=C3=BCr=20invocloud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ebill_paynet/models/account_invoice.py | 2 +- ebill_paynet/models/paynet_service.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ebill_paynet/models/account_invoice.py b/ebill_paynet/models/account_invoice.py index 8d0e19a..616a91b 100644 --- a/ebill_paynet/models/account_invoice.py +++ b/ebill_paynet/models/account_invoice.py @@ -25,7 +25,7 @@ class AccountInvoice(models.Model): if self.transmit_method_id == paynet_method: contract = self.partner_id.get_active_contract(self.transmit_method_id) if contract: - self.invoice_partner_bank_id = ( + self.partner_bank_id = ( contract.paynet_service_id.partner_bank_id ) diff --git a/ebill_paynet/models/paynet_service.py b/ebill_paynet/models/paynet_service.py index bfffaf7..ad2e358 100644 --- a/ebill_paynet/models/paynet_service.py +++ b/ebill_paynet/models/paynet_service.py @@ -62,6 +62,12 @@ class PaynetService(models.Model): help="There are some specific diference between provider", ) + @api.onchange('service_provider') + def _onchange_fill_provider_url(self): + if self.service_provider == 'invocloud': + self.url = 'https://api.invohub.ch/dws' + else: + self.url = 'https://dws.paynet.ch/DWS/DWS' @api.depends("use_test_service") def _compute_url(self):