@@ -450,22 +450,18 @@ class YuthonHrEmployee(models.Model):
|
||||
for record in self:
|
||||
if record.entry_date:
|
||||
today = datetime.now().date()
|
||||
record.company_old_year = today.year - record.entry_date.year + 1
|
||||
# 原有的完整年月计算保持不变
|
||||
years_diff = today.year - record.entry_date.year
|
||||
months_diff = today.month - record.entry_date.month
|
||||
if today.month < record.entry_date.month:
|
||||
years_diff -= 1
|
||||
months_diff += 12
|
||||
record.company_old = str(years_diff) + '年' + str(months_diff) + '月'
|
||||
record.company_old_year = years_diff
|
||||
else:
|
||||
record.company_old = None
|
||||
record.company_old_year = 0
|
||||
|
||||
record.is_accum_salary = True
|
||||
if record.entry_date:
|
||||
if record.entry_date.year == fields.Date.today().year and record.entry_date.month == fields.Date.today().month:
|
||||
record.is_accum_salary = False
|
||||
|
||||
@api.depends('open_start_time', 'interrupt_work_month')
|
||||
def _compute_social_insurance_info(self):
|
||||
for record in self:
|
||||
|
||||
@@ -279,11 +279,12 @@ class InheritHrPayslip(models.Model):
|
||||
|
||||
@api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'study_on', 'post_salary', 'seniority_allowance',
|
||||
'seniority_salary','commuting_allowance', 'base_salary' , 'performance_bonuses', 'comprehensive_subsidy',
|
||||
'full_attendance_award', 'overtime_pay', 'based_pay', 'january_performance', 'position_subsidy',
|
||||
'full_attendance_award', 'overtime_pay', 'based_pay', 'january_performance', 'position_subsidy', 'safety_incentives',
|
||||
'temporary_performance_bonus', 'performance_deduction', 'commuting_deduction', 'base_salary_deduction', 'last_year_performance_evaluation')
|
||||
def _compute_total_before_tax(self):
|
||||
for record in self:
|
||||
record.total_before_tax = (
|
||||
record.safety_incentives +
|
||||
record.comprehensive_subsidy +
|
||||
record.position_subsidy +
|
||||
record.last_year_performance_evaluation +
|
||||
|
||||
Reference in New Issue
Block a user