@@ -19,6 +19,10 @@ class YuthonSalaryActive(models.Model):
|
||||
|
||||
employee_id = fields.Many2one('hr.employee', string='员工', required=True)
|
||||
company_id = fields.Many2one('res.company', string='公司', related='employee_id.company_id', store=True)
|
||||
department_id = fields.Many2one('hr.department', related='employee_id.department_id', string="部门", store=True)
|
||||
company_old = fields.Char(related='employee_id.company_old', string="司龄", store=True)
|
||||
onboarding_time = fields.Date(related='employee_id.entry_date', string="入职日期")
|
||||
confirm_status = fields.Selection([('todo', '待发送'), ('un_confirm', '待确认'), ('confirm', '已确认')], string='状态',default='todo')
|
||||
select_time = fields.Selection([('1', '一月'), ('2', '二月'), ('3', '三月'), ('4', '四月'),
|
||||
('5', '五月'), ('6', '六月'), ('7', '七月'), ('8', '八月'),
|
||||
('9', '九月'), ('10', '十月'), ('11', '十一月'),
|
||||
@@ -28,7 +32,6 @@ class YuthonSalaryActive(models.Model):
|
||||
basic_salary = fields.Float(string='基本工资')
|
||||
rank_salary = fields.Float(string='职级工资')
|
||||
pre_performance_bonus = fields.Float(string='预发绩效奖金')
|
||||
meal_allowance = fields.Float(string='误餐费')
|
||||
post_salary = fields.Float(string='岗位工资')
|
||||
communication_subsidy = fields.Float(string='通讯补贴')
|
||||
seniority_wage = fields.Float(string='工龄工资')
|
||||
@@ -36,31 +39,45 @@ class YuthonSalaryActive(models.Model):
|
||||
full_attendance_bonus = fields.Float(string='全勤奖')
|
||||
basic_year_end_bonus = fields.Float(string='基础年终奖')
|
||||
|
||||
liquidation_salary_leader = fields.Float(string='2024年清算工资(领导)')
|
||||
balance_salary = fields.Float(string='2025年结余工资')
|
||||
liquidation_salary_staff = fields.Float(string='2024年清算工资(职工)') #
|
||||
business_special_bonus = fields.Float(string='2025经营特别奖')
|
||||
# 清算/结余/奖励类字段
|
||||
salary_liquidation_2024_leader = fields.Float(string='2024年清算工资(领导)')
|
||||
salary_balance_2025 = fields.Float(string='2025年结余工资')
|
||||
salary_liquidation_2024_staff = fields.Float(string='2024年清算工资(职工)')
|
||||
business_special_bonus_2025 = fields.Float(string='2025经营特别奖')
|
||||
|
||||
# 扣发类字段
|
||||
deduct_performance_bonus = fields.Float(string='扣发绩效奖金')
|
||||
deduct_communication_subsidy = fields.Float(string='扣发通讯补贴')
|
||||
attendance_deduction = fields.Float(string='考勤扣发')
|
||||
|
||||
# 合计/社保/税费类字段(float 类型)
|
||||
# 合计/社保/税费基础类字段
|
||||
total_pre_tax_salary = fields.Float(string='税前工资合计')
|
||||
basic_endowment_insurance = fields.Float(string='基本养老保险费')
|
||||
basic_medical_insurance = fields.Float(string='基本医疗保险费')
|
||||
unemployment_insurance = fields.Float(string='失业保险费')
|
||||
housing_fund = fields.Float(string='住房公积金')
|
||||
enterprise_annuity = fields.Float(string='企业(职业)年金')
|
||||
tax_adjustment = fields.Float(string='应补(退)税额')
|
||||
trade_union_dues = fields.Float(string='工会会费')
|
||||
personal_payment_total_including_annuity = fields.Float(string='个人缴纳合计(含年金)')
|
||||
|
||||
# 实发/福利类字段(float 类型)
|
||||
# 专项附加扣除类字段
|
||||
cumulative_children_education = fields.Float(string='累计子女教育')
|
||||
cumulative_support_elderly = fields.Float(string='累计赡养老人')
|
||||
cumulative_housing_loan_interest = fields.Float(string='累计住房贷款利息')
|
||||
cumulative_housing_rent = fields.Float(string='累计住房租金')
|
||||
cumulative_continue_education = fields.Float(string='累计继续教育')
|
||||
cumulative_infant_care_under_3 = fields.Float(string='累计3岁以下婴幼儿照护')
|
||||
|
||||
# 个税计算类字段
|
||||
cumulative_taxable_income = fields.Float(string='累计应纳税所得额')
|
||||
tax_rate_withholding_rate = fields.Float(string='税率/预扣率')
|
||||
tax_adjustment = fields.Float(string='应补(退)税额')
|
||||
|
||||
trade_union_dues = fields.Float(string='工会会费')
|
||||
actual_paid_salary = fields.Float(string='实发工资')
|
||||
meal_allowance = fields.Float(string='误餐费')
|
||||
reimbursed_medical_exam_fee = fields.Float(string='已报销体检费')
|
||||
remaining_medical_exam_fee = fields.Float(string='剩余体检费')
|
||||
|
||||
|
||||
def payslip_wizard(self):
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
@@ -73,6 +90,17 @@ class YuthonSalaryActive(models.Model):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def open_archive_record(self):
|
||||
return {
|
||||
'name': '工资条',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'yuthon.salary.active',
|
||||
'view_mode': 'tree',
|
||||
'domain': [('employee_id', '=', self.employee_id.id)],
|
||||
}
|
||||
|
||||
|
||||
def _get_default_month(self):
|
||||
current_month = datetime.now().month
|
||||
return str(current_month)
|
||||
@@ -8,13 +8,79 @@
|
||||
<!-- 核心关联字段:员工 -->
|
||||
<button type="object" name="payslip_wizard" string="发放" class="oe_highlight"/>
|
||||
<field name="employee_id" string="员工"/>
|
||||
<field name="department_id" column_invisible="1"/>
|
||||
<field name="company_id" column_invisible="1"/>
|
||||
<field name="company_old" column_invisible="1"/>
|
||||
<field name="onboarding_time" column_invisible="1"/>
|
||||
<field name="select_time" column_invisible="1"/>
|
||||
<field name="select_year" column_invisible="1"/>
|
||||
|
||||
<!-- 基础薪资字段 -->
|
||||
<field name="basic_salary" string="基本工资"/>
|
||||
<field name="rank_salary" string="职级工资"/>
|
||||
<field name="pre_performance_bonus" string="预发绩效奖金"/>
|
||||
<field name="post_salary" string="岗位工资"/>
|
||||
<field name="communication_subsidy" string="通讯补贴"/>
|
||||
<field name="seniority_wage" string="工龄工资"/>
|
||||
<field name="overtime_pay" string="加班费"/>
|
||||
<field name="full_attendance_bonus" string="全勤奖"/>
|
||||
<field name="basic_year_end_bonus" string="基础年终奖"/>
|
||||
|
||||
<!-- 清算/结余/奖励类字段 -->
|
||||
<field name="salary_liquidation_2024_leader" string="2024年清算工资(领导)"/>
|
||||
<field name="salary_balance_2025" string="2025年结余工资"/>
|
||||
<field name="salary_liquidation_2024_staff" string="2024年清算工资(职工)"/>
|
||||
<field name="business_special_bonus_2025" string="2025经营特别奖"/>
|
||||
|
||||
<!-- 扣发类字段 -->
|
||||
<field name="deduct_performance_bonus" string="扣发绩效奖金"/>
|
||||
<field name="deduct_communication_subsidy" string="扣发通讯补贴"/>
|
||||
<field name="attendance_deduction" string="考勤扣发"/>
|
||||
|
||||
<!-- 合计/社保/税费基础类字段 -->
|
||||
<field name="total_pre_tax_salary" string="税前工资合计"/>
|
||||
<field name="basic_endowment_insurance" string="基本养老保险费"/>
|
||||
<field name="basic_medical_insurance" string="基本医疗保险费"/>
|
||||
<field name="unemployment_insurance" string="失业保险费"/>
|
||||
<field name="housing_fund" string="住房公积金"/>
|
||||
<field name="enterprise_annuity" string="企业(职业)年金"/>
|
||||
<field name="personal_payment_total_including_annuity" string="个人缴纳合计(含年金)"/>
|
||||
|
||||
<!-- 专项附加扣除类字段 -->
|
||||
<field name="cumulative_children_education" string="累计子女教育"/>
|
||||
<field name="cumulative_support_elderly" string="累计赡养老人"/>
|
||||
<field name="cumulative_housing_loan_interest" string="累计住房贷款利息"/>
|
||||
<field name="cumulative_housing_rent" string="累计住房租金"/>
|
||||
<field name="cumulative_continue_education" string="累计继续教育"/>
|
||||
<field name="cumulative_infant_care_under_3" string="累计3岁以下婴幼儿照护"/>
|
||||
|
||||
<!-- 个税计算类字段 -->
|
||||
<field name="cumulative_taxable_income" string="累计应纳税所得额"/>
|
||||
<field name="tax_rate_withholding_rate" string="税率/预扣率"/>
|
||||
<field name="tax_adjustment" string="应补(退)税额"/>
|
||||
|
||||
<!-- 最终结算类字段 -->
|
||||
<field name="trade_union_dues" string="工会会费"/>
|
||||
<field name="actual_paid_salary" string="实发工资"/>
|
||||
<field name="meal_allowance" string="误餐费"/>
|
||||
<field name="reimbursed_medical_exam_fee" string="已报销体检费"/>
|
||||
<field name="remaining_medical_exam_fee" string="剩余体检费"/>
|
||||
<field name="confirm_status"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="my_yuthon_salary_active_tree" model="ir.ui.view">
|
||||
<field name="name">my.yuthon.salary.active.tree</field>
|
||||
<field name="model">yuthon.salary.active</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="我的薪资" create="false" delete="false" edit="false">
|
||||
<button name="payslip_wizard" string="发送" type="object" class="oe_highlight" invisible="confirm_status == 'confirm'"/>
|
||||
<button name="open_archive_record" string="详情" type="object" class="oe_highlight" invisible="confirm_status == 'confirm'"/>
|
||||
<field name="basic_salary" string="基本工资"/>
|
||||
<field name="rank_salary" string="职级工资"/>
|
||||
<field name="pre_performance_bonus" string="预发绩效奖金"/>
|
||||
<field name="meal_allowance" string="误餐费"/>
|
||||
<field name="post_salary" string="岗位工资"/>
|
||||
<field name="post_salary" string="岗位工资"/>
|
||||
<field name="communication_subsidy" string="通讯补贴"/>
|
||||
<field name="seniority_wage" string="工龄工资"/>
|
||||
@@ -31,25 +97,24 @@
|
||||
<field name="deduct_performance_bonus" string="扣发绩效奖金"/>
|
||||
<field name="deduct_communication_subsidy" string="扣发通讯补贴"/>
|
||||
<field name="attendance_deduction" string="考勤扣发"/>
|
||||
<field name="confirm_status"/>
|
||||
<field name="personal_payment_total_including_annuity" string="个人缴纳合计(含年金)"/>
|
||||
<field name="tax_adjustment" string="应补(退)税额"/>
|
||||
|
||||
<!-- 合计/社保/税费类字段 -->
|
||||
<field name="total_pre_tax_salary" string="税前工资合计"/>
|
||||
<field name="basic_endowment_insurance" string="基本养老保险费"/>
|
||||
<field name="basic_medical_insurance" string="基本医疗保险费"/>
|
||||
<field name="unemployment_insurance" string="失业保险费"/>
|
||||
<field name="housing_fund" string="住房公积金"/>
|
||||
<field name="enterprise_annuity" string="企业(职业)年金"/>
|
||||
<field name="tax_adjustment" string="应补(退)税额"/>
|
||||
<!-- 最终结算类字段 -->
|
||||
<field name="trade_union_dues" string="工会会费"/>
|
||||
|
||||
<field name="actual_paid_salary" string="实发工资"/>
|
||||
<field name="meal_allowance" string="误餐费"/>
|
||||
<field name="reimbursed_medical_exam_fee" string="已报销体检费"/>
|
||||
<field name="remaining_medical_exam_fee" string="剩余体检费"/>
|
||||
<field name="select_time" column_invisible="1"/>
|
||||
<field name="select_year" column_invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="yuthon_salary_active_my_action" model="ir.actions.act_window">
|
||||
<field name="name">我的薪资</field>
|
||||
<field name="res_model">yuthon.salary.active</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
<record id="yuthon_salary_active_action" model="ir.actions.act_window">
|
||||
<field name="name">薪资归档</field>
|
||||
<field name="res_model">yuthon.salary.active</field>
|
||||
|
||||
@@ -762,7 +762,7 @@
|
||||
<menuitem id="menu_hr_attendance_my_record_board" name="我的考勤" action="yuthon_hr_attendance.hr_attendance_action1" sequence="65"/>
|
||||
<menuitem id="menu_hr_attendance_my_abnormal_board" name="我的异常" action="yuthon_hr_attendance.hr_attendance_my_abnormal" sequence="70"/>
|
||||
<menuitem id="yuthon_vacation_reports_my" name="考勤确认单" action="yuthon_hr_attendance.action_server_open_my_vacation_form1" sequence="75"/>
|
||||
<menuitem id="yuthon_vacation_reports_my" name="工资条" action="yuthon_salary.action_view_my_payslip" sequence="80"/>
|
||||
<menuitem id="yuthon_vacation_reports_my" name="工资条" action="yuthon_salary.yuthon_salary_active_my_action" sequence="80"/>
|
||||
<menuitem id="yuthon_meal_expenses_my_board" name="餐费" action="yuthon_salary.view_my_yuthon_meal_expenses_action" sequence="85"/>
|
||||
<menuitem id="property_device_repair_action_brand" name="报事报修" action="yuthon_maintain.property_device_repair_action" sequence="90"/>
|
||||
<menuitem id="property_device_repair_action_brand_all" name="报事报修(管理员)" action="yuthon_maintain.property_device_repair_all_action" groups="base.group_system" sequence="95"/>
|
||||
|
||||
Reference in New Issue
Block a user