diff --git a/yuthon_salary/__manifest__.py b/yuthon_salary/__manifest__.py index fb136cee8..dc1e12bb9 100644 --- a/yuthon_salary/__manifest__.py +++ b/yuthon_salary/__manifest__.py @@ -13,7 +13,6 @@ 'depends': ['mail', 'base', 'hr', 'yuthon_hr_employee','hr_payroll'], 'data': [ 'security/ir.model.access.csv', - 'security/yuthon_salary_company.xml', 'views/inherit_hr_payroll_structure_views.xml', 'views/inherit_hr_salary_rule_views.xml', 'wizard/yuthon_salary_wizard_views.xml', diff --git a/yuthon_salary/security/yuthon_salary_company.xml b/yuthon_salary/security/yuthon_salary_company.xml deleted file mode 100644 index b919d283e..000000000 --- a/yuthon_salary/security/yuthon_salary_company.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - 薪资公司过滤 - - [('yuthon_company', '=', user.employee_id.yuthon_company)] - - - - - - \ No newline at end of file diff --git a/yuthon_salary/wizard/yuthon_salary_wizard.py b/yuthon_salary/wizard/yuthon_salary_wizard.py index f6eb45197..6141994b4 100644 --- a/yuthon_salary/wizard/yuthon_salary_wizard.py +++ b/yuthon_salary/wizard/yuthon_salary_wizard.py @@ -32,10 +32,10 @@ class YuthonSalaryWizard(models.Model): salary_dates_tz.append(r) elif rx == 0 and sh.name == '天河物管': for r in row[3:15]: - salary_dates_lc.append(r) + salary_dates_wg.append(r) elif rx == 0 and sh.name == '天河粮储': for r in row[3:10]: - salary_dates_wg.append(r) + salary_dates_lc.append(r) else: if sh.name == '天河投资': self.salary_tz_data(row,salary_dates_tz) @@ -86,9 +86,7 @@ class YuthonSalaryWizard(models.Model): text = row[2].value yuthon_company = yuthon_company_dict.get(row[11].value) struct_id = self.env['hr.payroll.structure'].search([('name', '=', text)]) - if struct_id: - pass - else: + if not struct_id: struct_id = self.env['hr.payroll.structure'].create({ 'name': text, 'lv': row[1].value, @@ -116,9 +114,7 @@ class YuthonSalaryWizard(models.Model): text = row[2].value yuthon_company = yuthon_company_dict.get(row[16].value) struct_id = self.env['hr.payroll.structure'].search([('name', '=', text)]) - if struct_id: - pass - else: + if not struct_id: struct_id = self.env['hr.payroll.structure'].create({ 'name': text, 'lv': row[1].value,