增加bfm回调接口
This commit is contained in:
@@ -119,3 +119,30 @@ class Sf_Bf_Connect(http.Controller):
|
||||
res['status'] = -1
|
||||
res['message'] = '工厂创建销售订单和产品失败,请联系管理员'
|
||||
return json.JSONEncoder().encode(res)
|
||||
|
||||
|
||||
class jdElcp(http.Controller):
|
||||
|
||||
@http.route('/api/jd_create/order', type='http', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||
cors="*")
|
||||
def get_jd_order(self, **kw):
|
||||
"""
|
||||
回调函数:拿到京东返回的下单数据
|
||||
"""
|
||||
logging.info('get_jd_bill================:%s', kw)
|
||||
aa = request.env['stock.picking'].sudo().search([('origin', '=', kw['orderNo'])])
|
||||
aa.carrier_tracking_ref = kw['wbNo']
|
||||
logging.info('get_jd_order================:%s' %
|
||||
aa.carrier_tracking_ref)
|
||||
|
||||
@http.route('/api/jd_create/bill', type='http', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||
cors="*")
|
||||
def get_jd_bill(self, **kw):
|
||||
"""
|
||||
回调函数:拿到京东返回的快递面单
|
||||
"""
|
||||
logging.info('get_jd_bill================:%s', kw)
|
||||
aa = request.env['stock.picking'].sudo().search([('origin', '=', kw['orderNo'])])
|
||||
aa.bill_url = kw['bill']
|
||||
logging.info('get_jd_bill================:%s' %
|
||||
aa.bill_url)
|
||||
|
||||
Reference in New Issue
Block a user