fix error. add url für invocloud

This commit is contained in:
Kevin Kempf 2022-09-01 16:33:39 +00:00
parent 7daf54fee2
commit e7f20ff1f1
2 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class AccountInvoice(models.Model):
if self.transmit_method_id == paynet_method: if self.transmit_method_id == paynet_method:
contract = self.partner_id.get_active_contract(self.transmit_method_id) contract = self.partner_id.get_active_contract(self.transmit_method_id)
if contract: if contract:
self.invoice_partner_bank_id = ( self.partner_bank_id = (
contract.paynet_service_id.partner_bank_id contract.paynet_service_id.partner_bank_id
) )

View File

@ -62,6 +62,12 @@ class PaynetService(models.Model):
help="There are some specific diference between provider", 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") @api.depends("use_test_service")
def _compute_url(self): def _compute_url(self):