diff --git a/room/__manifest__.py b/room/__manifest__.py index 573d18ddb..1217fb619 100644 --- a/room/__manifest__.py +++ b/room/__manifest__.py @@ -14,7 +14,6 @@ 'data/ir_module_category_data.xml', 'data/room_meeting_type_data.xml', 'security/ir_rule.xml', - 'security/room_company_security_group.xml', 'security/ir.model.access.csv', 'views/room_booking_views.xml', 'views/room_room_views.xml', diff --git a/room/models/room_booking.py b/room/models/room_booking.py index fbe63061a..201fd36ea 100644 --- a/room/models/room_booking.py +++ b/room/models/room_booking.py @@ -34,8 +34,6 @@ class RoomBooking(models.Model): is_day = fields.Boolean(string="提前一天", default=True) meeting_type = fields.Selection([('up', '线上'), ('down', '线下'), ('exterior', '外部')], default='down', string="会议形式", required=True) - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], - string='所属公司') meeting_type_id = fields.Many2one('room.meeting.type', string="会议类型") room_users_ids = fields.Many2many('res.users', string="参会人员", store=True) other_company_id = fields.Many2one('res.partner', string="外部公司") diff --git a/room/models/room_room.py b/room/models/room_room.py index 3faa06d1f..126f64ae7 100644 --- a/room/models/room_room.py +++ b/room/models/room_room.py @@ -28,8 +28,6 @@ class Room(models.Model): # Technical/Statistics access_token = fields.Char("Access Token", default=lambda self: str(uuid4()), copy=False, readonly=True, required=True) bookings_count = fields.Integer("Bookings Count", compute="_compute_bookings_count") - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], - string='公司') is_available = fields.Boolean(string="Is Room Currently Available", compute="_compute_is_available") next_booking_start = fields.Datetime("Next Booking Start", compute="_compute_next_booking_start") room_booking_url = fields.Char("Room Booking URL", compute="_compute_room_booking_url") diff --git a/room/security/room_company_security_group.xml b/room/security/room_company_security_group.xml deleted file mode 100644 index f878378d8..000000000 --- a/room/security/room_company_security_group.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - 预定房间公司过滤 - - [('yuthon_company', '=', user.employee_id.yuthon_company)] - - - - - - - 房间公司过滤 - - [('yuthon_company', '=', user.employee_id.yuthon_company)] - - - - - - diff --git a/room/views/room_booking_views.xml b/room/views/room_booking_views.xml index 8a1a9a63b..c7afa24d2 100644 --- a/room/views/room_booking_views.xml +++ b/room/views/room_booking_views.xml @@ -153,7 +153,6 @@ - diff --git a/room/views/room_room_views.xml b/room/views/room_room_views.xml index 69f3394ce..9dcd48c04 100644 --- a/room/views/room_room_views.xml +++ b/room/views/room_room_views.xml @@ -13,9 +13,6 @@ - - - @@ -57,7 +54,6 @@
公司: -
@@ -122,7 +118,6 @@ - @@ -172,7 +167,6 @@ 会议室 room.room kanban,list,form - {'search_default_group_yuthon_company': 1 }

