公告手机端数据过滤
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import base64
|
||||
import json
|
||||
|
||||
import logging
|
||||
from odoo import http, fields
|
||||
from odoo.http import request
|
||||
from urllib.parse import quote
|
||||
from odoo.http import request, Response
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class YuthonNotice(http.Controller):
|
||||
|
||||
@http.route('/yuthon/yuthon/notice', methods=['POST'], type='http', auth='none', csrf=False)
|
||||
def index(self, **kwargs):
|
||||
id = kwargs.get('id')
|
||||
@@ -54,7 +53,11 @@ class YuthonNotice(http.Controller):
|
||||
|
||||
@http.route('/yuthon/notice/list', methods=['POST'], type='http', auth='none', csrf=False)
|
||||
def yuthon_notice_list(self, **kwargs):
|
||||
notice_ids = request.env['yuthon.notice'].sudo().search([])
|
||||
_logger.info(f"-----/yuthon/notice/list---接口收到响应-----{kwargs}--")
|
||||
domain = [('is_company', '=', True),
|
||||
('users_ids', 'in', kwargs.get('user_id')),
|
||||
('notice_state', '=', 'yes')]
|
||||
notice_ids = request.env['yuthon.notice'].sudo().search(domain)
|
||||
data_list = []
|
||||
for notice in notice_ids:
|
||||
result = {
|
||||
|
||||
Reference in New Issue
Block a user