@@ -9,6 +9,7 @@ import os
|
||||
from datetime import timedelta
|
||||
|
||||
|
||||
"""富文本字段保存无效"""
|
||||
class RoomBooking(models.Model):
|
||||
_name = "room.booking"
|
||||
_inherit = ["mail.thread"]
|
||||
@@ -97,7 +98,7 @@ class RoomBooking(models.Model):
|
||||
value = f'name{index}'
|
||||
option_text = user.name
|
||||
html_select += f' <option value="{value}">{option_text}</option>\n'
|
||||
for index, partner in enumerate(self.other_user_ids, start=99):
|
||||
for index, partner in enumerate(self.other_company_user_ids, start=99):
|
||||
value_partner = f'name{index}'
|
||||
option_partner_name = partner.name
|
||||
html_select += f' <option value="{value_partner}">{option_partner_name}</option>\n'
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</field>
|
||||
</page>
|
||||
<page string="关联议题" invisible="not is_issues">
|
||||
<field name="related_issues_id"/>
|
||||
<field name="related_issues_id"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
||||
@@ -12,7 +12,7 @@ class HrJob(models.Model):
|
||||
('no_of_recruitment_positive', 'CHECK(no_of_recruitment >= 0)', 'The expected number of new employees must be positive.')
|
||||
]
|
||||
|
||||
number = fields.Char(string="序号", store=True)
|
||||
number = fields.Char(string="序号")
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储'), ('tctj', '天投城建'),('thtjbb', '天河投资本部')], string="所属公司")
|
||||
job_type_id = fields.Many2one('hr.job.type', string="岗位类别")
|
||||
|
||||
@@ -11,13 +11,13 @@ class YuthonJobLv(models.Model):
|
||||
|
||||
lv = fields.Char(string="级别")
|
||||
name = fields.Char(string="职级名称")
|
||||
base_wage = fields.Float(string="基本工资")
|
||||
job_wage = fields.Float(string="职级工资")
|
||||
post_wage = fields.Float(string="岗位工资")
|
||||
performance_bonus = fields.Float(string="绩效奖金")
|
||||
phone_subsidy = fields.Float(string="通信补贴")
|
||||
attendance_bonus = fields.Float(string="全勤奖")
|
||||
all_wage = fields.Float(string="应发工资")
|
||||
base_wage = fields.Float(string="基本工资", group_operator=None)
|
||||
job_wage = fields.Float(string="职级工资", group_operator=None)
|
||||
post_wage = fields.Float(string="岗位工资", group_operator=None)
|
||||
performance_bonus = fields.Float(string="绩效奖金", group_operator=None)
|
||||
phone_subsidy = fields.Float(string="通信补贴", group_operator=None)
|
||||
attendance_bonus = fields.Float(string="全勤奖", group_operator=None)
|
||||
all_wage = fields.Float(string="应发工资", group_operator=None)
|
||||
|
||||
yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'),
|
||||
('thlc', '天河粮储'), ('tctj', '天投城建')], string="所属公司")
|
||||
|
||||
@@ -39,19 +39,6 @@
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<!-- <notebook>-->
|
||||
<!-- <page string="关联面试信息">-->
|
||||
<!-- <field name="interview_ids">-->
|
||||
<!-- <tree editable="bottom">-->
|
||||
<!-- <field name="applicant_id" column_invisible="1"/>-->
|
||||
<!--<!– <field name="yuthon_interview_approval_id"/>–>-->
|
||||
<!-- <field name="stage_id"/>-->
|
||||
<!-- <field name="interview_time"/>-->
|
||||
<!-- -->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
</form>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='department_id']" position="after">
|
||||
<field name="job_type_id"/>
|
||||
<field name="job_lv_id"/>
|
||||
<field name="yuthon_company"/>
|
||||
<field name="establishment_quotas"/>
|
||||
<field name="no_of_employee" string="在编人数"/>
|
||||
@@ -108,7 +107,6 @@
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='department_id']" position="after">
|
||||
<field name="job_type_id"/>
|
||||
<field name="number"/>
|
||||
<field name="establishment_quotas"/>
|
||||
<field name="no_of_employee" string="在编人数"/>
|
||||
|
||||
@@ -64,12 +64,15 @@ class HrApplicant(models.Model):
|
||||
def pub_onboarding_information(self):
|
||||
self.ensure_one()
|
||||
form_id = self.env.ref("yuthon_hr_employee_approval.yuthon_onboard_approval_form").id
|
||||
for user in self.interview_approval_ids:
|
||||
if user.interview_stage_id.name == '未通过':
|
||||
raise UserError('当前人员不允许入职')
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'yuthon.onboard.approval',
|
||||
"views": [[form_id, "form"]],
|
||||
'context': {
|
||||
'default_onboard_id': self.id, },
|
||||
'default_onboard_id': self.id},
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -46,9 +46,11 @@ class YuthonInterviewApproval(models.Model):
|
||||
application_list = []
|
||||
for applicant in self.applicant_ids:
|
||||
application_list.append((0, 0, {'name': applicant.name,
|
||||
'applicant_time': applicant.interview_time,
|
||||
'employee_ids': applicant.employee_ids.ids,
|
||||
'stage_id': applicant.stage_id.id}))
|
||||
return {
|
||||
'name': '面试安排',
|
||||
'name': '面试结果',
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'interview.approval.wizard',
|
||||
@@ -70,6 +72,7 @@ class InterviewApprovalLine(models.Model):
|
||||
tage_ids = fields.Many2many('applicant.tage.setting', string="应聘标签")
|
||||
employee_ids = fields.Many2many('hr.employee', string='面试官')
|
||||
evaluation = fields.Text(string='评价')
|
||||
|
||||
def button_applicant_ids(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
|
||||
@@ -6,9 +6,12 @@ nation_list = [('a', '汉族'), ('b', '壮族'), ('v', '满族'), ('d', '回族'
|
||||
('s', '傣族'), ('t', '畲族'), ('u', '傈僳族'), ('v3', '仡佬族'), ('w', '东乡族'), ('x', '拉祜族'),
|
||||
('y', '水族'), ('z', '佤族'), ('a1', '纳西族'), ('b1', '羌族'), ('c1', '仫佬族'), ('d1', '锡伯族'),
|
||||
('e1', '柯尔克孜族'), ('f1', '达斡尔族'), ('g1', '景颇族'), ('h1', '毛南族'), ('i1', '撒拉族'),
|
||||
('j1', '布朗族'), ('k1', '塔吉克族'), ('l1', '阿昌族'), ('m1', '普米族'), ('n1', '鄂温克族'), ('o1', '怒族'),
|
||||
('p1', '京族'), ('q1', '基诺族'), ('r1', '德昂族'), ('s1', '保安族'), ('t1', '俄罗斯族'), ('u1', '裕固族'),
|
||||
('v1', '乌孜别克族'), ('w1', '门巴族'), ('x1', '鄂伦春族'), ('y1', '独龙族'), ('z1', '塔塔尔族'), ('a2', '赫哲族'),
|
||||
('j1', '布朗族'), ('k1', '塔吉克族'), ('l1', '阿昌族'), ('m1', '普米族'), ('n1', '鄂温克族'),
|
||||
('o1', '怒族'),
|
||||
('p1', '京族'), ('q1', '基诺族'), ('r1', '德昂族'), ('s1', '保安族'), ('t1', '俄罗斯族'),
|
||||
('u1', '裕固族'),
|
||||
('v1', '乌孜别克族'), ('w1', '门巴族'), ('x1', '鄂伦春族'), ('y1', '独龙族'), ('z1', '塔塔尔族'),
|
||||
('a2', '赫哲族'),
|
||||
('b2', '高山族'), ('c2', '珞巴族'), ('d2', '壮族')]
|
||||
|
||||
|
||||
@@ -21,14 +24,14 @@ class YuthonMessageLogin(models.Model):
|
||||
# 基本信息
|
||||
name = fields.Char(string='标题', default="人员信息登记表")
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_message_login_code'))
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_message_login_code'))
|
||||
staff_name = fields.Char(string='姓名')
|
||||
sex = fields.Selection([('male', '男'), ('female', '女')], string='性别')
|
||||
date_birth = fields.Date(string='出生年月')
|
||||
nation = fields.Char(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='户口类型')
|
||||
@@ -49,7 +52,7 @@ class YuthonMessageLogin(models.Model):
|
||||
spouse_phone = fields.Char(string='联系电话')
|
||||
spouse_work = fields.Char(string='工作单位')
|
||||
spouse_position = fields.Char(string='职务')
|
||||
spouse_degree = fields.Char(string='学历')#
|
||||
spouse_degree = fields.Char(string='学历') #
|
||||
# 最近工作情况
|
||||
last_work = fields.Char(string='单位名称')
|
||||
last_work_department = fields.Many2one('hr.department', string="部门")
|
||||
@@ -58,14 +61,7 @@ class YuthonMessageLogin(models.Model):
|
||||
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_position = fields.Selection([("parents", "父母"), ("children", "子女"),
|
||||
("spouse", "配偶"), ("spouse", "其他")], string="关系")
|
||||
is_relatives_work = fields.Boolean(string='本单位是否有亲属')
|
||||
# 附件
|
||||
image_1920 = fields.Image("一寸照")
|
||||
id_card_id = fields.Many2one('documents.document', string='身份证')
|
||||
@@ -84,19 +80,27 @@ class YuthonMessageLogin(models.Model):
|
||||
medical_exam_cost = fields.Float(string='体检费用(含乙肝)')
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
login_document_id = fields.Many2one('ir.attachment', string="简历附件")
|
||||
|
||||
# 紧急联系人
|
||||
emergency_contact_ids = fields.One2many('hr.yuthon.emergency.contact.line', 'message_login_id', string="紧急联系人明细行")
|
||||
emergency_contact_ids = fields.One2many('hr.yuthon.emergency.contact.line', 'message_login_id',
|
||||
string="紧急联系人明细行")
|
||||
# 教育经历
|
||||
education_experience_ids = fields.One2many('hr.yuthon.education.experience.line', 'message_login_id',string="教育经历明细行")
|
||||
education_experience_ids = fields.One2many('hr.yuthon.education.experience.line', 'message_login_id',
|
||||
string="教育经历明细行")
|
||||
# 工作经历
|
||||
work_experience_ids = fields.One2many('hr.yuthon.work.experience.line', 'message_login_id', string="工作经历明细行")
|
||||
# 直属亲属情况
|
||||
direct_relative_ids = fields.One2many('hr.yuthon.directly.detail.lines','message_login_id', string="直属亲属情况明细行")
|
||||
direct_relative_ids = fields.One2many('hr.yuthon.directly.detail.lines', 'message_login_id',
|
||||
string="直属亲属情况明细行")
|
||||
# 个人技能
|
||||
personal_skill_ids = fields.One2many('hr.yuthon.personal.skills.schedule','message_login_id', string="个人技能明细行")
|
||||
personal_skill_ids = fields.One2many('hr.yuthon.personal.skills.schedule', 'message_login_id',
|
||||
string="个人技能明细行")
|
||||
# 最近工作单位
|
||||
last_work_unit_ids = fields.One2many('hr.yuthon.recent.work.detail.line', 'message_login_id', string="最近工作单位情况")
|
||||
last_work_unit_ids = fields.One2many('hr.yuthon.recent.work.detail.line', 'message_login_id',
|
||||
string="最近工作单位情况")
|
||||
# 亲属在本单位
|
||||
kindred_line_ids = fields.One2many('kindred.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="学历证(非全日制)")
|
||||
@@ -122,8 +126,8 @@ class EducationalDetailsLine(models.Model):
|
||||
_name = 'education.details.line'
|
||||
_description = '学历证(全日制)'
|
||||
|
||||
diploma_id = fields.Many2one('yuthon.message.login',string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document',string="毕业证书")
|
||||
diploma_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
graduation_id = fields.Many2one('documents.document', string="毕业证书")
|
||||
validation_reports = fields.Char(string="验证报告")
|
||||
|
||||
|
||||
@@ -151,3 +155,17 @@ class CertificateDetailLine(models.Model):
|
||||
certificate_id = fields.Many2one('yuthon.message.login', string="关联个人信息")
|
||||
professional_certificates_id = fields.Many2one('documents.document', string="专业证书/职称")
|
||||
professional_certificate_validity = fields.Date(string="有效期")
|
||||
|
||||
|
||||
class KindredLine(models.Model):
|
||||
_name = 'kindred.line'
|
||||
_description = '是否有亲属在本单位'
|
||||
|
||||
message_login_id = fields.Many2one('yuthon.message.login', 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="关系")
|
||||
|
||||
@@ -39,4 +39,5 @@ access_yuthon_over_infor_detail_lines,yuthon_over_infor_detail_lines,model_yutho
|
||||
access_yuthon_reward_punishment_details,yuthon_reward_punishment_details,model_yuthon_reward_punishment_details,base.group_user,1,1,1,1
|
||||
access_yuthon_trial_scenario_detail_line,yuthon_trial_scenario_detail_line,model_yuthon_trial_scenario_detail_line,base.group_user,1,1,1,1
|
||||
access_interview_approval_wizard,interview_approval_wizard,model_interview_approval_wizard,base.group_user,1,1,1,1
|
||||
access_interview_approval_wizard_line,interview_approval_wizard_line,model_interview_approval_wizard_line,base.group_user,1,1,1,1
|
||||
access_interview_approval_wizard_line,interview_approval_wizard_line,model_interview_approval_wizard_line,base.group_user,1,1,1,1
|
||||
access_kindred_line,kindred_line,model_kindred_line,base.group_user,1,1,1,1
|
||||
|
@@ -27,7 +27,7 @@
|
||||
<tree editable="bottom">
|
||||
<field name="applicant_id" column_invisible="1"/>
|
||||
<field name="applicant_time"/>
|
||||
<field name="employee_ids"/>
|
||||
<field name="employee_ids" widget="many2many_tags"/>
|
||||
<field name="appraise"/>
|
||||
<field name="interview_stage_id"/>
|
||||
</tree>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<form>
|
||||
<header>
|
||||
<button name="scheduling_of_meetings" string="会议安排" type="object" class='btn btn-primary'/>
|
||||
<button name="put_interview_wizard" string="结束" type="object" class='btn btn-primary'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group col="2">
|
||||
|
||||
@@ -34,12 +34,14 @@
|
||||
<field name="date_birth"/>
|
||||
<field name="nation"/>
|
||||
<field name="is_issues" invisible="1"/>
|
||||
<field name="is_relatives_work"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="political"/>
|
||||
<field name="party_time"/>
|
||||
<field name="house_hold"/>
|
||||
<field name="house_type"/>
|
||||
<field name="login_document_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="phone"/>
|
||||
@@ -56,15 +58,6 @@
|
||||
</group>
|
||||
<div class="oe_clear_row" style="margin: 35px 0">
|
||||
</div>
|
||||
<group>
|
||||
<field name="is_relatives_work"/>
|
||||
<field name="relatives_work" invisible='not is_relatives_work' required="1"/>
|
||||
<field name="relatives_work_department" invisible='not is_relatives_work'/>
|
||||
<field name="relatives_work_phone" invisible='not is_relatives_work'/>
|
||||
<field name="relatives_work_address" invisible='not is_relatives_work'/>
|
||||
<field name="relatives_work_date" invisible='not is_relatives_work'/>
|
||||
<field name="relatives_work_position" invisible='not is_relatives_work'/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="关联议题" invisible="not is_issues">
|
||||
<field name="related_issues_id"/>
|
||||
@@ -173,6 +166,19 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="亲属本单位明细行" invisible="not is_relatives_work">
|
||||
<field name="kindred_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="message_login_id" column_invisible="1"/>
|
||||
<field name="relatives_work"/>
|
||||
<field name="relatives_work_date"/>
|
||||
<field name="relatives_work_phone"/>
|
||||
<field name="relatives_work_address"/>
|
||||
<field name="relatives_work_department"/>
|
||||
<field name="relatives_work_position"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="附件">
|
||||
<group col="2">
|
||||
<group>
|
||||
|
||||
@@ -10,12 +10,21 @@ class InterviewApprovalWizard(models.Model):
|
||||
interview_approval_line_ids = fields.One2many('interview.approval.wizard.line', 'interview_approval_wizard_id', string='面试审批')
|
||||
|
||||
def confirm(self):
|
||||
interview_approval_list = []
|
||||
for interview_approval in self.interview_approval_line_ids:
|
||||
interview_id = self.env['interview.approval.line'].search([('name', '=', interview_approval.name)])
|
||||
interview_id.write({'interview_stage_id': interview_approval.interview_stage_id.id,
|
||||
'evaluation': interview_approval.evaluation})
|
||||
employee_id = self.env['hr.applicant'].search([('partner_name', '=', interview_approval.name)])
|
||||
employee_id.write({'stage_id': interview_approval.interview_stage_id.id})
|
||||
applicant_id = self.env['hr.applicant'].search([('partner_name', '=', interview_approval.name)])
|
||||
interview_approval_list.append([0, 0, {
|
||||
'applicant_id': applicant_id.id,
|
||||
'appraise': interview_approval.evaluation,
|
||||
'applicant_time': interview_approval.applicant_time,
|
||||
'employee_ids': interview_approval.employee_ids,
|
||||
'interview_stage_id': interview_approval.stage_id.id,
|
||||
}])
|
||||
applicant_id.write({'stage_id': interview_approval.interview_stage_id.id,
|
||||
'interview_approval_ids': interview_approval_list})
|
||||
|
||||
|
||||
class InterviewApprovalWizardLine(models.Model):
|
||||
@@ -24,6 +33,8 @@ class InterviewApprovalWizardLine(models.Model):
|
||||
|
||||
interview_approval_wizard_id = fields.Many2one('interview.approval.wizard', string='面试结果弹窗')
|
||||
name = fields.Char(string='姓名')
|
||||
applicant_time = fields.Datetime(string="面试时间")
|
||||
employee_ids = fields.Many2many('hr.employee', string='面试官')
|
||||
stage_id = fields.Many2one('hr.recruitment.stage', string='阶段')
|
||||
interview_stage_id = fields.Many2one('hr.recruitment.stage', string='面试结果')
|
||||
evaluation = fields.Text(string='评价')
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
<form>
|
||||
<field name="interview_approval_line_ids">
|
||||
<tree editable="bottom">
|
||||
<!-- 当前阶段-->
|
||||
<field name="interview_approval_wizard_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="applicant_time"/>
|
||||
<field name="employee_ids" widget="many2many_tags"/>
|
||||
<field name="stage_id" string="当前阶段"/>
|
||||
<field name="interview_stage_id"/>
|
||||
<field name="evaluation"/>
|
||||
|
||||
@@ -156,7 +156,7 @@ class IssueLibrary(models.Model):
|
||||
|
||||
@api.onchange('name')
|
||||
def _onchange_name(self):
|
||||
self.name_text = self.name
|
||||
self.name_text = self.name
|
||||
|
||||
|
||||
@api.onchange('issue_library_room_line_ids')
|
||||
|
||||
@@ -30,41 +30,6 @@
|
||||
name="工会公文管理"
|
||||
sequence="9"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_partner_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="发文单位管理"
|
||||
action="official_partner_action"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_type_menu"
|
||||
parent="official_management_menu_root"
|
||||
name="公文类型管理"
|
||||
action="official_type_action"
|
||||
sequence="15"/>
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- id="yuthon_official_my_admin"-->
|
||||
<!-- parent="yuthon_official_my_menu"-->
|
||||
<!-- name="行政收文"-->
|
||||
<!-- action="send_receive_messages_management_action2"-->
|
||||
<!-- sequence="5"/>-->
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- id="yuthon_official_my_labor"-->
|
||||
<!-- parent="yuthon_official_my_menu"-->
|
||||
<!-- name="工会收文"-->
|
||||
<!-- action="yuthon_official_labor_action2"-->
|
||||
<!-- sequence="6"/>-->
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- id="yuthon_official_my_party"-->
|
||||
<!-- parent="yuthon_official_my_menu"-->
|
||||
<!-- name="党总支收文"-->
|
||||
<!-- action="yuthon_official_party_action2"-->
|
||||
<!-- sequence="7"/>-->
|
||||
|
||||
<menuitem
|
||||
id="yuthon_official_normal"
|
||||
parent="yuthon_official_normal_management_menu"
|
||||
@@ -107,4 +72,24 @@
|
||||
action="yuthon_official_labor_action"
|
||||
sequence="10"/>
|
||||
|
||||
|
||||
<menuitem id="yuthon_official_setting"
|
||||
parent="official_management_menu_root"
|
||||
name="配置"
|
||||
sequence="9"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_partner_menu"
|
||||
parent="yuthon_official_setting"
|
||||
name="发文单位管理"
|
||||
action="official_partner_action"
|
||||
sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
id="official_management_type_menu"
|
||||
parent="yuthon_official_setting"
|
||||
name="公文类型管理"
|
||||
action="official_type_action"
|
||||
sequence="2"/>
|
||||
|
||||
</odoo>
|
||||
@@ -9,4 +9,4 @@ class YuthonPlanApproval(models.Model):
|
||||
job_id = fields.Many2one('hr.job', string="岗位")
|
||||
reason_text = fields.Html(string='申请事由')
|
||||
|
||||
change_plan_ids = fields.One2many("yuthon.plan.management.line",'change_plan_id',string="个人计划变更明细")
|
||||
# change_plan_ids = fields.One2many("yuthon.plan.management.line",'change_plan_id',string="个人计划变更明细")
|
||||
|
||||
@@ -1,31 +1,35 @@
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
import datetime
|
||||
|
||||
class YuthonPlanManagement(models.Model):
|
||||
_name = 'yuthon.plan.management'
|
||||
_description = "计划管理"
|
||||
_description = "个人工作任务"
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char('标题')
|
||||
creation_time = fields.Datetime(string='填报日期', default=lambda self: fields.Datetime.now())
|
||||
job_id = fields.Many2one('hr.job', string="岗位")
|
||||
employee_id = fields.Many2one('hr.employee', string="员工")
|
||||
department_id = fields.Many2one('hr.department', string="部门")
|
||||
plan_ids = fields.One2many('yuthon.plan.management.line','plan_id' ,'计划明细')
|
||||
select_time = fields.Selection([('January','一月'), ('February','二月'), ('March','三月'), ('April','四月'),
|
||||
('May','五月'), ('June','六月'), ('July','七月'), ('August','八月'),
|
||||
('September','九月'), ('October','十月'), ('November','十一月'), ('December','十二月')
|
||||
,('half','上半年'), ('later','下半年')],string='选择时间')
|
||||
|
||||
work_tasks_line_ids = fields.One2many('yuthon.work.tasks.line','plan_id',string='工作任务明细')
|
||||
|
||||
|
||||
class YuthonWorkTasksLine(models.Model):
|
||||
_name = 'yuthon.work.tasks.line'
|
||||
_description = "工作任务明细"
|
||||
|
||||
plan_id = fields.Many2one('yuthon.plan.management','关联个人工作任务')
|
||||
task_type = fields.Selection([('KPI','KPI'),('GS','GS')],string='任务类型')
|
||||
task_name = fields.Many2one('yuthon.index.management',string='任务名称')
|
||||
plan = fields.Char('计划安排及具体措施行动')
|
||||
goal = fields.Char('目标',help="质量、数量、成本等方面要求")
|
||||
resource_requirements = fields.Text('资源需求')
|
||||
summarize = fields.Text('完成情况总结')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class YuthonPlanManagementLine(models.Model):
|
||||
_name = 'yuthon.plan.management.line'
|
||||
_description = "计划管理明细"
|
||||
|
||||
plan_id = fields.Many2one('yuthon.plan.management','计划明细')
|
||||
change_plan_id = fields.Many2one('yuthon.plan.approval','个人计划变更明细')
|
||||
|
||||
index_name = fields.Char('工作任务名称')
|
||||
index_plan = fields.Char('计划安排及具体措施/行动')
|
||||
index_type = fields.Selection([('kpi', 'KPI'),
|
||||
('gs', 'GS'),
|
||||
('refused_index', '否决指标'),],'指标类别')
|
||||
expected_goals = fields.Char('预期目标')
|
||||
resource_requirements = fields.Char('资源要求')
|
||||
completion_summary = fields.Char('完成情况总结')
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_yuthon_index_management,yuthon_index_management,model_yuthon_index_management,base.group_user,1,1,1,1
|
||||
access_yuthon_duty_management,yuthon_duty_management,model_yuthon_duty_management,base.group_user,1,1,1,1
|
||||
access_yuthon_plan_management,yuthon_plan_management,model_yuthon_plan_management,base.group_user,1,1,1,1
|
||||
access_yuthon_plan_management_line,yuthon_plan_management_line,model_yuthon_plan_management_line,base.group_user,1,1,1,1
|
||||
access_yuthon_index_approval,yuthon_index_approval,model_yuthon_index_approval,base.group_user,1,1,1,1
|
||||
access_yuthon_kpi_line,yuthon_kpi_line,model_yuthon_kpi_line,base.group_user,1,1,1,1
|
||||
access_yuthon_gs_line,yuthon_gs_line,model_yuthon_gs_line,base.group_user,1,1,1,1
|
||||
@@ -25,4 +24,5 @@ access_yuthon_index_employee_line,yuthon_index_employee_line,model_yuthon_index_
|
||||
access_new_index_management_line,new_index_management_line,model_new_index_management_line,base.group_user,1,1,1,1
|
||||
access_new_employee_library_line,new_employee_library_line,model_new_employee_library_line,base.group_user,1,1,1,1
|
||||
access_new_kpi_duty_approval,new_kpi_duty_approval,model_new_kpi_duty_approval,base.group_user,1,1,1,1
|
||||
access_new_gs_duty_approval,new_gs_duty_approval,model_new_gs_duty_approval,base.group_user,1,1,1,1
|
||||
access_new_gs_duty_approval,new_gs_duty_approval,model_new_gs_duty_approval,base.group_user,1,1,1,1
|
||||
access_yuthon_work_tasks_line,yuthon_work_tasks_line,model_yuthon_work_tasks_line,base.group_user,1,1,1,1
|
||||
|
@@ -1,72 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- Views -->
|
||||
<record id="yuthon_plan_approval_tree" model="ir.ui.view">
|
||||
<field name="name">yuthon.plan.approval.tree</field>
|
||||
<field name="model">yuthon.plan.approval</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="creation_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Form-->
|
||||
<record id="yuthon_plan_approval_form" model="ir.ui.view">
|
||||
<field name="name">yuthon.plan.approval.form</field>
|
||||
<field name="model">yuthon.plan.approval</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="creation_time"/>
|
||||
<field name="reason_text"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="job_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="计划明细">
|
||||
<field name="change_plan_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id"/>
|
||||
<field name="index_name"/>
|
||||
<field name="index_plan"/>
|
||||
<field name="index_type"/>
|
||||
<field name="expected_goals"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="completion_summary"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <!– Views –>-->
|
||||
<!-- <record id="yuthon_plan_approval_tree" model="ir.ui.view">-->
|
||||
<!-- <field name="name">yuthon.plan.approval.tree</field>-->
|
||||
<!-- <field name="model">yuthon.plan.approval</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree>-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- <field name="creation_time"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <!– Form–>-->
|
||||
<!-- <record id="yuthon_plan_approval_form" model="ir.ui.view">-->
|
||||
<!-- <field name="name">yuthon.plan.approval.form</field>-->
|
||||
<!-- <field name="model">yuthon.plan.approval</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <form>-->
|
||||
<!-- <sheet>-->
|
||||
<!-- <div class="oe_title">-->
|
||||
<!-- <label for="name"/>-->
|
||||
<!-- <h1>-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- </h1>-->
|
||||
<!-- </div>-->
|
||||
<!-- <group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="creation_time"/>-->
|
||||
<!-- <field name="reason_text"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="job_id"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- </group>-->
|
||||
<!-- <notebook>-->
|
||||
<!-- <page string="计划明细">-->
|
||||
<!-- <field name="change_plan_ids">-->
|
||||
<!-- <tree editable="bottom">-->
|
||||
<!-- <field name="plan_id"/>-->
|
||||
<!-- <field name="index_name"/>-->
|
||||
<!-- <field name="index_plan"/>-->
|
||||
<!-- <field name="index_type"/>-->
|
||||
<!-- <field name="expected_goals"/>-->
|
||||
<!-- <field name="resource_requirements"/>-->
|
||||
<!-- <field name="completion_summary"/>-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
<!-- </sheet>-->
|
||||
<!-- </form>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="yuthon_plan_approval_search" model="ir.ui.view">
|
||||
<field name="name">yuthon.plan.approval.search</field>
|
||||
<field name="model">yuthon.plan.approval</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="责任书变更查询">
|
||||
<field name="name"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Action-->
|
||||
<record id="yuthon_plan_approval_action" model="ir.actions.act_window">
|
||||
<field name="name">个人计划变更</field>
|
||||
<field name="res_model">yuthon.plan.approval</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!-- <record id="yuthon_plan_approval_search" model="ir.ui.view">-->
|
||||
<!-- <field name="name">yuthon.plan.approval.search</field>-->
|
||||
<!-- <field name="model">yuthon.plan.approval</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <search string="责任书变更查询">-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- </search>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <!– Action–>-->
|
||||
<!-- <record id="yuthon_plan_approval_action" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">个人计划变更</field>-->
|
||||
<!-- <field name="res_model">yuthon.plan.approval</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
</odoo>
|
||||
@@ -6,10 +6,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="department_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="creation_time"/>
|
||||
<field name="select_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -27,26 +24,188 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
<field name="job_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="employee_id"/>
|
||||
<field name="creation_time"/>
|
||||
</group>
|
||||
<field name="select_time"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="计划明细">
|
||||
<field name="plan_ids">
|
||||
<page string="一月计划详情" invisible="select_time != 'January'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'January')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id"/>
|
||||
<field name="index_name"/>
|
||||
<field name="index_plan"/>
|
||||
<field name="index_type"/>
|
||||
<field name="expected_goals"/>
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="completion_summary"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="二月计划详情" invisible="select_time != 'February'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'February')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="三月计划详情" invisible="select_time != 'March'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'March')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="四月计划详情" invisible="select_time != 'April'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'April')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="五月计划详情" invisible="select_time != 'May'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'May')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="六月计划详情" invisible="select_time != 'June'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'June')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="七月计划详情" invisible="select_time != 'July'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'July')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="八月计划详情" invisible="select_time != 'August'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'August')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="九月计划详情" invisible="select_time != 'September'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'September')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="十月计划详情" invisible="select_time != 'October'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'October')]" >
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="十一月计划详情" invisible="select_time != 'November'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'November')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="十二月计划详情" invisible="select_time != 'December'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'December')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="上半年计划详情" invisible="select_time != 'half'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'half')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="下半年计划详情" invisible="select_time != 'later'">
|
||||
<field name="work_tasks_line_ids" domain="[('select_time', '=', 'later')]">
|
||||
<tree editable="bottom">
|
||||
<field name="plan_id" column_invisible="1"/>
|
||||
<field name="task_type"/>
|
||||
<field name="task_name"/>
|
||||
<field name="plan"/>
|
||||
<field name="goal"/>
|
||||
<field name="resource_requirements"/>
|
||||
<field name="summarize"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -55,23 +214,9 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="yuthon_plan_management_search" model="ir.ui.view">
|
||||
<field name="name">yuthon.plan.management.search</field>
|
||||
<field name="model">yuthon.plan.management</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="计划查询">
|
||||
<field name="department_id"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="creation_time"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action-->
|
||||
<record id="yuthon_plan_management_action" model="ir.actions.act_window">
|
||||
<field name="name">计划管理</field>
|
||||
<field name="name">个人工作任务</field>
|
||||
<field name="res_model">yuthon.plan.management</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user