mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 23:18:02 +00:00
frappe/frappe#478 erpnext install works
This commit is contained in:
@@ -22,8 +22,7 @@ class HolidayList(Document):
|
||||
self.validate_values()
|
||||
yr_start_date, yr_end_date = self.get_fy_start_end_dates()
|
||||
date_list = self.get_weekly_off_date_list(yr_start_date, yr_end_date)
|
||||
last_idx = max([cint(d.idx) for d in self.doclist.get(
|
||||
{"parentfield": "holiday_list_details"})] or [0,])
|
||||
last_idx = max([cint(d.idx) for d in self.get("holiday_list_details")] or [0,])
|
||||
for i, d in enumerate(date_list):
|
||||
ch = self.append('holiday_list_details', {})
|
||||
ch.description = self.weekly_off
|
||||
|
||||
@@ -10,7 +10,7 @@ from frappe.utils import cint
|
||||
|
||||
from frappe.model.document import Document
|
||||
|
||||
class HrSettings(Document):
|
||||
class HRSettings(Document):
|
||||
|
||||
def validate(self):
|
||||
self.update_birthday_reminders()
|
||||
|
||||
@@ -14,7 +14,7 @@ class LeaveBlockList(Document):
|
||||
|
||||
def validate(self):
|
||||
dates = []
|
||||
for d in self.doclist.get({"doctype":"Leave Block List Date"}):
|
||||
for d in self.get("leave_block_list_dates"):
|
||||
# validate fiscal year
|
||||
validate_fiscal_year(d.block_date, self.year, _("Block Date"))
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class SalarySlip(TransactionBase):
|
||||
|
||||
def pull_sal_struct(self, struct):
|
||||
from erpnext.hr.doctype.salary_structure.salary_structure import get_mapped_doc
|
||||
self.doclist = get_mapped_doc(struct, self.doclist)
|
||||
self.update(get_mapped_doc(struct, self))
|
||||
|
||||
def pull_emp_details(self):
|
||||
emp = frappe.db.get_value("Employee", self.employee,
|
||||
|
||||
@@ -82,7 +82,7 @@ def get_mapped_doc(source_name, target_doc=None):
|
||||
sal_slip.run_method("get_leave_details")
|
||||
sal_slip.run_method("calculate_net_pay")
|
||||
|
||||
doclist = get_mapped_doc("Salary Structure", source_name, {
|
||||
doc = get_mapped_doc("Salary Structure", source_name, {
|
||||
"Salary Structure": {
|
||||
"doctype": "Salary Slip",
|
||||
"field_map": {
|
||||
@@ -109,4 +109,4 @@ def get_mapped_doc(source_name, target_doc=None):
|
||||
}
|
||||
}, target_doc, postprocess)
|
||||
|
||||
return doclist
|
||||
return doc
|
||||
|
||||
Reference in New Issue
Block a user