This commit is contained in:
pengyuthon
2026-01-12 18:48:21 +08:00
parent 6f822d3456
commit 319fb67493
3 changed files with 38 additions and 1 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from . import models
from . import wizard
from . import wizard
from . import controllers
+1
View File
@@ -0,0 +1 @@
from . import salary_phone
+35
View File
@@ -0,0 +1,35 @@
import base64
import json
from odoo import http, fields
from odoo.http import request
from urllib.parse import quote
class YuthonWillTask(http.Controller):
@http.route('/party/list', methods=['POST'], type='http', auth='public', csrf=False)
def party_list(self, kwargs):
# yuthon.salary.party
pass
@http.route('/meal/list', methods=['POST'], type='http', auth='public', csrf=False)
def meal_list(self, **kwargs):
meal_ids = request.env['yuthon.meal.expenses'].sudo().search([('employee_id', '=', kwargs.get('employee_id'))])
data_list = []
for meal in meal_ids:
result = {
'year': meal.year,
'id': meal.id,
'field': '',
'field2': '',
'field3': '',
'field4': '',
'field5': '',
}
data_list.append(result)
return json.dumps({'data': data_list, 'code': 200, 'message': 'success'})
@http.route('/meal/list/confirm', methods=['POST'], type='http', auth='public', csrf=False)
def meal_list_confirm(self, **kwargs):
meal_id = request.env['yuthon.meal.expenses'].sudo().search([('id', '=', kwargs.get('id'))])
meal_id.write({'toll_state': 'done'})