diff --git a/tianhe_approvals/models/__init__.py b/tianhe_approvals/models/__init__.py
index 73b6a7644..13737e7e7 100644
--- a/tianhe_approvals/models/__init__.py
+++ b/tianhe_approvals/models/__init__.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from . import inherit_approval_category
from . import inherit_approval_request
-from . import tianhe_dsh_issues_declarations
from . import tianhe_construction_business_approval
from . import tianhe_management_declare_approval
from . import tianhe_process_change_approval
@@ -16,7 +15,6 @@ from . import tianhe_exercitation_tryout_approval
from . import tianhe_shift_registration_form
from . import tianhe_meeting_minutes_approval
from . import generic_forms_replacement_card
-from . import generic_forms_overtime
from . import generic_forms_outing
from . import generic_forms_remove_holiday
from . import tianhe_dimission_approval
diff --git a/tianhe_approvals/models/generic_forms_overtime.py b/tianhe_approvals/models/generic_forms_overtime.py
deleted file mode 100644
index c8263dd60..000000000
--- a/tianhe_approvals/models/generic_forms_overtime.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- coding: utf-8 -*-
-from odoo import api, fields, models, tools
-from odoo.exceptions import ValidationError
-
-
-class GenericFormsOvertime(models.Model):
- _inherit = "approval.request"
- _description = '加班'
-
- type_overtime = fields.Selection([('work', '工作日',), ('rest', '休息日',), ('holiday', '节假日')],
- string="加班类型")
- compensation_mode = fields.Selection([('salary', '薪资',), ('rest', '调休',)], string="补偿方式")
- is_male_pay = fields.Boolean(string="加班餐费")
- # approvals_other_user_ids = fields.Many2many('res.users', string="传阅人", compute="_compute_other_user", store=True)
- #
- # @api.depends('department_id')
- # def _compute_other_user(self):
- # pass
diff --git a/tianhe_approvals/models/inherit_approval_request.py b/tianhe_approvals/models/inherit_approval_request.py
index 6924ef968..baec73fc8 100644
--- a/tianhe_approvals/models/inherit_approval_request.py
+++ b/tianhe_approvals/models/inherit_approval_request.py
@@ -54,12 +54,15 @@ class ApprovalRequest(models.Model):
], string="用章类别")
creation_time = fields.Datetime(string='创建时间', default=lambda self: fields.Datetime.now())
department_id = fields.Many2one('hr.department', related="request_owner_id.employee_id.department_id", string="部门")
+ approval_request_ids = fields.One2many('approval.request.line', 'approval_request_id', string="审批明细行")
+ overtime_user_ids = fields.One2many('overtime.user.line', 'approval_request_id', string="审批明细行")
+
class ApprovalRequestLine(models.Model):
_name = 'approval.request.line'
_description = '明细行'
- approval_request_id = fields.Many2one('approval.request')
+ approval_request_id = fields.Many2one('approval.request', string="关联审批单")
# 董事会议题申报表
topic = fields.Char(string='议题')
@@ -86,11 +89,30 @@ class ApprovalRequestLine(models.Model):
name = fields.Char(string="名称")
servings_number = fields.Integer(string="份数")
subtotal = fields.Integer(string="小计")
- unit= fields.Char(string="单位")
- detail= fields.Char(string="详情")
-
+ unit = fields.Char(string="单位")
+ detail = fields.Char(string="详情")
# 建设工程审批单
payment_scheduling = fields.Char(string="支付进度")
percentage = fields.Char(string="百分比")
money = fields.Char(string="金额")
+
+ # 加班
+
+
+class OvertimeUserLine(models.Model):
+ _name = 'overtime.user.line'
+ _rec_name = 'approval_request_id'
+
+ approval_request_id = fields.Many2one('approval.request', string="关联审批单")
+
+ user_id = fields.Many2one('res.users', string="请假人员")
+ start_time = fields.Datetime(string="开始时间")
+ end_time = fields.Datetime(string="结束时间")
+ overtime_hours = fields.Float(string="加班时长")
+ type_overtime = fields.Selection([('work', '工作日',), ('rest', '休息日',), ('holiday', '节假日')],
+ string="加班类型", default="work")
+ compensation_mode = fields.Selection([('salary', '薪资',), ('rest', '调休',)], string="补偿方式")
+ is_male_pay = fields.Boolean(string="加班餐费")
+ user_attendance = fields.Char(string="考勤信息")
+
diff --git a/tianhe_approvals/models/tianhe_dsh_issues_declarations.py b/tianhe_approvals/models/tianhe_dsh_issues_declarations.py
deleted file mode 100644
index 03d23183d..000000000
--- a/tianhe_approvals/models/tianhe_dsh_issues_declarations.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-from odoo import api, fields, models, tools
-from odoo.exceptions import ValidationError
-
-
-class TianHeDshIssuesDeclarations(models.Model):
- _inherit = "approval.request"
- _description = '天河投资办公室——董事会议题申报表'
-
- approval_request_ids = fields.One2many('approval.request.line', 'approval_request_id', string="")
- # issues = fields.Char(string="议题")
diff --git a/tianhe_approvals/models/tianhe_information_ublish_approval_form.py b/tianhe_approvals/models/tianhe_information_ublish_approval_form.py
index cdfc9eb3f..dbc0b3904 100644
--- a/tianhe_approvals/models/tianhe_information_ublish_approval_form.py
+++ b/tianhe_approvals/models/tianhe_information_ublish_approval_form.py
@@ -8,7 +8,6 @@ class TianHeTianhetianheInformationUblishApprovalForm(models.Model):
_description = '信息发布审批表'
type_release = fields.Selection([('official_account', '公众号'), ('portal', '门户网站')], string="发布类型")
- pub_department_id = fields.Many2one('approval.request', string="审批")
diff --git a/tianhe_approvals/security/ir.model.access.csv b/tianhe_approvals/security/ir.model.access.csv
index 97b6d38c9..c768a58f1 100644
--- a/tianhe_approvals/security/ir.model.access.csv
+++ b/tianhe_approvals/security/ir.model.access.csv
@@ -1,3 +1,4 @@
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_overtime.xml b/tianhe_approvals/views/generic_forms_overtime.xml
index d70f87231..fc68eccb3 100644
--- a/tianhe_approvals/views/generic_forms_overtime.xml
+++ b/tianhe_approvals/views/generic_forms_overtime.xml
@@ -6,18 +6,44 @@
-
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/tianhe_approvals/views/liangchu_fixed_assets_purchase_order.xml b/tianhe_approvals/views/liangchu_fixed_assets_purchase_order.xml
index b271c56df..019ad6522 100644
--- a/tianhe_approvals/views/liangchu_fixed_assets_purchase_order.xml
+++ b/tianhe_approvals/views/liangchu_fixed_assets_purchase_order.xml
@@ -8,20 +8,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tianhe_approvals/views/liangchu_general_manager_office_meeting_topics.xml b/tianhe_approvals/views/liangchu_general_manager_office_meeting_topics.xml
index aeb9e2550..fd971bf46 100644
--- a/tianhe_approvals/views/liangchu_general_manager_office_meeting_topics.xml
+++ b/tianhe_approvals/views/liangchu_general_manager_office_meeting_topics.xml
@@ -8,15 +8,6 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tianhe_approvals/views/tianhe_dsh_issues_declarations.xml b/tianhe_approvals/views/tianhe_dsh_issues_declarations.xml
index 056f43a9e..7c6be518c 100644
--- a/tianhe_approvals/views/tianhe_dsh_issues_declarations.xml
+++ b/tianhe_approvals/views/tianhe_dsh_issues_declarations.xml
@@ -8,15 +8,6 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tianhe_approvals/views/tianhe_engineering_approval.xml b/tianhe_approvals/views/tianhe_engineering_approval.xml
index ce71b6fc8..49e6bb9f3 100644
--- a/tianhe_approvals/views/tianhe_engineering_approval.xml
+++ b/tianhe_approvals/views/tianhe_engineering_approval.xml
@@ -12,18 +12,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tianhe_approvals/views/tianhe_lease_contract_approval_form.xml b/tianhe_approvals/views/tianhe_lease_contract_approval_form.xml
index 7814dbbf5..05121193f 100644
--- a/tianhe_approvals/views/tianhe_lease_contract_approval_form.xml
+++ b/tianhe_approvals/views/tianhe_lease_contract_approval_form.xml
@@ -18,18 +18,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tianhe_approvals/views/wuguan_construction_works.xml b/tianhe_approvals/views/wuguan_construction_works.xml
index c53e9914e..7a2ba8a08 100644
--- a/tianhe_approvals/views/wuguan_construction_works.xml
+++ b/tianhe_approvals/views/wuguan_construction_works.xml
@@ -16,27 +16,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tianhe_approvals/views/wuguan_property_management_application.xml b/tianhe_approvals/views/wuguan_property_management_application.xml
index 50c3202d8..811601619 100644
--- a/tianhe_approvals/views/wuguan_property_management_application.xml
+++ b/tianhe_approvals/views/wuguan_property_management_application.xml
@@ -15,19 +15,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file