添加功能
This commit is contained in:
@@ -8,12 +8,10 @@ class HrYuthonEmergencyContactLine(models.Model):
|
||||
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="工作单位")
|
||||
post = fields.Char(string="岗位")
|
||||
phone_number = fields.Char(string="手机号")
|
||||
home_address = fields.Char(string="家庭住址")
|
||||
|
||||
class HrYuthonWorkExperienceLine(models.Model):
|
||||
_name = 'hr.yuthon.work.experience.line'
|
||||
@@ -22,12 +20,12 @@ class HrYuthonWorkExperienceLine(models.Model):
|
||||
employee_id = fields.Many2one('hr.employee', string="关联员工")
|
||||
message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
|
||||
start_date = fields.Date(string="开始日期")
|
||||
department = fields.Char(string="部门")
|
||||
end_date = fields.Date(string="结束日期")
|
||||
work_place = fields.Char(string="工作单位")
|
||||
post = fields.Char(string="岗位")
|
||||
contact_user = fields.Char(string="联系人")
|
||||
phone_number = fields.Char(string="联系人手机号")
|
||||
reason_leaving = fields.Char(string="离职原因")
|
||||
|
||||
|
||||
class HrYuthonEducationExperienceLine(models.Model):
|
||||
@@ -69,7 +67,6 @@ class HrYuthonDirectlyDetailLines(models.Model):
|
||||
("spouse", "配偶"), ("spouse", "其他")], string="关系")
|
||||
workplace = fields.Char(string='工作单位及职务')
|
||||
phone = fields.Char(string='联系电话')
|
||||
email = fields.Char(string='邮箱')
|
||||
|
||||
|
||||
class HrYuthonMostRecentWorkDetailLine(models.Model):
|
||||
@@ -84,6 +81,16 @@ class HrYuthonMostRecentWorkDetailLine(models.Model):
|
||||
last_training = fields.Char(string='培训')
|
||||
last_work_reason = fields.Char(string='离职原因')
|
||||
|
||||
|
||||
class AwardsLine(models.Model):
|
||||
_name = 'awards.line'
|
||||
_description = "获奖情况"
|
||||
|
||||
message_login_id = fields.Many2one('yuthon.message.login', string="关联信息登记")
|
||||
name = fields.Char(string='项目')
|
||||
date = fields.Date(string='时间')
|
||||
|
||||
|
||||
class YuthonTrialScenarioDetailLine(models.Model):
|
||||
_name = 'yuthon.trial.scenario.detail.line'
|
||||
_description = "试用方案明细行 "
|
||||
|
||||
@@ -43,6 +43,7 @@ class YuthonMessageLogin(models.Model):
|
||||
working_time = fields.Date(string='参加工作时间')
|
||||
current_address = fields.Char(string='现居住地址')
|
||||
phone = fields.Char(string='手机')
|
||||
id_card = fields.Char(string='身份证号')
|
||||
residential_phone = fields.Char(string='住宅电话')
|
||||
email = fields.Char(string='电子邮箱')
|
||||
home_address = fields.Char(string='家庭住址')
|
||||
@@ -113,6 +114,10 @@ class YuthonMessageLogin(models.Model):
|
||||
# 最近工作单位
|
||||
last_work_unit_ids = fields.One2many('hr.yuthon.recent.work.detail.line', 'message_login_id',
|
||||
string="最近工作单位情况")
|
||||
|
||||
# 获奖情况
|
||||
awards_line_ids = fields.One2many('awards.line', 'message_login_id', string="获奖情况明细行")
|
||||
|
||||
# 亲属在本单位
|
||||
kindred_line_ids = fields.One2many('kindred.line', 'message_login_id', string="最近工作单位情况")
|
||||
# 附件
|
||||
|
||||
@@ -53,3 +53,4 @@ access_department_change_approval_line,department_change_approval_line,model_dep
|
||||
access_department_change_approval_line2,department_change_approval_line2,model_department_change_approval_line2,base.group_user,1,1,1,1
|
||||
access_yuthon_renewal_approval,yuthon_renewal_approval,model_yuthon_renewal_approval,base.group_user,1,1,1,1
|
||||
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
|
||||
|
||||
|
@@ -54,7 +54,6 @@
|
||||
</div>
|
||||
<group col="4" string="基本情况">
|
||||
<group>
|
||||
<field name="issues_result" invisible="is_issues == False"/>
|
||||
<field name="staff_name" required="1"/>
|
||||
<field name="users_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
@@ -62,10 +61,10 @@
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="date_birth"/>
|
||||
<field name="nation"/>
|
||||
<field name="is_issues"/>
|
||||
<field name="is_relatives_work"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="id_card"/>
|
||||
<field name="political"/>
|
||||
<field name="party_time"/>
|
||||
<field name="house_hold"/>
|
||||
@@ -94,10 +93,17 @@
|
||||
<field name="name" required="1"/>
|
||||
<field name="message_login_id" column_invisible="1"/>
|
||||
<field name="user_relationship"/>
|
||||
<field name="user_sfz"/>
|
||||
<field name="workplace"/>
|
||||
<field name="phone_number"/>
|
||||
<field name="home_address"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="获奖情况">
|
||||
<field name="awards_line_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="message_login_id" column_invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -108,10 +114,10 @@
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="work_place"/>
|
||||
<field name="department"/>
|
||||
<field name="post"/>
|
||||
<field name="contact_user"/>
|
||||
<field name="phone_number"/>
|
||||
<field name="reason_leaving"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -167,7 +173,7 @@
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page string="直属亲戚信息">
|
||||
<page string="其他家庭主要成员">
|
||||
<field name="direct_relative_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="message_login_id" column_invisible="1"/>
|
||||
@@ -175,20 +181,6 @@
|
||||
<field name="relational"/>
|
||||
<field name="workplace"/>
|
||||
<field name="phone"/>
|
||||
<field name="email"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="最近工作情况">
|
||||
<field name="last_work_unit_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="message_login_id" column_invisible="1"/>
|
||||
<field name="position" required="1"/>
|
||||
<field name="post"/>
|
||||
<field name="last_department"/>
|
||||
<field name="work_grades"/>
|
||||
<field name="last_training"/>
|
||||
<field name="last_work_reason"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -274,16 +274,12 @@ class SalaryComputeWizard(models.Model):
|
||||
setattr(internship_id, field_name, result)
|
||||
line.write({'total': result})
|
||||
|
||||
# year = int(self.select_year)
|
||||
# month = int(self.select_time)
|
||||
# zhangyun_payslips = self.env['hr.payslip'].search([
|
||||
# ('employee_id.name', '=', '张云'),
|
||||
# ('is_push', '=', False)
|
||||
# ], limit=1)
|
||||
# for rec2 in zhangyun_payslips:
|
||||
# if not self._is_employee_turnover(rec2.employee_id, year, month) and not self._is_employee_in_probation(
|
||||
# rec2.employee_id, year, month):
|
||||
# rec2.compute_sheet()
|
||||
year = int(self.select_year)
|
||||
month = int(self.select_time)
|
||||
for rec2 in self.env['hr.payslip'].search(['is_push', '=', False]):
|
||||
if not self._is_employee_turnover(rec2.employee_id, year, month) and not self._is_employee_in_probation(
|
||||
rec2.employee_id, year, month):
|
||||
rec2.compute_sheet()
|
||||
|
||||
def _get_chinese_month(self, month):
|
||||
chinese_months = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
|
||||
|
||||
Reference in New Issue
Block a user