添加功能
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<field name="service_fee"/>
|
||||
<field name="tiantou_payable"/>
|
||||
<field name="company"/>
|
||||
<field name="company_id" column_ivisible="1"/>
|
||||
<field name="company_id" column_invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -42,22 +42,44 @@ class PayrollLaborWizard(models.Model):
|
||||
service_fee = row[14].value
|
||||
tiantou_payable = row[15].value
|
||||
company = row[16].value
|
||||
self.env['yuthon.payroll.labor'].create({
|
||||
'employee_id': employee_id.id,
|
||||
'current_year': current_year,
|
||||
'current_month': current_month,
|
||||
'basic_salary': basic_salary,
|
||||
'rank_salary': rank_salary,
|
||||
'meal_allowance': meal_allowance,
|
||||
'total_payable': total_payable,
|
||||
'social_security_personal': social_security_personal,
|
||||
'provident_fund_personal': provident_fund_personal,
|
||||
'individual_tax': individual_tax,
|
||||
'dispatched_actual_salary': dispatched_actual_salary,
|
||||
'social_security_company': social_security_company,
|
||||
'provident_fund_company': provident_fund_company,
|
||||
'disability_insurance': disability_insurance,
|
||||
'service_fee': service_fee,
|
||||
'tiantou_payable': tiantou_payable,
|
||||
'company': company,
|
||||
})
|
||||
payroll_id = self.env['yuthon.payroll'].search([('employee_id', '=', employee_id.id),
|
||||
('current_year', '=', current_year),
|
||||
('current_month', '=', current_month),
|
||||
])
|
||||
if not payroll_id:
|
||||
self.env['yuthon.payroll.labor'].create({
|
||||
'employee_id': employee_id.id,
|
||||
'current_year': current_year,
|
||||
'current_month': current_month,
|
||||
'basic_salary': basic_salary,
|
||||
'rank_salary': rank_salary,
|
||||
'meal_allowance': meal_allowance,
|
||||
'total_payable': total_payable,
|
||||
'social_security_personal': social_security_personal,
|
||||
'provident_fund_personal': provident_fund_personal,
|
||||
'individual_tax': individual_tax,
|
||||
'dispatched_actual_salary': dispatched_actual_salary,
|
||||
'social_security_company': social_security_company,
|
||||
'provident_fund_company': provident_fund_company,
|
||||
'disability_insurance': disability_insurance,
|
||||
'service_fee': service_fee,
|
||||
'tiantou_payable': tiantou_payable,
|
||||
'company': company,
|
||||
})
|
||||
else:
|
||||
payroll_id.write({
|
||||
'basic_salary': basic_salary,
|
||||
'rank_salary': rank_salary,
|
||||
'meal_allowance': meal_allowance,
|
||||
'total_payable': total_payable,
|
||||
'social_security_personal': social_security_personal,
|
||||
'provident_fund_personal': provident_fund_personal,
|
||||
'individual_tax': individual_tax,
|
||||
'dispatched_actual_salary': dispatched_actual_salary,
|
||||
'social_security_company': social_security_company,
|
||||
'provident_fund_company': provident_fund_company,
|
||||
'disability_insurance': disability_insurance,
|
||||
'service_fee': service_fee,
|
||||
'tiantou_payable': tiantou_payable,
|
||||
'company': company,
|
||||
})
|
||||
Reference in New Issue
Block a user