Merge pull request !3274 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-06-12 14:42:49 +00:00
committed by Gitee
5 changed files with 20 additions and 22 deletions
@@ -17,5 +17,7 @@
.o_list_renderer .o_list_table > thead > tr > th{
max-width: max-content !important;
font-weight: bold !important;
background-color: lightblue !important;
}
@@ -227,7 +227,7 @@
<field name="domain">[('is_message', '=', False), ('reading_state', '=', 'wait')]</field>
</record>
<record id='view_property_water_message_action' model="ir.actions.act_window">
<field name="name">水费记录管理</field>
<field name="name">水表记录管理</field>
<field name="res_model">property.water.reading</field>
<field name="view_mode">tree,form,search</field>
<field name="domain">[('is_message', '=', True)]</field>
@@ -269,28 +269,28 @@
parent="yuthon_property.yuthon_property_fee_management"
action="property_deposit_list_action"/>
<menuitem id="yuthon_property_electric_message_menu"
sequence="1"
name="电表记录管理"
parent="yuthon_property.yuthon_property_meter_menu"
action="view_property_electric_message_action"/>
<menuitem id="yuthon_property_water_message_menu"
sequence="3"
name="水表记录任务"
parent="yuthon_property.yuthon_property_meter_menu"
action="view_property_water_message_action"/>
<menuitem id="yuthon_property_electric_reading_menu"
sequence="5"
sequence="1"
name="电表抄表任务"
parent="yuthon_property.yuthon_property_meter_menu"
action="view_property_electric_reading_action"/>
<menuitem id="yuthon_property_water_reading_menu"
sequence="7"
sequence="3"
name="水表抄表任务"
parent="yuthon_property.yuthon_property_meter_menu"
action="view_property_water_reading_action"/>
<menuitem id="yuthon_property_electric_message_menu"
sequence="5"
name="电表记录管理"
parent="yuthon_property.yuthon_property_meter_menu"
action="view_property_electric_message_action"/>
<menuitem id="yuthon_property_water_message_menu"
sequence="7"
name="水表记录管理"
parent="yuthon_property.yuthon_property_meter_menu"
action="view_property_water_message_action"/>
<!--建筑工程流程-->
<menuitem id="property_project_works_menu"
sequence="5"
@@ -92,7 +92,8 @@ class YuthonPayrollCommon(models.Model):
formula_salary = "result = 0"
if ins.name == '质检员津贴':
formula_salary = "result = 0"
if ins.name == '工会会费' and ins.company_id.name == '集团本部':
formula_salary = "result = round((payslip.base_salary * 0.005), 2)"
if ins.name == '工会会费' and ins.company_id.name == '天河物管':
formula_salary = "result = 0"
if ins.name == '工会会费' and ins.company_id.name == '天河粮储':
@@ -225,9 +226,6 @@ class YuthonPayrollInsurances (models.Model):
if ins.name == '住房公积金':
code = 'ZFGJJ'
formula_salary = "result = (round((employee.housing_fund_base * " + str(number) + "), 0)) if employee.is_accum_salary else 0"
if ins.name == '工会会费':
code = 'GHHF'
formula_salary = "result = round((payslip.base_salary * 0.005), 2)"
if ins.name == '企业(职业)年金':
if ins.company_id.name == '天河物管':
code = 'WGQYNJ'
@@ -246,6 +244,4 @@ class YuthonPayrollInsurances (models.Model):
}])
sal.write({'rule_ids': rule_list})
else:
sal.rule_ids.search([('name', '=', ins.name)]).write({'amount_python_compute': formula_salary,
'code':code,
})
sal.rule_ids.search([('name', '=', ins.name)]).write({'amount_python_compute': formula_salary, 'code':code,})
@@ -85,7 +85,7 @@ class SalaryComputeWizard(models.Model):
('date_to', '>=', start_date)
])
if existing_payslip:
raise UserError( f"员工 {employee.name} 在 {start_date} 到 {end_date} 日期范围内已有工资单记录,无法创建新的工资单。")
raise UserError(f"员工 {employee.name} 在 {start_date} 到 {end_date} 日期范围内已有工资单记录,无法创建新的工资单。")
payslip = self.env['hr.payslip'].create({
'is_bold':is_bold,
'name': employee.name,