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):