diff --git a/yuthon_salary/static/src/js/salary_create_button.js b/yuthon_salary/static/src/js/salary_create_button.js index f87e8a948..916b4e441 100644 --- a/yuthon_salary/static/src/js/salary_create_button.js +++ b/yuthon_salary/static/src/js/salary_create_button.js @@ -20,6 +20,18 @@ export class CustomSalaryStatementsController extends ListController { context: {}, }); } + openPensionWizard(){ + this.actionService.doAction({ + type: 'ir.actions.act_window', + res_model: 'basic.pension.wizard', + name: '社保导入', + view_mode: 'form', + view_type: 'form', + views: [[false, 'form']], + target: 'new', // 以弹窗形式打开 + context: {}, + }); + } } registry.category("views").add("custom_salary_button", { diff --git a/yuthon_salary/static/src/xml/salary_create_button.xml b/yuthon_salary/static/src/xml/salary_create_button.xml index 88123c2b9..6e67904ec 100644 --- a/yuthon_salary/static/src/xml/salary_create_button.xml +++ b/yuthon_salary/static/src/xml/salary_create_button.xml @@ -6,5 +6,10 @@ 薪资计算 + + + diff --git a/yuthon_salary/views/inherit_hr_payslip_views.xml b/yuthon_salary/views/inherit_hr_payslip_views.xml index 265f421c7..5ca2238ba 100644 --- a/yuthon_salary/views/inherit_hr_payslip_views.xml +++ b/yuthon_salary/views/inherit_hr_payslip_views.xml @@ -788,13 +788,6 @@ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_salary.my_hr_payslip_view_tree')}), (0, 0, {'view_mode': 'form', 'view_id': ref('hr_payroll.view_hr_payslip_form')})]"/> - - 五险一金导入弹窗 - - - code - action = model.basic_pension_wizard() - 批量退回个税计算 diff --git a/yuthon_salary/wizard/temporary_payslip_wizard.py b/yuthon_salary/wizard/temporary_payslip_wizard.py index 84ea07e0a..b049d4c9e 100644 --- a/yuthon_salary/wizard/temporary_payslip_wizard.py +++ b/yuthon_salary/wizard/temporary_payslip_wizard.py @@ -67,13 +67,11 @@ class TemporaryPayslipWizard(models.Model): '个税扣发(减)', '年金差额(减)', '扣发绩效奖金', - '三险一金', '企业(职业)年金', '应补(退)税额', '工会会费', '补扣保险', ] - processed_value = float(cell_value) if header in negative_items: processed_value = -abs(processed_value) @@ -86,11 +84,7 @@ class TemporaryPayslipWizard(models.Model): payslip.write({field_name: float(processed_value)}) if header not in existing_line_names and header not in field_mapping: - raise ValidationError( - f'未识别到存在工资项,请检查是否有该项目和格式名称是否对应\n' - f'员工: {employee_id.name}\n批次: {self.select_year}年-{month_name}\n' - f'薪资结构: {payslip.struct_id.name}\n导入工资项名称: {header}' - ) + pass match_header = header if header == '企业(职业)年金': match_header = '企业(职业)年金'