是否磁吸

This commit is contained in:
陈赓
2025-07-17 11:36:24 +08:00
parent cdf6a36c30
commit 9af458b11e
9 changed files with 10 additions and 81 deletions

View File

@@ -1,3 +1 @@
from . import controllers
from . import sync_controller
from . import refresh_controller

View File

@@ -1,10 +0,0 @@
# -*- coding: utf-8 -*-
from odoo import http
from odoo.http import request
class FixtureRedisRefreshController(http.Controller):
@http.route('/api/refresh_redis/fixture_param', type='json', auth='none', csrf=False, methods=['POST'])
def refresh_fixture_param_redis(self, **kw):
request.env['mrs.basic_parameters.mixin'].sudo().refresh_all_param_redis()
return {'status': 'success', 'msg': 'Redis 缓存已刷新'}

View File

@@ -1,22 +0,0 @@
# study/jikimo_sf/sf_mrs_connect/controllers/sync_controller.py
from odoo import http
from odoo.http import request
class FixtureSyncController(http.Controller):
@http.route('/api/fixture_model/sync_from_mrs', type='json', auth='none', csrf=False)
def sync_model(self, **kw):
code = kw.get('code')
if not code:
return {'status':'fail','msg':'code missing'}
request.env['sf.fixture.model'].sudo().sync_from_mrs(code)
return {'status':'success'}
@http.route('/api/fixture_param/sync_from_mrs', type='json', auth='none', csrf=False)
def sync_param(self, **kw):
code = kw.get('code')
if not code:
return {'status':'fail','msg':'code missing'}
request.env['sf.fixture.materials.basic.parameters']\
.sudo().sync_from_mrs(code)
return {'status':'success'}