Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Análisis del submódulo de Asistencia, Vacaciones y Rendimiento de gastos #780

Merged
merged 13 commits into from
Aug 29, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

data = {
'modules': [
'HR Asistencia y Vacaciones'
'HR Asistencia, Vacaciones y Rendimiento de Gastos'
],
}
7 changes: 0 additions & 7 deletions erpnext/domains/hr_reclutamiento_capacitacion_gastos.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def validate_is_holiday(self):
frappe.bold(formatdate(self.date))))

def get_holiday_list(company=None):
if not frappe.db.exists("Has Domain", {"domain": 'HR Asistencia y Vacaciones'}):
if not frappe.db.exists("Has Domain", {"domain": 'HR Asistencia, Vacaciones y Rendimiento de Gastos'}):
return None

if not company:
Expand Down
5 changes: 2 additions & 3 deletions erpnext/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@
'RMA': 'erpnext.domains.rma',
'Retail Avanzado': 'erpnext.domains.retail_avanzado',
'Servicios Google': 'erpnext.domains.servicios_google',
'HR Asistencia y Vacaciones': 'erpnext.domains.hr_asistencia_vacaciones',
'HR Reclutamiento, Capacitacion y Gastos': 'erpnext.domains.hr_reclutamiento_capacitacion_gastos',
'Build': 'erpnext.domains.build',
'Pagos360': 'erpnext.domains.pagos360',
'Mercadolibre': 'erpnext.domains.mercadolibre',
Expand All @@ -128,7 +126,8 @@
'Compreahora': 'erpnext.domains.compreahora',
'Usuario de Ventas Reducido': 'erpnext.domains.usuario_ventas_reducido',
'Usuario de Soporte Reducido': 'erpnext.domains.usuario_soporte_reducido',
'Usuario de Proyecto Reducido':'erpnext.domains.usuario_proyecto_reducido',
'Usuario de Proyecto Reducido': 'erpnext.domains.usuario_proyecto_reducido',
'HR Asistencia, Vacaciones y Rendimiento de Gastos': 'erpnext.domains.hr_asistencia_vacaciones_rendimiento_gastos',
}

website_generators = ["Item Group", "Website Item", "BOM", "Sales Partner",
Expand Down
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/appraisal/appraisal.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2021-05-12 20:01:58.902166",
"modified": "2021-05-12 21:01:58.902166",
"modified_by": "Administrator",
"module": "HR",
"name": "Appraisal",
Expand Down Expand Up @@ -246,7 +246,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Reclutamiento, Capacitacion y Gastos",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"search_fields": "status, employee, employee_name",
"sort_field": "modified",
"sort_order": "DESC",
Expand Down
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/appraisal_template/appraisal_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"icon": "icon-file-text",
"idx": 1,
"links": [],
"modified": "2021-05-12 20:01:59.271381",
"modified": "2021-05-12 21:01:59.271381",
"modified_by": "Administrator",
"module": "HR",
"name": "Appraisal Template",
Expand All @@ -67,7 +67,7 @@
"role": "Employee"
}
],
"restrict_to_domain": "HR Reclutamiento, Capacitacion y Gastos",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"sort_field": "modified",
"sort_order": "DESC"
}
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/attendance/attendance.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
"idx": 1,
"is_submittable": 1,
"links": [],
"modified": "2021-05-12 20:01:54.473452",
"modified": "2021-05-12 21:01:54.473452",
"modified_by": "Administrator",
"module": "HR",
"name": "Attendance",
Expand Down Expand Up @@ -253,7 +253,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"search_fields": "employee,employee_name,attendance_date,status",
"sort_field": "modified",
"sort_order": "DESC",
Expand Down
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/attendance_request/attendance_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-05-12 20:01:54.807226",
"modified": "2021-05-12 21:01:54.807226",
"modified_by": "Administrator",
"module": "HR",
"name": "Attendance Request",
Expand Down Expand Up @@ -183,7 +183,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-05-12 20:01:53.391272",
"modified": "2021-05-12 21:01:53.391272",
"modified_by": "Administrator",
"module": "HR",
"name": "Compensatory Leave Request",
Expand Down Expand Up @@ -172,7 +172,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
],
"links": [],
"modified": "2021-05-12 20:01:56.379840",
"modified": "2021-05-12 21:01:56.379840",
"modified_by": "Administrator",
"module": "HR",
"name": "Daily Work Summary Group",
Expand All @@ -85,7 +85,7 @@
}
],
"quick_entry": 1,
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"sort_field": "modified",
"sort_order": "DESC"
}
3 changes: 1 addition & 2 deletions erpnext/hr/doctype/department/department.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"description": "Days for which Holidays are blocked for this department.",
"fieldname": "leave_block_list",
"fieldtype": "Link",
"hidden": 1,
"in_list_view": 1,
"label": "Leave Block List",
"options": "Leave Block List"
Expand Down Expand Up @@ -145,7 +144,7 @@
"idx": 1,
"is_tree": 1,
"links": [],
"modified": "2023-01-09 14:57:33.875494",
"modified": "2023-07-31 12:58:08.462456",
"modified_by": "Administrator",
"module": "HR",
"name": "Department",
Expand Down
11 changes: 6 additions & 5 deletions erpnext/hr/doctype/department_approver/department_approver.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters):

