From 43274de5df456a760b5a0137fa4669eba2d2eb5e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 14 Apr 2018 17:04:56 +0530 Subject: [PATCH] Removed employee table from Salary Structure and added employee name in all forms --- .../compensatory_leave_request.py | 6 +----- .../test_compensatory_leave_request.py | 6 +----- erpnext/hr/doctype/employee/employee.json | 8 ++++++-- .../employee_benefit_claim/employee_benefit_claim.json | 1 + .../hr/doctype/employee_promotion/employee_promotion.json | 2 +- .../hr/doctype/employee_transfer/employee_transfer.json | 2 +- erpnext/hr/doctype/leave_period/test_leave_period.py | 2 +- erpnext/hr/doctype/leave_type/leave_type.json | 2 +- erpnext/hr/doctype/shift_assignment/shift_assignment.json | 4 ++++ .../patches/v11_0/create_salary_structure_assignments.py | 6 ++++++ 10 files changed, 23 insertions(+), 16 deletions(-) diff --git a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py index c211792f00..b51b46c80f 100644 --- a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py +++ b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py @@ -7,10 +7,6 @@ import frappe from frappe.model.document import Document class CompensatoryLeaveRequest(Document): -<<<<<<< HEAD + def validate_present(self): pass - -======= - pass ->>>>>>> New doctypes for HR and Accounting (#13652) diff --git a/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py b/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py index edad571700..f062325f5f 100644 --- a/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py +++ b/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py @@ -7,7 +7,6 @@ import frappe import unittest class TestCompensatoryLeaveRequest(unittest.TestCase): -<<<<<<< HEAD def get_compensatory_leave_request(self): return frappe.get_doc('Compensatory Leave Request', dict( employee = employee, @@ -39,7 +38,4 @@ class TestCompensatoryLeaveRequest(unittest.TestCase): self.assertRaises(MaxLeavesLimitCrossed, compensatory_leave_request.submit) frappe.db.set_value('Leave Type', compensatory_leave_request.leave_type, 'max_leaves_allowed', 10) - -======= - pass ->>>>>>> New doctypes for HR and Accounting (#13652) + diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json index 0cf6805693..ecbb29f46b 100644 --- a/erpnext/hr/doctype/employee/employee.json +++ b/erpnext/hr/doctype/employee/employee.json @@ -1268,7 +1268,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "default_leave_policy", + "fieldname": "leave_policy", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, @@ -1277,7 +1277,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Default Leave policy", + "label": "Leave Policy", "length": 0, "no_copy": 0, "options": "Leave Policy", @@ -2766,7 +2766,11 @@ "issingle": 0, "istable": 0, "max_attachments": 0, +<<<<<<< HEAD "modified": "2018-04-25 09:08:06.852604", +======= + "modified": "2018-04-14 13:30:43.761434", +>>>>>>> Removed employee table from Salary Structure and added employee name in all forms "modified_by": "Administrator", "module": "HR", "name": "Employee", diff --git a/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.json b/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.json index b358247376..fed15edf84 100644 --- a/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.json +++ b/erpnext/hr/doctype/employee_benefit_claim/employee_benefit_claim.json @@ -457,4 +457,5 @@ "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", + "title_field": "employee_name", "track_changes": 1, diff --git a/erpnext/hr/doctype/employee_promotion/employee_promotion.json b/erpnext/hr/doctype/employee_promotion/employee_promotion.json index 845eaf9890..a7d49bcad3 100644 --- a/erpnext/hr/doctype/employee_promotion/employee_promotion.json +++ b/erpnext/hr/doctype/employee_promotion/employee_promotion.json @@ -189,7 +189,7 @@ "label": "Employee Promotion Detail", "length": 0, "no_copy": 0, - "options": "Employee Property History", + "options": "Employee Promotion Detail", "permlevel": 0, "precision": "", "print_hide": 0, diff --git a/erpnext/hr/doctype/employee_transfer/employee_transfer.json b/erpnext/hr/doctype/employee_transfer/employee_transfer.json index 6b8d403159..55fa073fa2 100644 --- a/erpnext/hr/doctype/employee_transfer/employee_transfer.json +++ b/erpnext/hr/doctype/employee_transfer/employee_transfer.json @@ -221,7 +221,7 @@ "label": "Employee Transfer Detail", "length": 0, "no_copy": 0, - "options": "Employee Property History", + "options": "Employee Transfer Detail", "permlevel": 0, "precision": "", "print_hide": 0, diff --git a/erpnext/hr/doctype/leave_period/test_leave_period.py b/erpnext/hr/doctype/leave_period/test_leave_period.py index 11d4ec5cac..dcf6293f11 100644 --- a/erpnext/hr/doctype/leave_period/test_leave_period.py +++ b/erpnext/hr/doctype/leave_period/test_leave_period.py @@ -28,4 +28,4 @@ class TestLeavePeriod(unittest.TestCase): def test_duplicate_grant(self): leave_period = self.test_leave_grant() self.assertRaises(DuplicateLeaveGrant, leave_period.grant_leaves) - + diff --git a/erpnext/hr/doctype/leave_type/leave_type.json b/erpnext/hr/doctype/leave_type/leave_type.json index 02f585d68e..1d1aef2045 100644 --- a/erpnext/hr/doctype/leave_type/leave_type.json +++ b/erpnext/hr/doctype/leave_type/leave_type.json @@ -113,7 +113,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "max_continuous_days_allowed", + "fieldname": "max_days_allowed", "fieldtype": "Int", "hidden": 0, "ignore_user_permissions": 0, diff --git a/erpnext/hr/doctype/shift_assignment/shift_assignment.json b/erpnext/hr/doctype/shift_assignment/shift_assignment.json index 897cfed68a..86c1708f5f 100644 --- a/erpnext/hr/doctype/shift_assignment/shift_assignment.json +++ b/erpnext/hr/doctype/shift_assignment/shift_assignment.json @@ -307,7 +307,11 @@ "issingle": 0, "istable": 0, "max_attachments": 0, +<<<<<<< HEAD "modified": "2018-04-17 14:50:09.125737", +======= + "modified": "2018-04-14 15:42:12.617715", +>>>>>>> Removed employee table from Salary Structure and added employee name in all forms "modified_by": "Administrator", "module": "HR", "name": "Shift Assignment", diff --git a/erpnext/patches/v11_0/create_salary_structure_assignments.py b/erpnext/patches/v11_0/create_salary_structure_assignments.py index 289554ee1a..cf7646bcf5 100644 --- a/erpnext/patches/v11_0/create_salary_structure_assignments.py +++ b/erpnext/patches/v11_0/create_salary_structure_assignments.py @@ -7,8 +7,14 @@ import frappe def execute(): frappe.reload_doc("hr", "doctype", "salary_structure_assignment") for d in frappe.db.sql(""" +<<<<<<< HEAD select sse.*, ss.company from `tabSalary Structure Employee` sse, `tabSalary Structure` ss where ss.name = sse.parent""", as_dict=1): +======= + select * from `tabSalary Structure Employee` sse, `tabSalary Structure` ss + where ss.name = sse.parent""", as_dict=1): + +>>>>>>> Removed employee table from Salary Structure and added employee name in all forms s = frappe.new_doc("Salary Structure Assignment") s.employee = d.employee s.employee_name = d.employee_name