添加功能
This commit is contained in:
@@ -13,7 +13,7 @@ class HrContract(models.Model):
|
||||
resource_calendar_id = fields.Many2one('resource.calendar', string='考勤时间表')
|
||||
date_of_entry = fields.Date(related='employee_id.entry_date', string="入职时间")
|
||||
salary_group_id = fields.Many2one('yuthon.salary.group', string="工资单分组", store=True, index=True)
|
||||
|
||||
is_internship = fields.Boolean(string="实习期", compute='_compute_name', store=True)
|
||||
work_entry_source = fields.Selection([
|
||||
('calendar', '考勤安排'),
|
||||
('attendance', 'Attendances'),
|
||||
@@ -38,6 +38,9 @@ class HrContract(models.Model):
|
||||
record.name = record.employee_id.name + record.contract_type_id.name + '合同'
|
||||
else:
|
||||
record.name = ' '
|
||||
if record.contract_type_id:
|
||||
if record.contract_type_id.name == '实习协议':
|
||||
record.is_internship = True
|
||||
|
||||
def action_hr_contract(self):
|
||||
return {
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='contract_type_id']" position="after">
|
||||
<field name="is_probation"/>
|
||||
<field name="salary_day" invisible="not is_internship"/>
|
||||
<field name="salary_group_id"/>
|
||||
<field name="salary_day" invisible="not is_probation"/>
|
||||
<field name="is_internship" invisible="1"/>
|
||||
<field name="start_date" invisible="not is_probation" string="试用开始日期"/>
|
||||
<field name="end_date" invisible="not is_probation" string="试用开始日期"/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user