pengyuthon
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
'license': 'LGPL-3',
|
||||
'author': 'pengyuthon',
|
||||
'website': 'https://www.pengyuthon.com',
|
||||
'depends':['base', 'hr', 'yuthon_hr_employee', 'soong_workflow', 'documents', 'hr_recruitment', 'room','yuthon_issue'],
|
||||
'depends': ['base', 'hr', 'yuthon_hr_employee', 'soong_workflow', 'documents', 'hr_recruitment', 'room','yuthon_issue'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'data/process_code_data.xml',
|
||||
|
||||
@@ -15,10 +15,8 @@ class EmployeeLogin(Controller):
|
||||
return response
|
||||
|
||||
values['employee_id'] = int(employee_id)
|
||||
record = request.env['hr.employee'].sudo().browse(values['employee_id'])
|
||||
record = request.env['yuthon.message.login'].sudo().browse(values['employee_id'])
|
||||
values['name'] = record.name
|
||||
# 展示字段
|
||||
# values['name'] = record.name
|
||||
if request.httprequest.method == 'POST':
|
||||
if "name" in values and values.get("name", ""):
|
||||
record.name = values.get("name", "")
|
||||
|
||||
@@ -16,10 +16,9 @@ class YuthonMessageLogin(models.Model):
|
||||
_name = 'yuthon.message.login'
|
||||
_description = "个人信息登记表"
|
||||
_rec_name = 'name'
|
||||
_inherit = ['soong.workflow.mixin','yuthon.emergency.contact.line','yuthon.work.experience.line','yuthon.education.experience.line']
|
||||
_inherit = 'soong.workflow.mixin'
|
||||
|
||||
|
||||
#基本信息
|
||||
# 基本信息
|
||||
name = fields.Char(string='标题', default="人员信息登记表")
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_message_login_code'))
|
||||
@@ -29,7 +28,7 @@ class YuthonMessageLogin(models.Model):
|
||||
nation = fields.Selection(nation_list, string='民族')
|
||||
origin = fields.Char(string='籍贯')
|
||||
political = fields.Selection([('cpc_dang', '中共党员'), ('nld', '民盟'),
|
||||
('league_member', '共青团员'), ('people', '群众')], string="政治面貌")
|
||||
('league_member', '共青团员'), ('people', '群众')], string="政治面貌")
|
||||
party_time = fields.Date(string='入党时间')
|
||||
house_hold = fields.Char(string='户口所在地')
|
||||
house_type = fields.Selection([('city', '城市'), ('rural', '农村')], string='户口类型')
|
||||
@@ -44,37 +43,32 @@ class YuthonMessageLogin(models.Model):
|
||||
hobbies = fields.Char(string='兴趣爱好')
|
||||
specialty = fields.Char(string='特长')
|
||||
self_evaluation = fields.Text(string='自我评价')
|
||||
|
||||
|
||||
#配偶情况(已婚者)
|
||||
# 配偶情况(已婚者)
|
||||
spouse_name = fields.Char(string='姓名')
|
||||
spouse_date = fields.Date(string='出生年月')
|
||||
spouse_phone = fields.Char(string='联系电话')
|
||||
spouse_work = fields.Char(string='工作单位')
|
||||
spouse_position = fields.Char(string='职务')
|
||||
spouse_degree = fields.Char(string='学历')#
|
||||
|
||||
#最近工作情况
|
||||
# 最近工作情况
|
||||
last_work = fields.Char(string='单位名称')
|
||||
last_work_department = fields.Many2one('hr.department', string="部门")
|
||||
last_work_position = fields.Many2one('hr.job', string="岗位")
|
||||
last_work_grades = fields.Char(string='工作内容成绩')
|
||||
last_work_training = fields.Char(string='接受的培训')
|
||||
last_work_reason = fields.Char(string='离职原因')
|
||||
|
||||
#亲属情况
|
||||
# 亲属情况
|
||||
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_department = fields.Many2one('hr.department', string='部门')
|
||||
relatives_work_position = fields.Selection([("parents", "父母"), ("children", "子女"),
|
||||
("spouse", "配偶"), ("spouse", "其他")], string="关系")
|
||||
|
||||
#附件
|
||||
# 附件
|
||||
image_1920 = fields.Image("一寸照")
|
||||
id_card_id = fields.Many2one('documents.document',string='身份证')
|
||||
id_card_id = fields.Many2one('documents.document', string='身份证')
|
||||
expirationDate = fields.Date(string='身份证有效期')
|
||||
residence_permit = fields.Char(string='居住证(非本市提供的办理证明,截图也可)')
|
||||
is_expertise = fields.Boolean(string='专业证书/职称')
|
||||
@@ -84,7 +78,7 @@ class YuthonMessageLogin(models.Model):
|
||||
bank_name = fields.Char(string='开户行')
|
||||
bank_phone = fields.Char(string='卡号')
|
||||
is_driving_license = fields.Boolean(string='驾驶证')
|
||||
driving_license_id = fields.Many2one('documents.document',string='驾驶证')
|
||||
driving_license_id = fields.Many2one('documents.document', string='驾驶证')
|
||||
driving_license_validity = fields.Date(string='有效期')
|
||||
resignation_id = fields.Many2one('documents.document', string='离职证明')
|
||||
medical_exam_cost = fields.Float(string='体检费用(含乙肝)')
|
||||
@@ -95,25 +89,18 @@ class YuthonMessageLogin(models.Model):
|
||||
emergency_contact_ids = fields.One2many('yuthon.emergency.contact.line', 'message_login_id', string="紧急联系人明细行")
|
||||
# 教育经历
|
||||
education_experience_ids = fields.One2many('yuthon.education.experience.line', 'message_login_id',string="教育经历明细行")
|
||||
# # 工作经历
|
||||
# 工作经历
|
||||
work_experience_ids = fields.One2many('yuthon.work.experience.line', 'message_login_id', string="工作经历明细行")
|
||||
|
||||
# # 直属亲属情况
|
||||
# 直属亲属情况
|
||||
direct_relative_ids = fields.One2many('yuthon.directly.detail.lines','message_login_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="最近工作单位情况")
|
||||
|
||||
#附件
|
||||
# 附件
|
||||
attachment_ids = fields.One2many('education.details.line', 'diploma_id', string="学历证(全日制)")
|
||||
|
||||
part_time_ids = fields.One2many('education.details.line1', 'diploma_id', string="学历证(非全日制)")
|
||||
|
||||
degree_id_ids = fields.One2many('education.details.line2', 'degree_id', string="学位证")
|
||||
|
||||
degree_id_id = fields.One2many('education.details.line2', 'degree_id', string="学位证")
|
||||
certificate_ids = fields.One2many('certificates.detail.line', 'certificate_id', string="专业证书")
|
||||
|
||||
def pub_name_button(self):
|
||||
@@ -145,19 +132,22 @@ class EducationalDetailsLine1(models.Model):
|
||||
_description = '学历证(非全日制)'
|
||||
|
||||
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document',string="毕业证书")
|
||||
graduation_id = fields.Many2one('documents.document', string="毕业证书")
|
||||
validation_reports = fields.Char(string="验证报告")
|
||||
|
||||
|
||||
class EducationalDetailsLine2(models.Model):
|
||||
_name = 'education.details.line2'
|
||||
_description = '学位证'
|
||||
|
||||
degree_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document',string="学位证")
|
||||
graduation_id = fields.Many2one('documents.document', string="学位证")
|
||||
|
||||
|
||||
class CertificateDetailLine(models.Model):
|
||||
_name = 'certificates.detail.line'
|
||||
_description = '专业证书'
|
||||
|
||||
certificate_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
professional_certificates_id = fields.Many2one('documents.document',string="专业证书/职称")
|
||||
professional_certificates_id = fields.Many2one('documents.document', string="专业证书/职称")
|
||||
professional_certificate_validity = fields.Date(string="有效期")
|
||||
|
||||
Reference in New Issue
Block a user