产品加工进度反馈给销售订单

This commit is contained in:
mgw
2024-02-27 15:47:16 +08:00
parent fdddf19d13
commit 391dedc7b1
2 changed files with 18 additions and 0 deletions

View File

@@ -143,3 +143,18 @@ class jdElcp(http.Controller):
aa.bill_url = kw['bill']
logging.info('get_jd_bill================:%s' %
aa.bill_url)
@http.route('/api/update/order/status', type='http', auth='none', methods=['GET', 'POST'], csrf=False,
cors="*")
def update_order_status(self, **kw):
"""
根据拿到的商家单号,修改订单状态
"""
logging.info('change_sale_order_state================:%s', kw)
if not kw.get('orderNo'):
return json.dumps({'statusCode': 415, 'statusMessage': '订单号不能为空'}, ensure_ascii=False)
aa = request.env['sale.order'].sudo().search([('name', '=', kw['orderNo'])])
if aa:
aa.schedule_status = 'received'
return json.dumps({'statusCode': 200, 'statusMessage': '修改成功'}, ensure_ascii=False)