Create Rooms diff --git a/soong_workflow/models/soong_user_role.py b/soong_workflow/models/soong_user_role.py index 8c182ab1d..27c5cb383 100644 --- a/soong_workflow/models/soong_user_role.py +++ b/soong_workflow/models/soong_user_role.py @@ -22,8 +22,6 @@ class YuthonUserRole(models.Model): personnel = fields.Text(string="在岗人员", store=True) employee_ids = fields.One2many('hr.employee', 'user_role_id') child_ids = fields.One2many('soong.user.role', 'parent_id', string='下级角色', index=True) - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), - ('thlc', '天河粮储'), ('thtjbb', '天河投资本部')], string="所属公司", compute='compute_company') pinyin_name = fields.Char(string="拼音名称", compute='_compute_pinyin', index=True, store=True) def write(self, vals): @@ -40,27 +38,6 @@ class YuthonUserRole(models.Model): if record.department_id and record.name: record.display_name = record.department_id.name + ' - ' + record.name - @api.depends('department_id') - def compute_company(self): - company_mapping = {'集团本部': 'thtz', - '天河物管': 'thwg', - '天河粮储': 'thlc', - '天河投资本部': 'thtjbb'} - for record in self: - visited_departments = set() - department = record.department_id - while department and department.id not in visited_departments: - visited_departments.add(department.id) - if department.name == '集团本部': - record.yuthon_company = 'thtz' - break - elif department.name in company_mapping: - record.yuthon_company = company_mapping[department.name] - break - department = department.parent_id - else: - record.yuthon_company = 'thtz' - @api.depends('name') def _compute_pinyin(self): for employee in self: diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 242e8f964..e33158862 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -128,7 +128,7 @@ class SoongWorkflowMixin(models.AbstractModel): employee_ids = record.sudo().env['hr.employee'].search( ['|', ('user_role_id', '=', button_id.users_role_id.id), ('user_role_ids', 'in', button_id.users_role_id.id), '|', ('department_id', '=', record.env.user.employee_id.department_id.id), ('department_ids', 'in', record.env.user.employee_id.department_id.id), - ('yuthon_company', '=', record.env.user.employee_id.yuthon_company)]) + ]) if record.env.user.employee_id.id in employee_ids.ids: record.state = button_id.node_id.node_name return res diff --git a/soong_workflow/views/soong_user_role_views.xml b/soong_workflow/views/soong_user_role_views.xml index af9a86370..cbe65a816 100644 --- a/soong_workflow/views/soong_user_role_views.xml +++ b/soong_workflow/views/soong_user_role_views.xml @@ -29,7 +29,6 @@ - @@ -60,7 +59,6 @@ - diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index d1a5a6734..29597f445 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -81,20 +81,16 @@ class SoongWorkflowCommentWizard(models.TransientModel): next_is_automatic = workflow_id.node_ids.search([('name', '=', self.trans_link_id.name), ('workflow_id', '=', workflow_id.id)]).button_ids[0].is_automatic # 不自动匹配 employee_user_role_ids = self.env['hr.employee'].search(['|', ('user_role_id', '=', link_users_id.id), - ('user_role_ids', 'in', link_users_id.id), - ('yuthon_company', '=', - record_id.create_uid.employee_id.yuthon_company)]) + ('user_role_ids', 'in', link_users_id.id)]) # 自动匹配 employee_user_role_id = self.env['hr.employee'].search(['|', ('user_role_id', '=', link_users_id.id), ('user_role_ids', 'in', link_users_id.id), '|', ('department_id', '=', record_id.department_id.id), - ('department_ids', 'in', record_id.department_id.id), - ('yuthon_company', '=', record_id.create_uid.employee_id.yuthon_company)]) + ('department_ids', 'in', record_id.department_id.id)]) if not employee_user_role_id: employee_user_role_id = self.env['hr.employee'].search( ['|', ('user_role_id', '=', link_users_id.id), ('user_role_ids', 'in', link_users_id.id), '|', ('department_id', '=', record_id.department_id.parent_id.id), - ('department_ids', 'in', record_id.department_id.parent_id.id), - ('yuthon_company', '=', record_id.create_uid.employee_id.yuthon_company)]) + ('department_ids', 'in', record_id.department_id.parent_id.id)]) self.employee_trans_domain_ids = employee_user_role_ids if not next_is_automatic else employee_user_role_id self.employee_ids = employee_user_role_ids if not next_is_automatic else employee_user_role_id if '分发' in ret.name: diff --git a/yuthon_contract/models/inherit_hr_contract.py b/yuthon_contract/models/inherit_hr_contract.py index 291a18456..4368321c8 100644 --- a/yuthon_contract/models/inherit_hr_contract.py +++ b/yuthon_contract/models/inherit_hr_contract.py @@ -13,8 +13,7 @@ class HrContract(models.Model): resource_calendar_id = fields.Many2one('resource.calendar', string='考勤时间表') date_of_entry = fields.Date(related='employee_id.entry_date', string="入职时间") salary_group_id = fields.Many2one(related='employee_id.salary_group_id', string="工资单分组", store=True, index=True) - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], - related='employee_id.yuthon_company', string="所属公司", readonly=False) + work_entry_source = fields.Selection([ ('calendar', '考勤安排'), ('attendance', 'Attendances'), diff --git a/yuthon_contract/views/inherit_hr_contract_views.xml b/yuthon_contract/views/inherit_hr_contract_views.xml index 312d3df43..167049504 100644 --- a/yuthon_contract/views/inherit_hr_contract_views.xml +++ b/yuthon_contract/views/inherit_hr_contract_views.xml @@ -16,6 +16,7 @@ + inherit.hr.contract.yuthon.form hr.contract @@ -27,12 +28,6 @@ 1 - - [('yuthon_company', '=', yuthon_company)] - - - - @@ -78,16 +73,7 @@ - - hr.contract.view.form.inherit.work.entry.attendance1 - hr.contract - - - - - - - + 批量导入合同 diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 76649e626..4f4700e57 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -250,7 +250,6 @@ class HolidaysRequestBatch(models.Model): name = fields.Char(string='标题') employee_id = fields.Many2one(string='员工', comodel_name='hr.employee', required=True, default=_get_default_emp, index=True) - yuthon_company = fields.Selection(related='employee_id.yuthon_company', string="公司") users_id = fields.Many2one('res.users', string="请假人", default=lambda self: self.env.user.id) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") user_role_id = fields.Many2one(related='users_id.employee_id.user_role_id', string="角色") @@ -300,21 +299,21 @@ class HolidaysRequestBatch(models.Model): self.leave_ids.action_validate() self.hour_leave_ids.action_validate() - @api.model_create_multi - def create(self, vals_list): - for vals in vals_list: - number_hours = 0 - if vals.get('yuthon_company') == 'thwg': - if 'hour_leave_ids' in vals: - for leave_info in vals.get('hour_leave_ids', []): - hours_text = leave_info[2]['number_of_hours_text'] - match = re.search(r'\d+', hours_text) - if match: - number_hours += float(match.group()) - valid_hours = [2, 4, 6, 8] - if number_hours not in valid_hours: - raise ValidationError("休假时长必须为 2、4、6 或 8 小时才可以保存!") - return super(HolidaysRequestBatch, self).create(vals_list) + # @api.model_create_multi + # def create(self, vals_list): + # for vals in vals_list: + # number_hours = 0 + # if vals.get('yuthon_company') == 'thwg': + # if 'hour_leave_ids' in vals: + # for leave_info in vals.get('hour_leave_ids', []): + # hours_text = leave_info[2]['number_of_hours_text'] + # match = re.search(r'\d+', hours_text) + # if match: + # number_hours += float(match.group()) + # valid_hours = [2, 4, 6, 8] + # if number_hours not in valid_hours: + # raise ValidationError("休假时长必须为 2、4、6 或 8 小时才可以保存!") + # return super(HolidaysRequestBatch, self).create(vals_list) @api.onchange('leave_ids', 'hour_leave_ids', 'employee_id') def _onchange_leave_dates(self): diff --git a/yuthon_holiday/models/yuthon_fixes_approval.py b/yuthon_holiday/models/yuthon_fixes_approval.py index 3716cd679..86d5d5c1b 100644 --- a/yuthon_holiday/models/yuthon_fixes_approval.py +++ b/yuthon_holiday/models/yuthon_fixes_approval.py @@ -7,7 +7,6 @@ class YuthonFixesApproval(models.Model): _description = '假期修正审批' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_holiday_fixes_code')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_holiday/models/yuthon_holiday_setting.py b/yuthon_holiday/models/yuthon_holiday_setting.py index 46c9fd8b8..b795d0e78 100644 --- a/yuthon_holiday/models/yuthon_holiday_setting.py +++ b/yuthon_holiday/models/yuthon_holiday_setting.py @@ -9,6 +9,5 @@ class YuthonHolidaySetting(models.Model): _description = '请假流程说明' name = fields.Text(string='名称') - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司') department_ids = fields.Many2many('hr.department', string="部门") diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index 15bd9e9da..0c77cdc40 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -55,7 +55,6 @@ - diff --git a/yuthon_holiday/views/yuthon_fixes_approval_views.xml b/yuthon_holiday/views/yuthon_fixes_approval_views.xml index 1973d4bb5..a02aba483 100644 --- a/yuthon_holiday/views/yuthon_fixes_approval_views.xml +++ b/yuthon_holiday/views/yuthon_fixes_approval_views.xml @@ -7,7 +7,6 @@ - @@ -63,7 +62,6 @@ - diff --git a/yuthon_holiday/views/yuthon_holiday_setting_views.xml b/yuthon_holiday/views/yuthon_holiday_setting_views.xml index 6cd17008b..4f71f818a 100644 --- a/yuthon_holiday/views/yuthon_holiday_setting_views.xml +++ b/yuthon_holiday/views/yuthon_holiday_setting_views.xml @@ -6,8 +6,7 @@ - - + diff --git a/yuthon_hr_attendance/__manifest__.py b/yuthon_hr_attendance/__manifest__.py index 038eb371a..3b2394914 100644 --- a/yuthon_hr_attendance/__manifest__.py +++ b/yuthon_hr_attendance/__manifest__.py @@ -16,7 +16,6 @@ 'soong_workflow', 'yuthon_issue', 'planning', 'calendar', 'web_gantt', 'yuthon_wechat', 'yuthon_hr_employee'], 'data': [ 'security/ir.model.access.csv', - 'security/attendance_group.xml', 'security/planning_group.xml', 'data/hr_attendance_time.xml', 'data/attendance_code_data.xml', diff --git a/yuthon_hr_attendance/models/card_approval.py b/yuthon_hr_attendance/models/card_approval.py index 081bbc3db..389329137 100644 --- a/yuthon_hr_attendance/models/card_approval.py +++ b/yuthon_hr_attendance/models/card_approval.py @@ -12,7 +12,6 @@ class CardApprovals(models.Model): _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题", compute='_compute_name') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_hr_attendance/models/duty_approval.py b/yuthon_hr_attendance/models/duty_approval.py index 7dd21f88a..169a4d2e1 100644 --- a/yuthon_hr_attendance/models/duty_approval.py +++ b/yuthon_hr_attendance/models/duty_approval.py @@ -10,7 +10,6 @@ class DutyApprovals(models.Model): _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题", compute='_compute_name') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval')) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") diff --git a/yuthon_hr_attendance/models/go_approval.py b/yuthon_hr_attendance/models/go_approval.py index fbbdeed7c..3376fbe09 100644 --- a/yuthon_hr_attendance/models/go_approval.py +++ b/yuthon_hr_attendance/models/go_approval.py @@ -15,7 +15,6 @@ class GoApprovals(models.Model): _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题", compute='_compute_name', store=True, readonly=False) code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 7d76e01e3..364891e78 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -22,7 +22,6 @@ class HrAttendance(models.Model): absenteeism_card = fields.Boolean(string="旷工", group_operator='count_true') work_time_type = fields.Selection([('close_day', '休息日'), ('work_day', '工作日')], string="工作时间类型") company_id = fields.Many2one('res.company', string='公司', index=True, default=lambda self: self.env.company) - yuthon_company = fields.Selection(related='employee_id.yuthon_company', string="公司") on_card_location = fields.Char(string="上班打卡地点") down_card_location = fields.Char(string="下班打卡地点") out_card_time = fields.Datetime(string="外出打卡时间") diff --git a/yuthon_hr_attendance/models/hr_attendance_month.py b/yuthon_hr_attendance/models/hr_attendance_month.py index c6186f664..b0c354a72 100644 --- a/yuthon_hr_attendance/models/hr_attendance_month.py +++ b/yuthon_hr_attendance/models/hr_attendance_month.py @@ -43,7 +43,6 @@ class HrAttendanceMonth(models.Model): is_statistics = fields.Boolean(string="是否已统计", store=True, default=False) statistics_time = fields.Datetime(string="统计时间") attendance_month_detail_ids = fields.One2many(string="出勤月度汇总明细", comodel_name='hr.attendance.month.detail', inverse_name='hr_attendance_month_id') - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')],string='公司') def _compute_name(self): for record in self: @@ -130,8 +129,6 @@ class HrAttendanceMonthDetail(models.Model): note = fields.Char(string='备注') hr_attendance_month_id = fields.Many2one('hr.attendance.month', string="出勤月度汇总", ondelete="cascade", readonly=True) - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], - string='公司') signature = fields.Image(string="签名", copy=False, attachment=True, max_width=1024, max_height=1024) signed_by = fields.Char(string="签名者", copy=False) signed_on = fields.Datetime(string="签名时间", copy=False) @@ -602,11 +599,9 @@ class HrAttendanceMonthDetail(models.Model): :return: obj """ self.ensure_one() - yuthon_company = self.yuthon_company attendance_month_obj = self.env["hr.attendance.month"].search([ ('current_year', '=', self.current_year), - ('current_month', '=', self.current_month), - ('yuthon_company', '=', yuthon_company), + ('current_month', '=', self.current_month) ], limit=1) if not attendance_month_obj: attendance_month_obj = self.env["hr.attendance.month"].sudo().create({ @@ -615,7 +610,6 @@ class HrAttendanceMonthDetail(models.Model): "current_month": self.current_month, "is_statistics": True, "statistics_time": fields.Datetime.now(), - "yuthon_company": yuthon_company, }) return attendance_month_obj @@ -626,12 +620,10 @@ class HrAttendanceMonthDetail(models.Model): :return: 考情明细 """ self.ensure_one() - yuthon_company = self.yuthon_company attendance_month_detail_obj = self.env["hr.attendance.month.detail"].search( [('employee_id', '=', employee.id), ('current_year', '=', self.current_year), ('current_month', '=', self.current_month), - ('yuthon_company', '=', yuthon_company) ], limit=1) if not attendance_month_detail_obj: attendance_month_detail_obj = self.env["hr.attendance.month.detail"].sudo().create({ @@ -639,7 +631,6 @@ class HrAttendanceMonthDetail(models.Model): "attendance_year_id": self.attendance_year_id.id, "current_year": self.current_year, "current_month": self.current_month, - "yuthon_company": yuthon_company }) return attendance_month_detail_obj diff --git a/yuthon_hr_attendance/models/overtime_approval.py b/yuthon_hr_attendance/models/overtime_approval.py index ade3f6ccc..1090a0017 100644 --- a/yuthon_hr_attendance/models/overtime_approval.py +++ b/yuthon_hr_attendance/models/overtime_approval.py @@ -13,7 +13,6 @@ class OvertimeApprovals(models.Model): _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题", compute='_compute_name') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) @@ -51,14 +50,14 @@ class OvertimeApprovals(models.Model): else: rec.duration = 0.0 - @api.model_create_multi - def create(self, vals_list): - for vals in vals_list: - if vals.get('yuthon_company') == 'thwg': - if vals.get('duration'): - if (vals['duration']) % 1 != 0.5: - raise ValidationError("时长不对!请重新编辑") - return super(OvertimeApprovals, self).create(vals_list) + # @api.model_create_multi + # def create(self, vals_list): + # for vals in vals_list: + # if vals.get('yuthon_company') == 'thwg': + # if vals.get('duration'): + # if (vals['duration']) % 1 != 0.5: + # raise ValidationError("时长不对!请重新编辑") + # return super(OvertimeApprovals, self).create(vals_list) @api.onchange('is_issues') def _onchange_is_issues(self): @@ -106,12 +105,12 @@ class OvertimeApprovals(models.Model): })) over.overtime_user_ids = users_data_list - @api.onchange('yuthon_company') - def onchange_company(self): - for record in self: - overtime_id = record.env['overtime.page'].search([('yuthon_company', '=', record.yuthon_company)]) - record.details = (f"1、每天加班不得超过{overtime_id.day_time}\n" - f"2、每月加班不得超过{overtime_id.month_time}\n") + # @api.onchange('yuthon_company') + # def onchange_company(self): + # for record in self: + # overtime_id = record.env['overtime.page'].search([('yuthon_company', '=', record.yuthon_company)]) + # record.details = (f"1、每天加班不得超过{overtime_id.day_time}\n" + # f"2、每月加班不得超过{overtime_id.month_time}\n") def put_hr_employee(self): for record in self: diff --git a/yuthon_hr_attendance/models/overtime_page.py b/yuthon_hr_attendance/models/overtime_page.py index 16602d4ff..3ec1be4b7 100644 --- a/yuthon_hr_attendance/models/overtime_page.py +++ b/yuthon_hr_attendance/models/overtime_page.py @@ -6,7 +6,6 @@ class OvertimePage(models.Model): _name = 'overtime.page' _description = '加班说明配置' - yuthon_company = fields.Selection([('thtz', '集团本部'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='公司') department_id = fields.Many2one("hr.department", string="部门") day_time = fields.Char(string="工作日加班时间不超过") month_time = fields.Char(string="公休日和节假日不超过") diff --git a/yuthon_hr_attendance/models/yuthon_abnormal_approval.py b/yuthon_hr_attendance/models/yuthon_abnormal_approval.py index 01fb4f420..8ef62a839 100644 --- a/yuthon_hr_attendance/models/yuthon_abnormal_approval.py +++ b/yuthon_hr_attendance/models/yuthon_abnormal_approval.py @@ -9,7 +9,6 @@ class YuthonAbnormalApproval(models.Model): _description = '值班补卡审批' _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('abnormal_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_hr_attendance/models/yuthon_adjustments_approval.py b/yuthon_hr_attendance/models/yuthon_adjustments_approval.py index 4f2768550..d5a93ed81 100644 --- a/yuthon_hr_attendance/models/yuthon_adjustments_approval.py +++ b/yuthon_hr_attendance/models/yuthon_adjustments_approval.py @@ -9,7 +9,6 @@ class YuthonAdjustmentsApproval(models.Model): _description = '值班调休审批' _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('adjustments_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_hr_attendance/models/yuthon_customer_approval.py b/yuthon_hr_attendance/models/yuthon_customer_approval.py index a07a0ffe4..f97094033 100644 --- a/yuthon_hr_attendance/models/yuthon_customer_approval.py +++ b/yuthon_hr_attendance/models/yuthon_customer_approval.py @@ -9,7 +9,6 @@ class YuthonCustomerApproval(models.Model): _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin'] _rec_name = 'name' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") name = fields.Char(string="标题") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('overtime_approval')) users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) diff --git a/yuthon_hr_attendance/models/yuthon_shift_approval.py b/yuthon_hr_attendance/models/yuthon_shift_approval.py index 61a30fa2b..733307d19 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_approval.py +++ b/yuthon_hr_attendance/models/yuthon_shift_approval.py @@ -8,7 +8,6 @@ class YuthonShiftApproval(models.Model): _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _description = '值班调替班审批' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) name = fields.Char(string="标题", default=lambda self: self.env.user.employee_id.resource_id.name) code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('shift_approval')) diff --git a/yuthon_hr_attendance/models/yuthon_special_approval.py b/yuthon_hr_attendance/models/yuthon_special_approval.py index 9380f4a05..9d57e9279 100644 --- a/yuthon_hr_attendance/models/yuthon_special_approval.py +++ b/yuthon_hr_attendance/models/yuthon_special_approval.py @@ -8,7 +8,6 @@ class YuthonSpecialApproval(models.Model): _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] _description = '特殊加班' - yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) name = fields.Char(string="标题", readonly=False, default=lambda self: self.env.user.employee_id.resource_id.name) reason_application = fields.Html(string="申请事由") diff --git a/yuthon_hr_attendance/security/attendance_group.xml b/yuthon_hr_attendance/security/attendance_group.xml deleted file mode 100644 index c42e29ce9..000000000 --- a/yuthon_hr_attendance/security/attendance_group.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - 出勤组 - - - 考勤记录(天河投资) - - - - 考勤记录(天河物管) - - - - 考勤记录(天河粮储) - - - - 管理者 - - - - - - 考勤记录公司过滤 - - [('yuthon_company', '=', user.employee_id.yuthon_company)] - - - - - - - \ No newline at end of file diff --git a/yuthon_hr_attendance/views/all_attendance_menu.xml b/yuthon_hr_attendance/views/all_attendance_menu.xml index aa697a16f..06e664a65 100644 --- a/yuthon_hr_attendance/views/all_attendance_menu.xml +++ b/yuthon_hr_attendance/views/all_attendance_menu.xml @@ -38,7 +38,7 @@ - @@ -54,7 +53,6 @@ - diff --git a/yuthon_hr_attendance/views/go_approval.xml b/yuthon_hr_attendance/views/go_approval.xml index 37b6892d9..2cac1f8b0 100644 --- a/yuthon_hr_attendance/views/go_approval.xml +++ b/yuthon_hr_attendance/views/go_approval.xml @@ -52,7 +52,6 @@ - diff --git a/yuthon_hr_attendance/views/hr_attendance_month_views.xml b/yuthon_hr_attendance/views/hr_attendance_month_views.xml index 20d4edf45..5a11b2e5e 100644 --- a/yuthon_hr_attendance/views/hr_attendance_month_views.xml +++ b/yuthon_hr_attendance/views/hr_attendance_month_views.xml @@ -25,7 +25,6 @@ -