人事板块的拓展
This commit is contained in:
@@ -50,6 +50,8 @@ class YuthonHrEmployee(models.Model):
|
||||
new_start_contract_data = fields.Date(string="最新合同开始日期")
|
||||
new_end_contract_data = fields.Date(string="最新合同终止日期")
|
||||
open_start_time = fields.Date(string="参加工作时间")
|
||||
social_insurance_date = fields.Date(string="开始缴纳社保日期")
|
||||
social_insurance_time = fields.Integer(string="社保时长")
|
||||
open_start_time_today = fields.Date(string="参加工作时间至今")
|
||||
interrupt_work_month = fields.Integer(string="中断工作月数")
|
||||
cumulative_work_month = fields.Integer(string="累计工作月数")
|
||||
@@ -81,4 +83,47 @@ class YuthonHrEmployee(models.Model):
|
||||
# 假期
|
||||
user_year_holiday_hours = fields.Float(string="已用年假")
|
||||
remainder_year_holiday_hours = fields.Float(string="剩余年假")
|
||||
cumulative_remainder_visit_hours = fields.Float(string="累计剩余探亲假")
|
||||
all_year_holiday_hours = fields.Float(string="年假总数(小时)")
|
||||
|
||||
# 其他信息
|
||||
employment_registration = fields.Text(string="就业登记办理情况")
|
||||
seniority_prize_pick_up_status= fields.Text(string="工龄相关年功奖领取情况")
|
||||
|
||||
@api.onchange('social_insurance_date')
|
||||
def onchange_insurance_time(self):
|
||||
for social in self:
|
||||
social.social_insurance_time = (fields.Datetime.now().date() - social.social_insurance_date).days
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,16 +24,20 @@
|
||||
<field name="private_street" placeholder="Street..." class="o_address_street"/>
|
||||
<field name="private_street2" placeholder="Street 2..." class="o_address_street"/>
|
||||
<field name="private_city" placeholder="City" class="o_address_city"/>
|
||||
<field name="private_state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" context="{'default_country_id': private_country_id}"/>
|
||||
<field name="private_state_id" class="o_address_state" placeholder="State"
|
||||
options="{'no_open': True, 'no_quick_create': True}"
|
||||
context="{'default_country_id': private_country_id}"/>
|
||||
<field name="private_zip" placeholder="ZIP" class="o_address_zip"/>
|
||||
<field name="private_country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
|
||||
<field name="private_country_id" placeholder="Country" class="o_address_country"
|
||||
options='{"no_open": True, "no_create": True}'/>
|
||||
</div>
|
||||
<field name="private_email" string="邮箱"/>
|
||||
<field name="private_phone" string="电话"/>
|
||||
<!-- 增加两个字段 -->
|
||||
<field name="user_salary"/>
|
||||
<field name="job_lv_salary"/>
|
||||
<field name="bank_account_id" context="{'default_partner_id': work_contact_id}" options="{'no_quick_create': True}" readonly="not id"/>
|
||||
<field name="bank_account_id" context="{'default_partner_id': work_contact_id}"
|
||||
options="{'no_quick_create': True}" readonly="not id"/>
|
||||
<field name="entry_time"/>
|
||||
<field name="confirmation_time"/>
|
||||
<field name="company_old"/>
|
||||
@@ -106,18 +110,20 @@
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='active_group']" position="after">
|
||||
<group string="工作信息">
|
||||
<field name="new_start_contract_data"/>
|
||||
<field name="new_end_contract_data"/>
|
||||
<field name="open_start_time"/>
|
||||
<field name="open_start_time_today"/>
|
||||
<field name="interrupt_work_month"/>
|
||||
<field name="cumulative_work_month"/>
|
||||
<field name="cumulative_work_years"/>
|
||||
</group>
|
||||
<field name="new_start_contract_data"/>
|
||||
<field name="new_end_contract_data"/>
|
||||
<field name="open_start_time"/>
|
||||
<field name="open_start_time_today"/>
|
||||
<field name="social_insurance_date"/>
|
||||
<field name="social_insurance_time"/>
|
||||
<field name="interrupt_work_month"/>
|
||||
<field name="cumulative_work_month"/>
|
||||
<field name="cumulative_work_years"/>
|
||||
</group>
|
||||
<group string="其他">
|
||||
<field name="archiving_agency"/>
|
||||
<field name="over_data_time"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='public']//group[@name='departure']" position="after">
|
||||
<group name="overtime" string="加班">
|
||||
@@ -131,9 +137,22 @@
|
||||
<group name="holiday" string="假期">
|
||||
<field name="user_year_holiday_hours"/>
|
||||
<field name="remainder_year_holiday_hours"/>
|
||||
<field name="cumulative_remainder_visit_hours"/>
|
||||
<field name="all_year_holiday_hours"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='personal_information']" position="after">
|
||||
<page string="其他信息">
|
||||
<group>
|
||||
<group>
|
||||
<field name="employment_registration"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="seniority_prize_pick_up_status"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user