diff --git a/yuthon_hr_employee/__manifest__.py b/yuthon_hr_employee/__manifest__.py
index 0e1517d4e..9d84014d7 100644
--- a/yuthon_hr_employee/__manifest__.py
+++ b/yuthon_hr_employee/__manifest__.py
@@ -8,7 +8,7 @@
''',
'version': '17.0.1.2.1',
'category': 'Human Resources/Employees',
- 'license': 'LGPL-3',
+ 'license': 'LGPL-3',
'author': 'pengyuthon',
'website': 'https://www.pengyuthon.com',
'depends': ['base', 'hr'],
@@ -23,8 +23,8 @@
'views/hr_job_type_views.xml',
'views/inherit_hr_job_views.xml',
'wizard/hr_employee_wizard_views.xml',
- 'views/yuthon_board_views.xml',
- 'views/yuthon_message_views.xml',
+ 'views/yuthon_message_login_views.xml',
+ 'views/yuthon_onboard_approval_views.xml',
],
'installable': True,
'application': False,
diff --git a/yuthon_hr_employee/models/__init__.py b/yuthon_hr_employee/models/__init__.py
index 3637318d4..ebeddfbb8 100644
--- a/yuthon_hr_employee/models/__init__.py
+++ b/yuthon_hr_employee/models/__init__.py
@@ -1,9 +1,10 @@
from . import yuthon_hr_employee
+from . import yuthon_message_login
+from . import yuthon_onboard_approval
from . import hr_employee_page
from . import yuthon_job_lv
from . import yuthon_hr_department
from . import inherit_res_user
from . import inherit_hr_job
-from . import yuthon_board
-from . import yuthon_message
+
diff --git a/yuthon_hr_employee/models/hr_employee_page.py b/yuthon_hr_employee/models/hr_employee_page.py
index 5f278383c..5c5cc94f1 100644
--- a/yuthon_hr_employee/models/hr_employee_page.py
+++ b/yuthon_hr_employee/models/hr_employee_page.py
@@ -7,6 +7,8 @@ class YuthonEmergencyContactLine(models.Model):
_description = "紧急联系人明细行"
employee_id = fields.Many2one('hr.employee', string="关联员工")
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
+ name = fields.Char(string="姓名")
user_sfz = fields.Char(string="身份证")
user_relationship = fields.Selection([("parents", "父母"), ("children", "子女"), ("spouse", "配偶"), ("spouse", "其他")], string="关系")
workplace = fields.Char(string="工作单位")
@@ -20,6 +22,7 @@ class YuthonWorkExperienceLine(models.Model):
_description = "工作经验明细行"
employee_id = fields.Many2one('hr.employee', string="关联员工")
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
start_date = fields.Date(string="开始日期")
end_date = fields.Date(string="结束日期")
work_place = fields.Char(string="工作单位")
@@ -34,6 +37,7 @@ class YuthonEducationExperienceLine(models.Model):
_description = "教育经历明细行"
employee_id = fields.Many2one('hr.employee', string="关联员工")
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
name_school = fields.Char(string="学校名称")
start_date = fields.Date(string="入学时间")
end_date = fields.Date(string="毕业时间")
@@ -49,6 +53,7 @@ class YuthonSkillsCertificatesLine(models.Model):
_description = "技能证书管理明细行"
employee_id = fields.Many2one('hr.employee', string="关联员工")
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
rank_name = fields.Char(string='职级名称')
rank_type = fields.Char(string='职级类型')
rank_time = fields.Date(string='职级时间')
@@ -58,7 +63,7 @@ class YuthonPersonalSkillsSchedule(models.Model):
_name = 'yuthon.personal.skills.schedule'
_description = "个人技能明细行"
- employee_id = fields.Many2one('hr.employee', string="关联员工")
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
lingual = fields.Char(string='语种')
exam_grades = fields.Char(string='考试等级')
is_hear = fields.Boolean(string='听')
@@ -70,10 +75,22 @@ class YuthonDirectlyDetailLines(models.Model):
_name = 'yuthon.directly.detail.lines'
_description = "直属亲属明细行"
- employee_id = fields.Many2one('hr.employee', string="关联员工")
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
name = fields.Char(string='姓名')
relational = fields.Selection([("parents", "父母"), ("children", "子女"),
("spouse", "配偶"), ("spouse", "其他")], string="关系")
workplace = fields.Char(string='工作单位及职务')
phone = fields.Char(string='联系电话')
email = fields.Char(string='邮箱')
+
+class YuthonMostRecentWorkDetailLine(models.Model):
+ _name = 'yuthon.recent.work.detail.line'
+ _description = "最近工作经历明细行"
+
+ message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记") # 同上
+ position = fields.Char(string='单位名称')
+ post = fields.Char(string="岗位")
+ last_department = fields.Char(string='部门')
+ work_grades = fields.Char(string='工作内容成绩')
+ last_training = fields.Char(string='培训')
+ last_work_reason = fields.Char(string='离职原因')
diff --git a/yuthon_hr_employee/models/yuthon_message.py b/yuthon_hr_employee/models/yuthon_message_login.py
similarity index 82%
rename from yuthon_hr_employee/models/yuthon_message.py
rename to yuthon_hr_employee/models/yuthon_message_login.py
index 059eb9c52..1f53d611f 100644
--- a/yuthon_hr_employee/models/yuthon_message.py
+++ b/yuthon_hr_employee/models/yuthon_message_login.py
@@ -12,13 +12,14 @@ nation_list = [('a', '汉族'), ('b', '壮族'), ('v', '满族'), ('d', '回族'
('b2', '高山族'), ('c2', '珞巴族'), ('d2', '壮族')]
-class YuthonMessage(models.Model):
- _name = 'yuthon.message'
+class YuthonMessageLogin(models.Model):
+ _name = 'yuthon.message.login'
_description = "信息登记"
_rec_name = 'name'
#基本信息
- name = fields.Char(string='姓名', default="人员信息登记表")
+ name = fields.Char(string='名称', default="人员信息登记表")
+ staff_name = fields.Char(string='姓名')
sex = fields.Selection([('male', '男'), ('female', '女')], string='性别')
date_birth = fields.Date(string='出生年月')
nation = fields.Selection(nation_list, string='民族')
@@ -60,21 +61,27 @@ class YuthonMessage(models.Model):
#亲属情况
is_relatives_work = fields.Boolean(string='是否有亲属在本单位')
relatives_work = fields.Char(string='亲属姓名')
+ relatives_work_date = fields.Date(string='出生年月')
+ relatives_work_phone = fields.Char(string='联系电话')
+ relatives_work_address = fields.Char(string='家庭住址')
relatives_work_department = fields.Many2one('hr.department' ,string='部门')
relatives_work_position = fields.Selection([("parents", "父母"), ("children", "子女"),
("spouse", "配偶"), ("spouse", "其他")], string="关系")
# 紧急联系人
- emergency_contact_ids = fields.One2many('yuthon.emergency.contact.line', 'employee_id', string="紧急联系人明细行")
+ emergency_contact_ids = fields.One2many('yuthon.emergency.contact.line', 'message_login_id', string="紧急联系人明细行")
# 教育经历
- education_experience_ids = fields.One2many('yuthon.education.experience.line', 'employee_id',
+ education_experience_ids = fields.One2many('yuthon.education.experience.line', 'message_login_id',
string="教育经历明细行")
- # 工作经历
- work_experience_ids = fields.One2many('yuthon.work.experience.line', 'employee_id', string="工作经历明细行")
+ # # 工作经历
+ work_experience_ids = fields.One2many('yuthon.work.experience.line', 'message_login_id', string="工作经历明细行")
- # 直属亲属情况
- direct_relative_ids = fields.One2many('yuthon.directly.detail.lines', 'employee_id', string="直属亲属情况明细行")
+ # # 直属亲属情况
+ direct_relative_ids = fields.One2many('yuthon.directly.detail.lines','message_login_id', string="直属亲属情况明细行")
- #个人技能
- personal_skill_ids = fields.One2many('yuthon.personal.skills.schedule', 'employee_id', string="个人技能明细行")
+ # #个人技能
+ personal_skill_ids = fields.One2many('yuthon.personal.skills.schedule','message_login_id', string="个人技能明细行")
+
+ #最近工作单位
+ last_work_unit_ids = fields.One2many('yuthon.recent.work.detail.line', 'message_login_id', string="最近工作单位情况")
diff --git a/yuthon_hr_employee/models/yuthon_board.py b/yuthon_hr_employee/models/yuthon_onboard_approval.py
similarity index 78%
rename from yuthon_hr_employee/models/yuthon_board.py
rename to yuthon_hr_employee/models/yuthon_onboard_approval.py
index c39851b60..2b445ea84 100644
--- a/yuthon_hr_employee/models/yuthon_board.py
+++ b/yuthon_hr_employee/models/yuthon_onboard_approval.py
@@ -11,11 +11,12 @@ nation_list = [('a', '汉族'), ('b', '壮族'), ('v', '满族'), ('d', '回族'
('v1', '乌孜别克族'), ('w1', '门巴族'), ('x1', '鄂伦春族'), ('y1', '独龙族'), ('z1', '塔塔尔族'), ('a2', '赫哲族'),
('b2', '高山族'), ('c2', '珞巴族'), ('d2', '壮族')]
-class YuthonBoard(models.Model):
- _name = 'yuthon.board'
+class YuthonOnboardApproval(models.Model):
+ _name = 'yuthon.onboard.approval'
_description = "入职申请"
- name = fields.Char(string='姓名', default='入职申请表')
+ name = fields.Char(string='名称', default='入职申请表')
+ worker_name = fields.Char(string='姓名')
company = fields.Many2one('res.company', string='公司')
date_birth = fields.Date(string='出生年月')
nation = fields.Selection(nation_list, string='民族')
@@ -25,6 +26,8 @@ class YuthonBoard(models.Model):
('league_member', '共青团员'), ('people', '群众')], string="政治面貌")
education = fields.Char(string='学历')
onboard_time = fields.Date(string='入职时间')
- probation_period = fields.Date(string='试用期')
- contract_period = fields.Date(string='合同起止日期')
+ probation_period = fields.Selection([('zero','0个月'), ('one','一个月'),
+ ('two','两个月'), ('three','三个月'), ('year','一年')], string='试用期')
+ contract_start = fields.Date(string='合同开始日期')
+ contract_end = fields.Date(string='合同结束日期')
select_company = fields.Many2one('res.company',string='选择入职公司')
\ No newline at end of file
diff --git a/yuthon_hr_employee/security/ir.model.access.csv b/yuthon_hr_employee/security/ir.model.access.csv
index d2fb3818b..227a89684 100644
--- a/yuthon_hr_employee/security/ir.model.access.csv
+++ b/yuthon_hr_employee/security/ir.model.access.csv
@@ -6,7 +6,8 @@ access_yuthon_emergency_contact_line,yuthon_emergency_contact_line,model_yuthon_
access_yuthon_work_experience_line,yuthon_work_experience_line,model_yuthon_work_experience_line,base.group_user,1,1,1,1
access_yuthon_education_experience_line,yuthon_education_experience_line,model_yuthon_education_experience_line,base.group_user,1,1,1,1
access_yuthon_skills_certificates_line,yuthon_skills_certificates_line,model_yuthon_skills_certificates_line,base.group_user,1,1,1,1
-access_yuthon_board,yuthon_board,model_yuthon_board,base.group_user,1,1,1,
-access_yuthon_message,yuthon_message,model_yuthon_message,base.group_user,1,1,1,1
+access_yuthon_onboard_approval,yuthon_onboard_approval,model_yuthon_onboard_approval,base.group_user,1,1,1,
+access_yuthon_message_login,yuthon_message_login,model_yuthon_message_login,base.group_user,1,1,1,1
access_yuthon_personal_skills_schedule,yuthon_personal_skills_schedule,model_yuthon_personal_skills_schedule,base.group_user,1,1,1,1
access_yuthon_directly_detail_lines,yuthon_directly_detail_lines,model_yuthon_directly_detail_lines,base.group_user,1,1,1,1
+access_yuthon_recent_work_detail_line,yuthon_recent_work_detail_line,model_yuthon_recent_work_detail_line,base.group_user,1,1,1,1
diff --git a/yuthon_hr_employee/views/yuthon_message_login_views.xml b/yuthon_hr_employee/views/yuthon_message_login_views.xml
new file mode 100644
index 000000000..de1556e49
--- /dev/null
+++ b/yuthon_hr_employee/views/yuthon_message_login_views.xml
@@ -0,0 +1,187 @@
+
+
+
+ yuthon.message.login.tree
+ yuthon.message.login
+
+
+
+
+
+
+
+ yuthon.message.login.form
+ yuthon.message.login
+
+
+
+
+
+
+ 基本信息
+ yuthon.message.login
+ tree,form
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_hr_employee/views/yuthon_message_views.xml b/yuthon_hr_employee/views/yuthon_message_views.xml
deleted file mode 100644
index f108937f3..000000000
--- a/yuthon_hr_employee/views/yuthon_message_views.xml
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
- yuthon.message.tree
- yuthon.message
-
-
-
-
-
-
-
- yuthon.message.form
- yuthon.message
-
-
-
-
-
-
- 基本信息
- yuthon.message
- tree,form
-
-
\ No newline at end of file
diff --git a/yuthon_hr_employee/views/yuthon_board_views.xml b/yuthon_hr_employee/views/yuthon_onboard_approval_views.xml
similarity index 63%
rename from yuthon_hr_employee/views/yuthon_board_views.xml
rename to yuthon_hr_employee/views/yuthon_onboard_approval_views.xml
index 52b888864..250d351af 100644
--- a/yuthon_hr_employee/views/yuthon_board_views.xml
+++ b/yuthon_hr_employee/views/yuthon_onboard_approval_views.xml
@@ -1,8 +1,8 @@
-
- yuthon.board.tree
- yuthon.board
+
+ yuthon.onboard.approval.tree
+ yuthon.onboard.approval
@@ -14,9 +14,9 @@
-
- yuthon.board.form
- yuthon.board
+
+ yuthon.onboard.approval.form
+ yuthon.onboard.approval
-
-
+
基本信息
- yuthon.board
+ yuthon.onboard.approval
tree,form
+
+
\ No newline at end of file
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index 77709d624..4b6872707 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -5,9 +5,9 @@
False
-
+
+
+