1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
||||
from . import wizard
|
||||
from . import controllers
|
||||
@@ -0,0 +1 @@
|
||||
from . import salary_phone
|
||||
@@ -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'})
|
||||
Reference in New Issue
Block a user