From da6be7edbd37035e0b90cd3ae222829afdb8658d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Mon, 12 Jan 2026 21:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_salary/controllers/salary_phone.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yuthon_salary/controllers/salary_phone.py b/yuthon_salary/controllers/salary_phone.py index 9e9d7efbb..616800981 100644 --- a/yuthon_salary/controllers/salary_phone.py +++ b/yuthon_salary/controllers/salary_phone.py @@ -27,11 +27,11 @@ class YuthonWillTask(http.Controller): @http.route('/party/list/confirm', methods=['POST'], type='http', auth='public', csrf=False) def meal_list_confirm(self, **kwargs): meal_id = request.env['yuthon.salary.party'].sudo().search([('id', '=', kwargs.get('id'))]) - meal_id.write({'toll_state': 'done'}) + meal_id.write({'toll_state': 'True'}) @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'))]) + meal_ids = request.env['yuthon.meal.expenses'].sudo().search([('employee_id.id', '=', kwargs.get('employee_id'))]) data_list = [] for meal in meal_ids: result = { @@ -40,7 +40,7 @@ class YuthonWillTask(http.Controller): 'select_time': meal.select_time, 'number_breakfasts': meal.number_breakfasts, 'number_lunches': meal.number_lunches, - 'total_payments': meal.total_payments, + 'total_payment': meal.total_payment, 'toll_state': meal.toll_state, } data_list.append(result) @@ -49,4 +49,4 @@ class YuthonWillTask(http.Controller): @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'}) + meal_id.write({'toll_state': 'True'})