Merge branch 'master' into dev_zhou
# Conflicts: # yuthon_will_task/models/inherit_room_booking.py
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# 1.双向删除
|
||||
# 2.
|
||||
from . import soong_workflow
|
||||
from . import soong_workflow_node
|
||||
from . import soong_workflow_link
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<label>日期范围</label>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<DateTimeInput
|
||||
range="true"
|
||||
range="true"
|
||||
value="state.startDate"
|
||||
type="'date'"
|
||||
placeholder="fromPlaceholder"
|
||||
|
||||
@@ -58,10 +58,12 @@ class YuthonWillTask(http.Controller):
|
||||
@http.route('/will/task/list', methods=['POST'], type='http', auth='public', csrf=False)
|
||||
def will_task_list(self, **kwargs):
|
||||
employee_id = kwargs.get('employee_id')
|
||||
start = kwargs.get('start')
|
||||
request_hour_selection = request.env['yuthon.will.task'].sudo().fields_get(allfields=['request_hour_from'])['request_hour_from']['selection']
|
||||
result_list = []
|
||||
# for task in request.env['yuthon.will.task'].sudo().search(['|', ('employee_ids', 'in', [employee_id]), ('employee_id.id', '=', employee_id)]):
|
||||
for task in request.env['yuthon.will.task'].sudo().search([]):
|
||||
task_ids = request.env['yuthon.will.task'].sudo().search([], offset=start, limit=7)
|
||||
for task in task_ids:
|
||||
weekday_str = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"][task.start_date.weekday()]
|
||||
result = {
|
||||
'id': task.id,
|
||||
@@ -110,7 +112,16 @@ class YuthonWillTask(http.Controller):
|
||||
'request_hour_to': '',
|
||||
'remarks': task.remarks,
|
||||
'address': task.address,
|
||||
'file_list': file_list,
|
||||
# 'file_list': file_list,
|
||||
'file_list': [{
|
||||
'file_url':'https://view.officeapps.live.com/op/view.aspx?src=https%3A//oa.thtzjt.com/web/content/office_preview/13672',
|
||||
'file_name':'excel',
|
||||
},
|
||||
{
|
||||
'file_url':'https://oa.thtzjt.com/web/content/preview/13673',
|
||||
'file_name':'pdf',
|
||||
}
|
||||
],
|
||||
}
|
||||
hour_dict = dict(request_hour_selection)
|
||||
result['request_hour_from'] = hour_dict.get(task.request_hour_from)
|
||||
|
||||
Reference in New Issue
Block a user