From 4089b3d3768f405e20ec67576fbb42f00b7f074e Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Tue, 7 Jul 2015 16:58:14 +0530 Subject: [PATCH] Salary Slip renamed to Process Payroll --- erpnext/config/hr.py | 2 +- .../hr/doctype/process_payroll/__init__.py | 0 .../process_payroll.js} | 2 +- .../process_payroll.json} | 4 ++-- .../process_payroll.py} | 2 +- erpnext/hr/doctype/salary_manager/README.md | 1 - erpnext/hr/doctype/salary_manager/__init__.py | 21 ------------------- erpnext/hr/doctype/salary_slip/salary_slip.py | 2 +- erpnext/patches.txt | 1 + 9 files changed, 7 insertions(+), 28 deletions(-) create mode 100644 erpnext/hr/doctype/process_payroll/__init__.py rename erpnext/hr/doctype/{salary_manager/salary_manager.js => process_payroll/process_payroll.js} (96%) rename erpnext/hr/doctype/{salary_manager/salary_manager.json => process_payroll/process_payroll.json} (98%) rename erpnext/hr/doctype/{salary_manager/salary_manager.py => process_payroll/process_payroll.py} (99%) delete mode 100644 erpnext/hr/doctype/salary_manager/README.md delete mode 100644 erpnext/hr/doctype/salary_manager/__init__.py diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py index 2e6006102e..72fe8dd90d 100644 --- a/erpnext/config/hr.py +++ b/erpnext/config/hr.py @@ -60,7 +60,7 @@ def get_data(): "items": [ { "type": "doctype", - "name": "Salary Manager", + "name": "Process Payroll", "label": _("Process Payroll"), "description":_("Generate Salary Slips"), "hide_count": True diff --git a/erpnext/hr/doctype/process_payroll/__init__.py b/erpnext/hr/doctype/process_payroll/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/process_payroll/process_payroll.js similarity index 96% rename from erpnext/hr/doctype/salary_manager/salary_manager.js rename to erpnext/hr/doctype/process_payroll/process_payroll.js index ca702265d4..d88234997b 100644 --- a/erpnext/hr/doctype/salary_manager/salary_manager.js +++ b/erpnext/hr/doctype/process_payroll/process_payroll.js @@ -59,6 +59,6 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) { } -frappe.ui.form.on("Salary Manager", "refresh", function(frm) { +frappe.ui.form.on("Process Payroll", "refresh", function(frm) { frm.disable_save(); }); diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.json b/erpnext/hr/doctype/process_payroll/process_payroll.json similarity index 98% rename from erpnext/hr/doctype/salary_manager/salary_manager.json rename to erpnext/hr/doctype/process_payroll/process_payroll.json index 93ee138a04..36e858cd1a 100644 --- a/erpnext/hr/doctype/salary_manager/salary_manager.json +++ b/erpnext/hr/doctype/process_payroll/process_payroll.json @@ -154,10 +154,10 @@ "icon": "icon-cog", "idx": 1, "issingle": 1, - "modified": "2015-06-05 11:33:00.152362", + "modified": "2015-07-07 07:16:02.380839", "modified_by": "Administrator", "module": "HR", - "name": "Salary Manager", + "name": "Process Payroll", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.py b/erpnext/hr/doctype/process_payroll/process_payroll.py similarity index 99% rename from erpnext/hr/doctype/salary_manager/salary_manager.py rename to erpnext/hr/doctype/process_payroll/process_payroll.py index 3e0b53e862..4900bd0ec0 100644 --- a/erpnext/hr/doctype/salary_manager/salary_manager.py +++ b/erpnext/hr/doctype/process_payroll/process_payroll.py @@ -8,7 +8,7 @@ from frappe import _ from frappe.model.document import Document -class SalaryManager(Document): +class ProcessPayroll(Document): def get_emp_list(self): """ diff --git a/erpnext/hr/doctype/salary_manager/README.md b/erpnext/hr/doctype/salary_manager/README.md deleted file mode 100644 index 040d038ec0..0000000000 --- a/erpnext/hr/doctype/salary_manager/README.md +++ /dev/null @@ -1 +0,0 @@ -Tool to issue monthly Salary Slips to all Employees. \ No newline at end of file diff --git a/erpnext/hr/doctype/salary_manager/__init__.py b/erpnext/hr/doctype/salary_manager/__init__.py deleted file mode 100644 index f24df48d49..0000000000 --- a/erpnext/hr/doctype/salary_manager/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# ERPNext - web based ERP (http://erpnext.com) -# Copyright (C) 2012 Frappe Technologies Pvt Ltd -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -from __future__ import unicode_literals -from frappe import ValidationError - -class SalarySlipExistsError(ValidationError): pass - diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index dd544908ad..24079c1c72 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -49,7 +49,7 @@ class SalarySlip(TransactionBase): if not self.month: self.month = "%02d" % getdate(nowdate()).month - m = frappe.get_doc('Salary Manager').get_month_details(self.fiscal_year, self.month) + m = frappe.get_doc('Process Payroll').get_month_details(self.fiscal_year, self.month) holidays = self.get_holidays_for_employee(m) if not cint(frappe.db.get_value("HR Settings", "HR Settings", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2b430a056a..26c1d7be3c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -174,3 +174,4 @@ erpnext.patches.v5_1.fix_against_account erpnext.patches.v5_1.fix_credit_days_based_on erpnext.patches.v5_1.track_operations erpnext.patches.v5_1.sales_bom_rename +execute:frappe.rename_doc("DocType", "Salary Manager", "Process Payroll", force=True)