if filters.get("doctype") == "Leave Application":
parentfield = "leave_approvers"
field_name = "Leave Approver"
field_name = _("Leave Approver")
elif filters.get("doctype") == "Expense Claim":
parentfield = "expense_approvers"
field_name = "Expense Approver"
field_name = _("Expense Approver")
elif filters.get("doctype") == "Shift Request":
parentfield = "shift_request_approver"
field_name = "Shift Request Approver"
field_name = _("Shift Request Approver")
if department_list:
for d in department_list:
approvers += frappe.db.sql("""select user.name, user.first_name, user.last_name from
Expand All @@ -63,7 +63,8 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters):
if len(approvers) == 0:
error_msg = _("Please set {0} for the Employee: {1}").format(field_name, frappe.bold(employee.employee_name))
if department_list:
error_msg += _(" or for Department: {0}").format(frappe.bold(employee_department))
frappe.throw(error_msg, title=_(field_name + " Missing"))
error_msg += " " + _("or for Department: {0}").format(frappe.bold(employee_department))
frappe.throw(error_msg, title=_("{0} Missing").format(field_name))


return set(tuple(approver) for approver in approvers)
3 changes: 1 addition & 2 deletions erpnext/hr/doctype/employee/employee.json
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,6 @@
"collapsible": 1,
"fieldname": "attendance_and_leave_details",
"fieldtype": "Section Break",
"hidden": 1,
"label": "Attendance and Leave Details"
},
{
Expand Down Expand Up @@ -829,7 +828,7 @@
"idx": 24,
"image_field": "image",
"links": [],
"modified": "2022-08-11 15:28:59.782180",
"modified": "2023-07-31 12:56:37.591515",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee",
Expand Down
14 changes: 11 additions & 3 deletions erpnext/hr/doctype/employee_advance/employee_advance.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"amended_from",
"column_break_18",
"advance_account",
"mode_of_payment"
"mode_of_payment",
"travel_request"
],
"fields": [
{
Expand Down Expand Up @@ -196,11 +197,18 @@
"precision": "9",
"print_hide": 1,
"reqd": 1
},
{
"fieldname": "travel_request",
"fieldtype": "Link",
"label": "Travel Request",
"options": "Travel Request",
"read_only": 1
}
],
"is_submittable": 1,
"links": [],
"modified": "2021-09-11 18:38:38.617478",
"modified": "2023-08-01 08:07:59.242651",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Advance",
Expand Down Expand Up @@ -233,7 +241,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Reclutamiento, Capacitacion y Gastos",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"search_fields": "employee,employee_name",
"sort_field": "modified",
"sort_order": "DESC",
Expand Down
4 changes: 4 additions & 0 deletions erpnext/hr/doctype/employee_advance/employee_advance.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def validate(self):
validate_active_employee(self.employee)
self.set_status()

def on_submit(self):
if self.travel_request:
frappe.db.set_value('Travel Request', self.travel_request, 'employee_advance', self.name)

def on_cancel(self):
self.ignore_linked_doctypes = ('GL Entry')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ def get_data():
'fieldname': 'employee_advance',
'non_standard_fieldnames': {
'Payment Entry': 'reference_name',
'Journal Entry': 'reference_name'
'Journal Entry': 'reference_name',
},
'transactions': [
{
'items': ['Expense Claim']
},
{
'items': ['Payment Entry', 'Journal Entry']
'items': ['Payment Entry', 'Journal Entry', 'Travel Request']
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"hide_toolbar": 1,
"issingle": 1,
"links": [],
"modified": "2021-05-12 20:01:54.184685",
"modified": "2021-05-12 21:01:54.184685",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Attendance Tool",
Expand All @@ -84,7 +84,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"sort_field": "modified",
"sort_order": "DESC"
}
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/employee_checkin/employee_checkin.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
],
"links": [],
"modified": "2021-05-12 20:01:55.298451",
"modified": "2021-05-12 21:01:55.298451",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Checkin",
Expand Down Expand Up @@ -201,7 +201,7 @@
"role": "Employee"
}
],
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"sort_field": "modified",
"sort_order": "ASC",
"title_field": "employee_name",
Expand Down
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/expense_claim/expense_claim.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
"idx": 1,
"is_submittable": 1,
"links": [],
"modified": "2021-11-22 16:26:57.787838",
"modified": "2021-11-23 16:26:57.787838",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim",
Expand Down Expand Up @@ -441,7 +441,7 @@
"write": 1
}
],
"restrict_to_domain": "HR Reclutamiento, Capacitacion y Gastos",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"search_fields": "employee,employee_name",
"show_name_in_global_search": 1,
"sort_field": "modified",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"fieldname": "account_head",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Account Head",
"label": "Cuenta contable",
"oldfieldname": "account_head",
"oldfieldtype": "Link",
"options": "Account",
Expand Down Expand Up @@ -61,7 +61,7 @@
"fieldname": "rate",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Rate",
"label": "Al\u00edcuota",
"oldfieldname": "rate",
"oldfieldtype": "Currency"
},
Expand Down Expand Up @@ -102,7 +102,7 @@
],
"istable": 1,
"links": [],
"modified": "2021-05-12 19:59:12.974975",
"modified": "2023-08-01 11:13:52.620713",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Taxes and Charges",
Expand Down
4 changes: 2 additions & 2 deletions erpnext/hr/doctype/holiday_list/holiday_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
"icon": "fa fa-calendar",
"idx": 1,
"links": [],
"modified": "2022-06-22 15:13:55.735097",
"modified": "2022-06-22 16:13:55.735097",
"modified_by": "Administrator",
"module": "HR",
"restrict_to_domain": "HR Asistencia y Vacaciones",
"restrict_to_domain": "HR Asistencia, Vacaciones y Rendimiento de Gastos",
"name": "Holiday List",
"owner": "Administrator",
"permissions": [
Expand Down
Loading
Loading