@@ -337,7 +337,7 @@ class AppletAttendance(Controller):
|
||||
"""
|
||||
_logger.info("-------触发打卡接口/yuthon/att/record---------")
|
||||
res_user_id = request.env(user=SUPERUSER_ID)["res.users"].search([('id', '=', kw.get('user_id'))])
|
||||
_logger.info(f"传过来的user_id:{kw.get('user_id')},名称{res_user_id.name}")
|
||||
_logger.info(f"传过来的user_id:{kw.get('user_id')},名称{res_user_id.name}, 时间{fields.Datetime.now()}")
|
||||
employee_id = request.env(user=SUPERUSER_ID)["hr.employee"].search([('name', '=', res_user_id.name)])
|
||||
if res_user_id and employee_id:
|
||||
# 初始化变量
|
||||
|
||||
@@ -27,10 +27,10 @@ class ResourceCalendar(models.Model):
|
||||
active_id = fields.Boolean('Active', default=True, tracking=True)
|
||||
resource_user_ids = fields.Many2many('hr.employee', 'resource_employee_rel', 'custom_id', 'employee_id',
|
||||
store=True, index=True, string="白名单")
|
||||
resource_user_ids2 = fields.Many2many('hr.employee', 'resource_employee_rel2', 'custom_id', 'employee_id',
|
||||
store=True, index=True, string="哺乳期人员")
|
||||
|
||||
# resource_user_ids2 = fields.Many2many('hr.employee', 'resource_employee_rel2', 'custom_id', 'employee_id',
|
||||
# store=True, index=True, string="哺乳期人员")
|
||||
|
||||
breastfeeding_holiday_ids = fields.One2many('breastfeeding.holiday', 'resource_calendar_id', string='哺乳假明细')
|
||||
def get_baidu_holiday(self):
|
||||
"""
|
||||
通过百度日历接口获取法定节假日信息
|
||||
@@ -111,6 +111,15 @@ class ResourceCalendar(models.Model):
|
||||
self.write({'calendar_holiday_ids': holiday_list, 'global_leave_ids': leave_list})
|
||||
|
||||
|
||||
class BreastfeedingHolidaye(models.Model):
|
||||
_name = "breastfeeding.holiday"
|
||||
|
||||
resource_calendar_id = fields.Many2one('resource.calendar')
|
||||
employee_id = fields.Many2one('hr.employee', string="员工")
|
||||
breastfeeding_type = fields.Selection([('1', '上午'), ('2', '下午')], string="类型")
|
||||
calendar_start_time = fields.Datetime(string="假期开始时间")
|
||||
calendar_end_time = fields.Datetime(string="假期结束时间")
|
||||
|
||||
class ResourceCalendarHolidaye(models.Model):
|
||||
_name = "resource.calendar.holiday"
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ class YuthonVacationReports(models.Model):
|
||||
is_abnormal = fields.Integer(string="异常", compute='compute_attendance_fields', store=True, group_operator=None)
|
||||
att_mount = fields.Integer(string="出勤天数", compute='compute_attendance_fields', store=True, group_operator=None)
|
||||
|
||||
attendance_message_log_ids = fields.One2many('attendance.message.log', 'vacation_id')
|
||||
|
||||
|
||||
vacation_state = fields.Selection(
|
||||
selection=[
|
||||
@@ -911,6 +913,17 @@ class VacationOtherLine(models.Model):
|
||||
'view_mode': 'form',
|
||||
}
|
||||
|
||||
class AttendanceMessageLog(models.Model):
|
||||
_name = 'attendance.message.log'
|
||||
_description = '消息提醒日志'
|
||||
|
||||
vacation_id = fields.Many2one('yuthon.vacation.reports', string='关联假期额度记录')
|
||||
employee_id = fields.Many2one('hr.employee', string='员工')
|
||||
update_date = fields.Datetime(string='更新时间')
|
||||
message_type = fields.Selection([('1', '上班'), ('2', '下班'), ('3', '异常'), ('4', '考勤确认'), ('5', '薪资')], string="类型")
|
||||
message_url = fields.Char(string="url")
|
||||
|
||||
|
||||
|
||||
class DetailsTree(models.Model):
|
||||
_name = 'details.tree'
|
||||
|
||||
@@ -16,6 +16,9 @@ access_details_tree, details_tree,model_details_tree,base.group_user,1,1,1,1
|
||||
access_vacation_medical_line,vacation_medical_line,model_vacation_medical_line,base.group_user,1,1,1,1
|
||||
access_vacation_other_line,vacation_other_line,model_vacation_other_line,base.group_user,1,1,1,1
|
||||
|
||||
access_breastfeeding_holiday,breastfeeding_holiday,model_breastfeeding_holiday,base.group_user,1,1,1,1
|
||||
access_attendance_message_log,attendance_message_log,model_attendance_message_log,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
access_yuthon_shift_planning,yuthon.shift.planning,model_yuthon_shift_planning,base.group_user,1,1,1,1
|
||||
access_yuthon_shift_planning_a_line,yuthon.shift.planning.a.line,model_yuthon_shift_planning_a_line,base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -63,10 +63,9 @@
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="days" invisible="not is_day"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="statr_date" invisible="not (is_day or is_half)"/>
|
||||
<field name="end_date" invisible="not (is_day or is_half)"/>
|
||||
<field name="statr_date" invisible="not is_half"/>
|
||||
<field name="end_date" invisible="not is_half"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="start_day_selection" invisible="not is_half" string=" " widget="redio"/>
|
||||
@@ -74,6 +73,17 @@
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="statr_date" invisible="not is_day"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="end_date" invisible="not is_day"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="days" invisible="not is_day"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="date_start" invisible="not is_hour"/>
|
||||
|
||||
@@ -34,6 +34,17 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page name="burujia" string="哺乳假明细">
|
||||
<field name="breastfeeding_holiday_ids">
|
||||
<tree>
|
||||
<field name="resource_calendar_id" column_invisible="1"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="breastfeeding_type"/>
|
||||
<field name="calendar_start_time"/>
|
||||
<field name="calendar_end_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='resource_details']" position="after">
|
||||
<group name="work">
|
||||
@@ -65,7 +76,7 @@
|
||||
<!-- <field name="work_after" style="width: 5%"/>分钟-->
|
||||
<!-- </div>-->
|
||||
<field name="resource_user_ids" widget="many2many_tags"/>
|
||||
<field name="resource_user_ids2" widget="many2many_tags"/>
|
||||
<!-- <field name="resource_user_ids2" widget="many2many_tags"/>-->
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<field name="employee_id" readonly="1"/>
|
||||
<field name="vacation_date" readonly="1"/>
|
||||
<!-- <field name="vacation_date" readonly="1"/>-->
|
||||
<div class="col-12 text-center">
|
||||
<h1>
|
||||
<field name="display_date"/>
|
||||
@@ -233,6 +233,17 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="出勤消息日志">
|
||||
<field name="attendance_message_log_ids">
|
||||
<tree>
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="update_date"/>
|
||||
<field name="message_type"/>
|
||||
<field name="message_url"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="汇总" invisible="1">
|
||||
<group>
|
||||
<field name="is_late_card"/>
|
||||
@@ -385,6 +396,17 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="出勤消息日志">
|
||||
<field name="attendance_message_log_ids">
|
||||
<tree>
|
||||
<field name="vacation_id" column_invisible="1"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="update_date"/>
|
||||
<field name="message_type"/>
|
||||
<field name="message_url"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="汇总" invisible="1">
|
||||
<group>
|
||||
<field name="is_late_card"/>
|
||||
|
||||
Reference in New Issue
Block a user