中控对接接口优化
This commit is contained in:
@@ -8,7 +8,7 @@ from odoo.http import request
|
||||
|
||||
class Manufacturing_Connect(http.Controller):
|
||||
|
||||
@http.route('/AutoDeviceApi/MaintenanceToolGroups', type='json', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||
@http.route('/AutoDeviceApi/MachineToolGroup', type='json', auth='none', methods=['GET', 'POST'], csrf=False,
|
||||
cors="*")
|
||||
def get_maintenance_tool_groups_Info(self, **kw):
|
||||
"""
|
||||
@@ -20,7 +20,7 @@ class Manufacturing_Connect(http.Controller):
|
||||
try:
|
||||
datas = request.httprequest.data
|
||||
ret = json.loads(datas)
|
||||
ret = json.loads(ret['result'])
|
||||
# ret = json.loads(ret['result'])
|
||||
logging.info('DeviceId:%s' % ret)
|
||||
tool_groups = request.env['sf.tool.groups'].sudo().search([])
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ class ToolGroups(models.Model):
|
||||
|
||||
# ==========机床刀具组接口==========
|
||||
def _register_tool_groups(self, obj):
|
||||
create_url = '/AutoDeviceApi/MaintenanceToolGroups'
|
||||
create_url = '/AutoDeviceApi/MachineToolGroup'
|
||||
sf_sync_config = self.env['res.config.settings'].get_values()
|
||||
token = sf_sync_config['token']
|
||||
sf_secret_key = sf_sync_config['sf_secret_key']
|
||||
|
||||
Reference in New Issue
Block a user