Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into develop
This commit is contained in:
@@ -161,7 +161,9 @@ class JdEclp(models.Model):
|
|||||||
url2 = config['bfm_url'] + '/api/get/jd/no'
|
url2 = config['bfm_url'] + '/api/get/jd/no'
|
||||||
response = requests.post(url2, json=json2, data=None)
|
response = requests.post(url2, json=json2, data=None)
|
||||||
# _logger.info('调用成功2', response.json()['result']['wbNo'])
|
# _logger.info('调用成功2', response.json()['result']['wbNo'])
|
||||||
self.carrier_tracking_ref = response.json()['result']['wbNo']
|
self.carrier_tracking_ref = response.json()['result'].get('wbNo')
|
||||||
|
if not self.carrier_tracking_ref:
|
||||||
|
raise ValidationError('物流下单未成功,请联系管理员')
|
||||||
self.is_bill = True
|
self.is_bill = True
|
||||||
self.logistics_status = '1'
|
self.logistics_status = '1'
|
||||||
|
|
||||||
@@ -173,8 +175,10 @@ class JdEclp(models.Model):
|
|||||||
'type': 'success',
|
'type': 'success',
|
||||||
'message': '物流下单成功',
|
'message': '物流下单成功',
|
||||||
'sticky': False,
|
'sticky': False,
|
||||||
|
'next': {'type': 'ir.actions.client', 'tag': 'soft_reload'}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return notification
|
return notification
|
||||||
|
|
||||||
def get_bill(self):
|
def get_bill(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user