pickup: fix _get_config(); must be issued on delivery.carrier model

for/master
Harald Welte 2 years ago
parent b52818b41a
commit 8c01c30a40
  1. 2
      models/shipcloud_pickup.py

@ -32,7 +32,7 @@ class SCPickup(models.Model):
def _shipcloud_api(self):
config = self._get_config()
config = self.env['delivery.carrier']._get_config()
api_key = config['sc_api_key_prod']
sandbox_api_key = None if config['sc_api_use_prod'] else config['sc_api_key_sandbox']
return shipcloud.api(api_key, sandbox_api_key)

Loading…
Cancel
Save