frappe/frappe#478 erpnext install works

This commit is contained in:
Rushabh Mehta
2014-04-02 18:09:34 +05:30
parent 943e614810
commit f191f854cd
55 changed files with 165 additions and 167 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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"))

View File

@@ -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,

View File

@@ -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