33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
import json
|
|
import logging
|
|
from datetime import date, timedelta
|
|
from odoo import http
|
|
from odoo.http import request
|
|
from odoo.addons.mrs_gateway_api.models.common import Common
|
|
from odoo.addons.mrs_gateway_api.models.basicdata_str import BasicDataStr
|
|
|
|
|
|
class Sf_Bf_Connect(http.Controller):
|
|
|
|
@http.route('/api/bfm_process_order/list', type='json', auth='none', methods=['GET', 'POST'], csrf=False,
|
|
cors="*")
|
|
def get_bfm_process_order_list(self, **kw):
|
|
"""
|
|
获取业务平台传送来的业务平台订单
|
|
:param kw:
|
|
:return:
|
|
"""
|
|
result = json.loads('bfm_process_order_list')
|
|
for item in result:
|
|
self.env['mrs.production.process'].create({
|
|
"id": item['id'],
|
|
"model_file": item['model_file'],
|
|
"model_name": item['model_name'],
|
|
"type": item['type'],
|
|
"surface_technics": item['surface_technics'],
|
|
"unit_price": item['unit_price'],
|
|
"amount": item['amount'],
|
|
"money": item['money']
|
|
})
|