diff --git a/yuthon_salary/models/yuthon_salary_active.py b/yuthon_salary/models/yuthon_salary_active.py
index 5ff7a113e..d8618fb0d 100644
--- a/yuthon_salary/models/yuthon_salary_active.py
+++ b/yuthon_salary/models/yuthon_salary_active.py
@@ -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)
\ No newline at end of file
diff --git a/yuthon_salary/views/yuthon_salary_active_views.xml b/yuthon_salary/views/yuthon_salary_active_views.xml
index c4d731c6f..f8a6a7e00 100644
--- a/yuthon_salary/views/yuthon_salary_active_views.xml
+++ b/yuthon_salary/views/yuthon_salary_active_views.xml
@@ -8,13 +8,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ my.yuthon.salary.active.tree
+ yuthon.salary.active
+
+
+
+
+
+
+
+
+
@@ -31,25 +97,24 @@
+
+
+
-
-
-
-
-
-
-
-
+
-
+
-
-
+
+ 我的薪资
+ yuthon.salary.active
+ tree
+
薪资归档
yuthon.salary.active
diff --git a/yuthon_work_brand/views/hr_menus.xml b/yuthon_work_brand/views/hr_menus.xml
index 69bf609f7..d00d13103 100644
--- a/yuthon_work_brand/views/hr_menus.xml
+++ b/yuthon_work_brand/views/hr_menus.xml
@@ -762,7 +762,7 @@
-
+