mirror of
https://github.com/bringout/oca-ocb-technical.git
synced 2026-04-21 02:12:06 +02:00
19.0 vanilla
This commit is contained in:
parent
5faf7397c5
commit
2696f14ed7
721 changed files with 220375 additions and 91221 deletions
|
|
@ -5,7 +5,7 @@ from odoo import models, api
|
|||
from odoo.addons.iap.tools import iap_tools
|
||||
|
||||
|
||||
class IapEnrichAPI(models.AbstractModel):
|
||||
class IapEnrichApi(models.AbstractModel):
|
||||
_name = 'iap.enrich.api'
|
||||
_description = 'IAP Lead Enrichment API'
|
||||
_DEFAULT_ENDPOINT = 'https://iap-services.odoo.com'
|
||||
|
|
@ -14,7 +14,7 @@ class IapEnrichAPI(models.AbstractModel):
|
|||
def _contact_iap(self, local_endpoint, params):
|
||||
account = self.env['iap.account'].get('reveal')
|
||||
dbuuid = self.env['ir.config_parameter'].sudo().get_param('database.uuid')
|
||||
params['account_token'] = account.account_token
|
||||
params['account_token'] = account.sudo().account_token
|
||||
params['dbuuid'] = dbuuid
|
||||
base_url = self.env['ir.config_parameter'].sudo().get_param('enrich.endpoint', self._DEFAULT_ENDPOINT)
|
||||
return iap_tools.iap_jsonrpc(base_url + local_endpoint, params=params, timeout=300)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue