Merge pull request !2033 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-03-23 09:24:07 +00:00
committed by Gitee
2 changed files with 31 additions and 1 deletions
@@ -43,6 +43,11 @@ class InheritHrPayslip(models.Model):
work_injury_insurance = fields.Float(string='工伤保险费', compute='_compute_salary', store=True)
housing_provident_fund = fields.Float(string='住房公积金', compute='_compute_salary', store=True)
total_before_tax = fields.Float(string='税前合计', compute='_compute_total_before_tax', store=True)
year_compute = fields.Float(string='年度清算', compute='_compute_salary', store=True)
year_jie = fields.Float(string='年度结余', compute='_compute_salary', store=True)
year_gong = fields.Float(string='年功奖', compute='_compute_salary', store=True)
study_on = fields.Float(string='学习进步奖', compute='_compute_salary', store=True)
jing_te = fields.Float(string='经营特别奖', compute='_compute_salary', store=True)
attendance_deduction_total = fields.Float(string='考勤扣款合计')
assessment_reserved_amount = fields.Float(string='考核保留量')
is_push = fields.Boolean(string='推送')
@@ -107,6 +112,16 @@ class InheritHrPayslip(models.Model):
rec.work_injury_insurance = line.total
if line.name == '住房公积金':
rec.housing_provident_fund = line.total
if line.name == '年度清算':
rec.year_compute = line.total
if line.name == '年度结余':
rec.year_jie = line.total
if line.name == '年功奖':
rec.year_gong = line.total
if line.name == '学习进步奖':
rec.study_on = line.total
if line.name == '经营特别奖':
rec.jing_te = line.total
def put_payslip(self):
@@ -44,6 +44,11 @@
<field name="housing_provident_fund"/>
<field name="union_dues"/>
<field name="meal_misunderstanding_fee"/>
<field name="year_compute"/>
<field name="year_jie"/>
<field name="year_gong"/>
<field name="study_on"/>
<field name="jing_te"/>
<field name="is_salary_push" column_invisible="1"/>
</xpath>
<xpath expr="//field[@name='state']" position="after">
@@ -124,6 +129,11 @@
<field name="housing_provident_fund" invisible="1"/>
<field name="attendance_deduction_total" invisible="1"/>
<field name="assessment_reserved_amount" invisible="1"/>
<field name="year_compute" invisible="1"/>
<field name="year_jie" invisible="1"/>
<field name="year_gong" invisible="1"/>
<field name="study_on" invisible="1"/>
<field name="jing_te" invisible="1"/>
<!-- <field name="salary_group_id" invisible="1"/>-->
</group>
</group>
@@ -135,7 +145,7 @@
<field name="name">hr.payslip.tree</field>
<field name="model">hr.payslip</field>
<field name="arch" type="xml">
<tree string="薪资计算" default_order="employee_id" js_class="custom_salary_button">
<tree string="薪资计算" default_order="employee_id" js_class="custom_salary_button" editable="bottom">
<field name="employee_id"/>
<field name="struct_id" string="职级"/>
<field name="base_salary"/>
@@ -153,6 +163,11 @@
<field name="unemployment_insurance"/>
<field name="housing_provident_fund"/>
<field name="meal_misunderstanding_fee"/>
<field name="year_compute"/>
<field name="year_jie"/>
<field name="year_gong"/>
<field name="study_on"/>
<field name="jing_te"/>
<field name="is_push" column_invisible="1"/>
<button name="put_button" string="推送" type="object" class="oe_highlight"/>
</tree>