[minor] fixes
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index a15af7d..ae62f1e 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -88,8 +88,8 @@
if not struct:
self.salary_structure = None
- msgprint(_("No active or default Salary Structure found for employee {0} and the month")
- .format(self.employee))
+ frappe.throw(_("No active or default Salary Structure found for employee {0} for the given dates")
+ .format(self.employee), title=_('Salary Structure Missing'))
return struct and struct[0][0] or ''
@@ -261,7 +261,7 @@
self.update_status(self.name)
if(frappe.db.get_single_value("HR Settings", "email_salary_slip_to_employee")):
self.email_salary_slip()
-
+
def on_cancel(self):
self.update_status()
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index ccc0cfe..e7280f4 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -16,15 +16,7 @@
def onload(self):
"""Load project tasks for quick view"""
if not self.get('__unsaved') and not self.get("tasks"):
- for task in self.get_tasks():
- self.append("tasks", {
- "title": task.subject,
- "status": task.status,
- "start_date": task.exp_start_date,
- "end_date": task.exp_end_date,
- "description": task.description,
- "task_id": task.name
- })
+ self.load_tasks()
self.set_onload('links', self.meta.get_links_setup())
self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
@@ -33,6 +25,19 @@
def __setup__(self):
self.onload()
+ def load_tasks(self):
+ """Load `tasks` from the database"""
+ self.tasks = []
+ for task in self.get_tasks():
+ self.append("tasks", {
+ "title": task.subject,
+ "status": task.status,
+ "start_date": task.exp_start_date,
+ "end_date": task.exp_end_date,
+ "description": task.description,
+ "task_id": task.name
+ })
+
def get_tasks(self):
return frappe.get_all("Task", "*", {"project": self.name}, order_by="exp_start_date asc")
diff --git a/erpnext/stock/doctype/item/item_links.py b/erpnext/stock/doctype/item/item_links.py
index 5586214..68280dc 100644
--- a/erpnext/stock/doctype/item/item_links.py
+++ b/erpnext/stock/doctype/item/item_links.py
@@ -5,6 +5,7 @@
'non_standard_fieldnames': {
'Production Order': 'production_item',
'Product Bundle': 'new_item_code',
+ 'BOM': 'item',
'Batch': 'item'
},
'transactions': [
diff --git a/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json b/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json
index d2f42d4..616eae1 100644
--- a/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json
+++ b/erpnext/stock/report/items_to_be_requested/items_to_be_requested.json
@@ -1,17 +1,19 @@
{
- "apply_user_permissions": 1,
- "creation": "2013-08-20 15:08:10",
- "docstatus": 0,
- "doctype": "Report",
- "idx": 1,
- "is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.128919",
- "modified_by": "Administrator",
- "module": "Stock",
- "name": "Items To Be Requested",
- "owner": "Administrator",
+ "add_total_row": 0,
+ "apply_user_permissions": 1,
+ "creation": "2013-08-20 15:08:10",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 1,
+ "is_standard": "Yes",
+ "modified": "2016-06-29 17:39:54.122679",
+ "modified_by": "Administrator",
+ "module": "Stock",
+ "name": "Items To Be Requested",
+ "owner": "Administrator",
"query": "SELECT\n tabBin.item_code as \"Item:Link/Item:120\",\n tabBin.warehouse as \"Warehouse:Link/Warehouse:120\",\n tabBin.actual_qty as \"Actual:Float:90\",\n tabBin.indented_qty as \"Requested:Float:90\",\n tabBin.reserved_qty as \"Reserved:Float:90\",\n tabBin.ordered_qty as \"Ordered:Float:90\",\n tabBin.projected_qty as \"Projected:Float:90\"\nFROM\n tabBin, tabItem\nWHERE\n tabBin.item_code = tabItem.name\n AND tabBin.projected_qty < 0\nORDER BY\n tabBin.projected_qty ASC",
- "ref_doctype": "Item",
- "report_name": "Items To Be Requested",
+ "ref_doctype": "Material Request",
+ "report_name": "Items To Be Requested",
"report_type": "Query Report"
}
\ No newline at end of file