pickup: fix _get_config(); must be issued on delivery.carrier model
This commit is contained in:
parent
b52818b41a
commit
8c01c30a40
|
@ -32,7 +32,7 @@ class SCPickup(models.Model):
|
||||||
|
|
||||||
|
|
||||||
def _shipcloud_api(self):
|
def _shipcloud_api(self):
|
||||||
config = self._get_config()
|
config = self.env['delivery.carrier']._get_config()
|
||||||
api_key = config['sc_api_key_prod']
|
api_key = config['sc_api_key_prod']
|
||||||
sandbox_api_key = None if config['sc_api_use_prod'] else config['sc_api_key_sandbox']
|
sandbox_api_key = None if config['sc_api_use_prod'] else config['sc_api_key_sandbox']
|
||||||
return shipcloud.api(api_key, sandbox_api_key)
|
return shipcloud.api(api_key, sandbox_api_key)
|
||||||
|
|
Loading…
Reference in New Issue