diff --git a/yuthon_hr_employee_approval/__manifest__.py b/yuthon_hr_employee_approval/__manifest__.py index 58ed0ea22..975bcf01b 100644 --- a/yuthon_hr_employee_approval/__manifest__.py +++ b/yuthon_hr_employee_approval/__manifest__.py @@ -40,6 +40,7 @@ 'views/yuthon_regularization_approval_views.xml', 'views/yuthon_department_change_viwes.xml', 'views/yuthon_reward_approval_views.xml', + 'views/yuthon_pre_examination_views.xml', 'views/yuthon_salary_approval_views.xml', 'views/yuthon_service_approval_views.xml', 'views/yuthon_system_approval_views.xml', diff --git a/yuthon_hr_employee_approval/data/process_code_data.xml b/yuthon_hr_employee_approval/data/process_code_data.xml index e0bf096bd..6f446efa7 100644 --- a/yuthon_hr_employee_approval/data/process_code_data.xml +++ b/yuthon_hr_employee_approval/data/process_code_data.xml @@ -6,6 +6,13 @@ HX%(y)s%(month)s%(day)s 3 + + + 投资项目预审-编号 + yuthon_pre_examination_code + TZXM%(y)s%(month)s%(day)s + 3 + 薪资核算申请表-编号 diff --git a/yuthon_hr_employee_approval/models/__init__.py b/yuthon_hr_employee_approval/models/__init__.py index 4bc4844b1..de509b22a 100644 --- a/yuthon_hr_employee_approval/models/__init__.py +++ b/yuthon_hr_employee_approval/models/__init__.py @@ -26,4 +26,5 @@ from . import property_reimbursement_form from . import yuthon_department_change from . import yuthon_renewal_approval from . import contract_review_approval -from . import yuthon_employee_add \ No newline at end of file +from . import yuthon_employee_add +from . import yuthon_pre_examination \ No newline at end of file diff --git a/yuthon_hr_employee_approval/models/yuthon_pre_examination.py b/yuthon_hr_employee_approval/models/yuthon_pre_examination.py new file mode 100644 index 000000000..0744bf9db --- /dev/null +++ b/yuthon_hr_employee_approval/models/yuthon_pre_examination.py @@ -0,0 +1,36 @@ +from odoo import models, fields, api +from odoo.exceptions import UserError + + +class YuthonPreExamination(models.Model): + _name = 'yuthon.pre.examination' + _description = '投资项目预审表' + _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] + + 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="部门") + code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_pre_examination_code')) + is_issues = fields.Boolean(string='是否上会') + issues_result = fields.Html(string="会议结果") + related_issues_id = fields.Many2one('issue.library', string="关联议题") + + reporting_unit = fields.Char(string="报审单位") + department_id1 = fields.Many2one('hr.department', string="部门") + project_name = fields.Char(string="项目名称") + project_type = fields.Char(string="项目类型") + project_employee_ids = fields.Many2many('hr.employee', string="项目组成员") + investment_amount = fields.Float(string="预计投资金额") + investment_main = fields.Char(string="投资主体") + remake = fields.Text(string="项目概况") + documents_ids = fields.Many2many('ir.attachment', string='附件') + + urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', + default='normal') + active = fields.Boolean('Active', default=True, tracking=True) + work_end = fields.Boolean(string="结束") + + def _get_default_name_title(self): + return self._description if self._description else self._name + + name_title = fields.Char(default=_get_default_name_title) + self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])]) diff --git a/yuthon_hr_employee_approval/security/ir.model.access.csv b/yuthon_hr_employee_approval/security/ir.model.access.csv index dc893446f..9bea8f0e7 100644 --- a/yuthon_hr_employee_approval/security/ir.model.access.csv +++ b/yuthon_hr_employee_approval/security/ir.model.access.csv @@ -55,3 +55,4 @@ access_yuthon_renewal_approval,yuthon_renewal_approval,model_yuthon_renewal_appr access_contract_review_approval,contract_review_approval,model_contract_review_approval,base.group_user,1,1,1,1 access_awards_line, awards_line,model_awards_line,base.group_user,1,1,1,1 access_yuthon_employee_add,yuthon_employee_add,model_yuthon_employee_add,base.group_user,1,1,1,1 +access_yuthon_pre_examination,yuthon_pre_examination,model_yuthon_pre_examination,base.group_user,1,1,1,1 diff --git a/yuthon_hr_employee_approval/views/yuthon_pre_examination_views.xml b/yuthon_hr_employee_approval/views/yuthon_pre_examination_views.xml new file mode 100644 index 000000000..5a91cf3f3 --- /dev/null +++ b/yuthon_hr_employee_approval/views/yuthon_pre_examination_views.xml @@ -0,0 +1,76 @@ + + + + yuthon.pre.examination.tree + yuthon.pre.examination + + + + + + + + + + yuthon.pre.examination.form + yuthon.pre.examination + +
+ + + + + + + + + + + + + + + + + + +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+