From 83c32bb21276bdba4c242edfe663f887dcd89844 Mon Sep 17 00:00:00 2001 From: ONION <2275333053@qq.com> Date: Sun, 14 Jul 2024 18:52:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E6=96=871.3=20=E8=80=83=E5=8B=A41.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tianhe_approvals/__manifest__.py | 9 +- .../data/approval_category_type_data.xml | 25 ------ tianhe_approvals/models/__init__.py | 4 - .../models/generic_forms_outing.py | 13 --- .../models/generic_forms_remove_holiday.py | 13 --- .../models/generic_forms_replacement_card.py | 23 ----- tianhe_approvals/models/holiday_approval.py | 24 ------ .../models/inherit_approval_category.py | 7 -- tianhe_approvals/security/ir.model.access.csv | 2 - .../views/generic_forms_outing.xml | 24 ------ .../views/generic_forms_overtime.xml | 31 ------- .../views/generic_forms_remove_holiday.xml | 24 ------ .../views/generic_forms_replacement_card.xml | 20 ----- .../wuguan_leave_registration_approval.xml | 22 ----- yuthon_hr_attendance/__manifest__.py | 10 ++- yuthon_hr_attendance/date/attendance_date.xml | 34 ++++++++ yuthon_hr_attendance/models/__init__.py | 8 ++ .../models/attendance_category.py | 17 ++++ yuthon_hr_attendance/models/card_approval.py | 25 ++++++ yuthon_hr_attendance/models/duty_approval.py | 20 +++++ yuthon_hr_attendance/models/go_approval.py | 38 +++++++++ .../models/holidays_approval.py | 37 ++++++++ yuthon_hr_attendance/models/leave_approval.py | 20 +++++ .../models/overtime_approval.py | 17 +++- .../models/remove_holiday_approval.py | 27 ++++++ .../security/ir.model.access.csv | 7 ++ .../views/all_attendance_menu.xml | 26 ++++++ yuthon_hr_attendance/views/card_approval.xml | 72 ++++++++++++++++ yuthon_hr_attendance/views/duty_approval.xml | 67 +++++++++++++++ yuthon_hr_attendance/views/go_approval.xml | 74 ++++++++++++++++ .../views/holidays_approval.xml | 74 ++++++++++++++++ .../views/hr_attendance_views.xml | 21 ----- yuthon_hr_attendance/views/leave_approval.xml | 67 +++++++++++++++ .../views/overtime_approval.xml | 84 +++++++++++++++++++ .../views/remove_holiday_approval.xml | 74 ++++++++++++++++ yuthon_official/models/yuthon_official.py | 11 ++- .../views/yuthon_official_views.xml | 25 ++++-- 37 files changed, 824 insertions(+), 272 deletions(-) delete mode 100644 tianhe_approvals/models/generic_forms_outing.py delete mode 100644 tianhe_approvals/models/generic_forms_remove_holiday.py delete mode 100644 tianhe_approvals/models/generic_forms_replacement_card.py delete mode 100644 tianhe_approvals/models/holiday_approval.py delete mode 100644 tianhe_approvals/views/generic_forms_outing.xml delete mode 100644 tianhe_approvals/views/generic_forms_overtime.xml delete mode 100644 tianhe_approvals/views/generic_forms_remove_holiday.xml delete mode 100644 tianhe_approvals/views/generic_forms_replacement_card.xml delete mode 100644 tianhe_approvals/views/wuguan_leave_registration_approval.xml create mode 100644 yuthon_hr_attendance/date/attendance_date.xml create mode 100644 yuthon_hr_attendance/models/attendance_category.py create mode 100644 yuthon_hr_attendance/models/card_approval.py create mode 100644 yuthon_hr_attendance/models/duty_approval.py create mode 100644 yuthon_hr_attendance/models/go_approval.py create mode 100644 yuthon_hr_attendance/models/holidays_approval.py create mode 100644 yuthon_hr_attendance/models/leave_approval.py rename {tianhe_approvals => yuthon_hr_attendance}/models/overtime_approval.py (79%) create mode 100644 yuthon_hr_attendance/models/remove_holiday_approval.py create mode 100644 yuthon_hr_attendance/views/all_attendance_menu.xml create mode 100644 yuthon_hr_attendance/views/card_approval.xml create mode 100644 yuthon_hr_attendance/views/duty_approval.xml create mode 100644 yuthon_hr_attendance/views/go_approval.xml create mode 100644 yuthon_hr_attendance/views/holidays_approval.xml create mode 100644 yuthon_hr_attendance/views/leave_approval.xml create mode 100644 yuthon_hr_attendance/views/overtime_approval.xml create mode 100644 yuthon_hr_attendance/views/remove_holiday_approval.xml diff --git a/tianhe_approvals/__manifest__.py b/tianhe_approvals/__manifest__.py index ac8935199..1a5f33b13 100644 --- a/tianhe_approvals/__manifest__.py +++ b/tianhe_approvals/__manifest__.py @@ -13,8 +13,7 @@ 'security/ir.model.access.csv', 'data/approval_category_type_data.xml', 'data/approval_group_data.xml', - 'views/generic_forms_overtime.xml', - 'views/wuguan_leave_registration_approval.xml', + # 'views/generic_forms_overtime.xml', # 'views/tianhe_dsh_issues_declarations.xml', # 'views/tianhe_construction_business_approval.xml', # 'views/tianhe_management_declare_approval.xml', @@ -26,9 +25,9 @@ # 'views/tianhe_property_submission_approval.xml', # 'views/tianhe_rental_receipt_approval.xml', # 'views/tianhe_meeting_file.xml', - # 'views/generic_forms_replacement_card.xml', - # 'views/generic_forms_outing.xml', - # 'views/generic_forms_remove_holiday.xml', + + + # 'views/tianhe_dimission_approval.xml', # 'views/tianhe_tryout_official_approval.xml', # 'views/tianhe_exercitation_tryout_approval.xml', diff --git a/tianhe_approvals/data/approval_category_type_data.xml b/tianhe_approvals/data/approval_category_type_data.xml index 122a524fd..c45725dd7 100644 --- a/tianhe_approvals/data/approval_category_type_data.xml +++ b/tianhe_approvals/data/approval_category_type_data.xml @@ -62,26 +62,6 @@ 天河投资租赁合同收款单 rental_receipt - - - 补卡 - card_approval - - - - 加班 - overtime_approval - - - - 外出 - go_approval - - - - 销假 - remove_holiday_approval - 离职表 @@ -167,11 +147,6 @@ 产权变更表申请表 property_right_alter - - - 请假 - leave_registration - 物业管理变更申请表 diff --git a/tianhe_approvals/models/__init__.py b/tianhe_approvals/models/__init__.py index a12c826eb..f6523e3bf 100644 --- a/tianhe_approvals/models/__init__.py +++ b/tianhe_approvals/models/__init__.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- from . import inherit_approval_category from . import inherit_approval_request -from . import overtime_approval -from . import holiday_approval # from . import tianhe_construction_business_approval # from . import tianhe_process_change_approval # from . import tianhe_contentious_matter_approval @@ -15,8 +13,6 @@ from . import holiday_approval # from . import tianhe_exercitation_tryout_approval # from . import tianhe_shift_registration_form # from . import tianhe_meeting_minutes_approval -# from . import generic_forms_outing -# from . import generic_forms_remove_holiday # from . import tianhe_dimission_approval # from . import tianhe_tryout_official_approval # from . import tianhe_exercitation_tryout_approval diff --git a/tianhe_approvals/models/generic_forms_outing.py b/tianhe_approvals/models/generic_forms_outing.py deleted file mode 100644 index cba7f04d3..000000000 --- a/tianhe_approvals/models/generic_forms_outing.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import api, fields, models, tools -from odoo.exceptions import ValidationError - - -class GenericFormsOuting(models.Model): - _inherit = "approval.request" - _description = '公司通用表单——外出' - - missed_meal_charges = fields.Char(string="误餐费") - apply_unit = fields.Char(string="申请单位") - - diff --git a/tianhe_approvals/models/generic_forms_remove_holiday.py b/tianhe_approvals/models/generic_forms_remove_holiday.py deleted file mode 100644 index 2561db3b7..000000000 --- a/tianhe_approvals/models/generic_forms_remove_holiday.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import api, fields, models, tools -from odoo.exceptions import ValidationError - - -class GenericFormsRemoveHoliday(models.Model): - _inherit = "approval.request" - _description = '公司通用表单——销假' - - entry_time = fields.Datetime(string="入职时间") - type_remove_holiday = fields.Char(string="销假类型") - - diff --git a/tianhe_approvals/models/generic_forms_replacement_card.py b/tianhe_approvals/models/generic_forms_replacement_card.py deleted file mode 100644 index 90eb2e9ee..000000000 --- a/tianhe_approvals/models/generic_forms_replacement_card.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import api, fields, models, tools -from odoo.exceptions import ValidationError - - -class GenericFormsReplacementCard(models.Model): - _inherit = "approval.request" - _description = '公司通用表单——补卡' - - type_application = fields.Selection([ - ('replacement_card', '补卡'), - ('overtime', '加班'), - ('outing', '外出'), - ('cancellation_of_fakes', '销假'), - ('Reassignment', '调岗'), - ('dimission', '离职'), - ('onboarding', '入职'), - ('regularization', '转正'), - ], string="申请类型") - replacement_time = fields.Datetime(string="补卡时间") - real_go_work_time = fields.Datetime(string="全天上班") - real_get_off_work_time = fields.Datetime(string="全天下班") - type_of_exception = fields.Char(string="异常类型") diff --git a/tianhe_approvals/models/holiday_approval.py b/tianhe_approvals/models/holiday_approval.py deleted file mode 100644 index a462417f9..000000000 --- a/tianhe_approvals/models/holiday_approval.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import api, fields, models, tools, _ -from odoo.exceptions import ValidationError - - -class WuguanLeaveRegistrationApproval(models.Model): - _inherit = "approval.request" - _description = '请假' - - leave_category = fields.Many2many('holiday.setting', string="请假类别") - leave_time = fields.Char(string="请假时间") - leave_days = fields.Float(string='请假天数', compute='_compute_leave_days', store=True) - - - @api.depends('date_start', 'date_end') - def _compute_leave_days(self): - for record in self: - if record.date_start and record.date_end: - start_date = fields.Datetime.from_string(record.date_start) - end_date = fields.Datetime.from_string(record.date_end) - duration = end_date - start_date - record.leave_days = duration.days - else: - record.leave_days = 0 diff --git a/tianhe_approvals/models/inherit_approval_category.py b/tianhe_approvals/models/inherit_approval_category.py index e3c596664..f3ec069a1 100644 --- a/tianhe_approvals/models/inherit_approval_category.py +++ b/tianhe_approvals/models/inherit_approval_category.py @@ -20,12 +20,6 @@ class ApprovalCategory(models.Model): ('document_processing', '文件处理表'), ('property_submission', '物业部业务呈批表'), ('rental_receipt', '租赁合同收款单'), - ('card_approval', '补卡审批'), - ('overtime_approval', '加班审批'), - ('go_approval', '外出审批'), - ('duty_approval', '值班审批'), - ('leave_approval', '调休审批'), - ('remove_holiday_approval', '销假审批'), ('exit_form', '离职表'), ('tryout_official', '试用期转正式员工'), ('exercitation_tryout', '实习期转试用期'), @@ -34,7 +28,6 @@ class ApprovalCategory(models.Model): ('meeting_minutes', '会议纪要'), ('engineering', '工程立项'), ('property_right_alter', '产权变更表申请表'), - ('leave_registration', '请假'), ('tianhe_property_management_reporting', '物业经营报表管理'), ('tianhe_fire_safety_management', '消防安全管理'), ('tianhe_information_ublish_approval_form', '信息发布呈批表'), diff --git a/tianhe_approvals/security/ir.model.access.csv b/tianhe_approvals/security/ir.model.access.csv index c768a58f1..001fb06ef 100644 --- a/tianhe_approvals/security/ir.model.access.csv +++ b/tianhe_approvals/security/ir.model.access.csv @@ -1,4 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_approval_request_line,approval_request_line,model_approval_request_line,base.group_user,1,1,1,1 -access_overtime_user_line,approval_overtime_user_line,model_overtime_user_line,base.group_user,1,1,1,1 - diff --git a/tianhe_approvals/views/generic_forms_outing.xml b/tianhe_approvals/views/generic_forms_outing.xml deleted file mode 100644 index 01d2fa1c2..000000000 --- a/tianhe_approvals/views/generic_forms_outing.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - approvals.category.type.code.generic.forms.outing - approval.request - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tianhe_approvals/views/generic_forms_overtime.xml b/tianhe_approvals/views/generic_forms_overtime.xml deleted file mode 100644 index c8d43c110..000000000 --- a/tianhe_approvals/views/generic_forms_overtime.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - approvals.category.type.code.generic.forms.overtime - approval.request - - - - - - - - - - - - - - - - - - -