添加功能
This commit is contained in:
@@ -126,6 +126,8 @@ class InheritHrPayslip(models.Model):
|
||||
|
||||
# 粮储临时项
|
||||
medical_fee = fields.Float(string='超出体检费标准')
|
||||
retroactive_insurance = fields.Float(string='补扣保险')
|
||||
distribution_part = fields.Float(string='扣除环境作业津贴多发放部分')
|
||||
|
||||
performance_deduction = fields.Float(string='扣发绩效奖金', compute='_compute_deduction', store=True)
|
||||
commuting_deduction = fields.Float(string='扣发通信补贴', compute='_compute_deduction', store=True)
|
||||
@@ -284,12 +286,14 @@ class InheritHrPayslip(models.Model):
|
||||
|
||||
@api.depends('year_compute', 'year_jie', 'year_gong', 'jing_te', 'study_on', 'seniority_allowance', 'position_salary',
|
||||
'quality_allowance','high_subsidy', 'environmental_allowance', 'last_duty', 'seniority_salary', 'commuting_allowance','base_salary','performance_bonuses', 'comprehensive_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', 'safety_subsidy', 'job_performance','leave_allowance', 'medical_fee',
|
||||
'january_performance','position_subsidy', 'safety_incentives', 'temporary_performance_bonus', 'performance_deduction','commuting_deduction', 'retroactive_insurance',
|
||||
'base_salary_deduction', 'last_year_performance_evaluation', 'safety_subsidy', 'job_performance','leave_allowance', 'distribution_part',
|
||||
'duty', 'monthly_overtime', 'annuity', 'excellent_employees', 'leave_absence', 'retention_previous_year')
|
||||
def _compute_total_before_tax(self):
|
||||
for record in self:
|
||||
record.total_before_tax = (
|
||||
record.retroactive_insurance +
|
||||
record.distribution_part +
|
||||
record.retention_previous_year +
|
||||
record.position_salary +
|
||||
record.high_subsidy +
|
||||
@@ -329,7 +333,6 @@ class InheritHrPayslip(models.Model):
|
||||
record.performance_deduction -
|
||||
record.commuting_deduction -
|
||||
record.base_salary_deduction -
|
||||
record.medical_fee -
|
||||
record.leave_allowance # 请假扣发
|
||||
)
|
||||
|
||||
@@ -337,10 +340,10 @@ class InheritHrPayslip(models.Model):
|
||||
|
||||
# 本期应收 - 三险一金 - 年金 - 应补退税 - 工会会费 - 个税退回
|
||||
# total_before_tax - three_one - b_year - union_dues - tax_payable - individual_tax_refund
|
||||
@api.depends('total_before_tax', 'three_one', 'b_year', 'union_dues', 'tax_payable', 'individual_tax_refund')
|
||||
@api.depends('total_before_tax', 'three_one', 'b_year', 'union_dues', 'tax_payable', 'individual_tax_refund', 'medical_fee')
|
||||
def _compute_actual_salary(self):
|
||||
for record in self:
|
||||
record.actual_salary = (record.total_before_tax - record.three_one - record.b_year - record.union_dues - record.tax_payable + record.individual_tax_refund)
|
||||
record.actual_salary = (record.total_before_tax - record.three_one - record.b_year - record.union_dues - record.tax_payable + record.individual_tax_refund - record.medical_fee)
|
||||
if record.employee_id.name == '罗梦烨':
|
||||
_logger.info("罗梦烨实发{} 本期应:{},31:{},年金:{}应补:{}工会{}个税{}".format(record.actual_salary, record.total_before_tax,
|
||||
record.three_one, record.b_year, record.union_dues,
|
||||
|
||||
@@ -293,6 +293,8 @@
|
||||
<field name="study_on" decoration-danger="1" optional="show" groups="yuthon_salary.group_jtbb_user"/>
|
||||
<field name="excellent_employees" decoration-danger="1" groups="yuthon_salary.group_wg_user" optional="show"/>
|
||||
<field name="medical_fee" decoration-danger="1" groups="yuthon_salary.group_lc_user" optional="show"/>
|
||||
<field name="retroactive_insurance" decoration-danger="1" groups="yuthon_salary.group_lc_user" optional="show"/>
|
||||
<field name="distribution_part" decoration-danger="1" groups="yuthon_salary.group_lc_user" optional="show"/>
|
||||
<field name="commuting_deduction" decoration-danger="1" optional="show" groups="yuthon_salary.group_jtbb_user"/>
|
||||
<field name="performance_deduction" decoration-danger="1" optional="show" groups="yuthon_salary.group_jtbb_user"/>
|
||||
<field name="retention_previous_year" decoration-danger="1" optional="show" groups="yuthon_salary.group_jtbb_user"/>
|
||||
|
||||
Reference in New Issue
Block a user