Merge pull request #7565 from KanchanChauhan/leave-balance-report-fix
[Fix] Permissions to view Leave Balance Report
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 67d9a35..20f5e54 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.2.14'
+__version__ = '7.2.17'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 5ecab8d..032fd66 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -9,6 +9,7 @@
from erpnext.accounts.utils import get_fiscal_year
from erpnext.accounts.general_ledger import make_gl_entries, delete_gl_entries, process_gl_map
from erpnext.controllers.accounts_controller import AccountsController
+from erpnext.stock.stock_ledger import get_valuation_rate
class StockController(AccountsController):
def validate(self):
@@ -54,6 +55,7 @@
self.check_expense_account(item_row)
if not sle.stock_value_difference:
+ self.update_stock_ledger_entries(sle)
self.validate_negative_stock(sle)
gl_list.append(self.get_gl_dict({
@@ -86,6 +88,14 @@
return process_gl_map(gl_list)
+ def update_stock_ledger_entries(self, sle):
+ sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
+ sle.voucher_type, sle.voucher_no)
+ sle.stock_value = flt(sle.qty_after_transaction) * flt(sle.valuation_rate)
+ sle.stock_value_difference = sle.stock_value
+ sle.doctype="Stock Ledger Entry"
+ frappe.get_doc(sle).db_update()
+
def validate_negative_stock(self, sle):
if sle.qty_after_transaction < 0 and sle.actual_qty < 0:
frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries (for booking expenses). Please create an incoming stock transaction or mention valuation rate in Item record, and then try submiting {1} {2}")
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 32171b0..b5e195c 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -30,7 +30,7 @@
frm.events.enquiry_from(frm);
frm.trigger('set_contact_link');
- if(doc.status!=="Lost") {
+ if(!doc.__islocal && doc.status!=="Lost") {
if(doc.with_items){
frm.add_custom_button(__('Supplier Quotation'),
function() {
@@ -121,7 +121,7 @@
erpnext.toggle_naming_series();
var frm = cur_frm;
- if(frm.perm[0].write && doc.docstatus==0) {
+ if(!doc.__islocal && frm.perm[0].write && doc.docstatus==0) {
if(frm.doc.status==="Open") {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
diff --git a/erpnext/docs/assets/old_images/erpnext/calender-email-digest.png b/erpnext/docs/assets/old_images/erpnext/calender-email-digest.png
new file mode 100644
index 0000000..1d95ef4
--- /dev/null
+++ b/erpnext/docs/assets/old_images/erpnext/calender-email-digest.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/calender-event-lead.png b/erpnext/docs/assets/old_images/erpnext/calender-event-lead.png
new file mode 100644
index 0000000..dc6eb8b
--- /dev/null
+++ b/erpnext/docs/assets/old_images/erpnext/calender-event-lead.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/calender-event-manually.png b/erpnext/docs/assets/old_images/erpnext/calender-event-manually.png
new file mode 100644
index 0000000..84cb343
--- /dev/null
+++ b/erpnext/docs/assets/old_images/erpnext/calender-event-manually.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/calender-event-notification.png b/erpnext/docs/assets/old_images/erpnext/calender-event-notification.png
new file mode 100644
index 0000000..fa1e4ff
--- /dev/null
+++ b/erpnext/docs/assets/old_images/erpnext/calender-event-notification.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/calender-event-permission.png b/erpnext/docs/assets/old_images/erpnext/calender-event-permission.png
new file mode 100644
index 0000000..783f968
--- /dev/null
+++ b/erpnext/docs/assets/old_images/erpnext/calender-event-permission.png
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/calender-event-recurring.png b/erpnext/docs/assets/old_images/erpnext/calender-event-recurring.png
new file mode 100644
index 0000000..6147cf5
--- /dev/null
+++ b/erpnext/docs/assets/old_images/erpnext/calender-event-recurring.png
Binary files differ
diff --git a/erpnext/docs/user/manual/en/stock/warehouse.md b/erpnext/docs/user/manual/en/stock/warehouse.md
index 172e469..74ee8cc 100644
--- a/erpnext/docs/user/manual/en/stock/warehouse.md
+++ b/erpnext/docs/user/manual/en/stock/warehouse.md
@@ -4,15 +4,27 @@
cities, towns, and villages. They mostly have loading docks to load and unload
goods from trucks.
+The terminology of 'Warehouse" in ERPNext is a bit broader though and maybe can be
+regarded as "storage locations". For example you can create a sub-Warehouse which
+practically is a shelf inside your actual location.
+This can become quite a detailed Tree like >Warehouse >Room >Row >Shelf >Box
+
To go to Warehouse, click on Stock and go to Warehouse under Setup. You
could also switch to 'Tree' View or simply type warehouse tree in the awsone bar.
<img class="screenshot" alt="Warehouse" src="{{docs_base_url}}/assets/img/stock/warehouse.png">
In ERPNext, every Warehouse must belong to a specific company, to maintain
-company wise stock balance. The Warehouses are saved with their respective
-company’s abbreviations. This facilitates in identifying which Warehouse
-belongs to which company, at a glance.
+company wise stock balance. In order to do so each Warehouse is linked with an
+Account in the Chart of Accounts (by default of the the same name as the Warehouse
+itself) which captures the monetary equivalent of the goods or materials stored
+in that specific warehouse. If you have a more detailed Warehouse Tree as the one
+described above most likely it's a good idea to link the sub-locations (>room >row >Shelf, ...)
+to the account of the actual Warehouse (the root Warehouse of that Tree) as most
+scenarios do not require to account for value of stock items per Shelf or Box.
+
+Warehouses are saved with their respective company’s abbreviations. This facilitates
+identifying which Warehouse belongs to which company, at a glance.
You can include user restrictions for these Warehouses. In case you do not
wish a particular user to operate on a particular Warehouse, you can refrain
diff --git a/erpnext/docs/user/manual/en/using-erpnext/calendar.md b/erpnext/docs/user/manual/en/using-erpnext/calendar.md
index 1ad325b..5e0ae29 100644
--- a/erpnext/docs/user/manual/en/using-erpnext/calendar.md
+++ b/erpnext/docs/user/manual/en/using-erpnext/calendar.md
@@ -34,7 +34,7 @@
###Permission for Event
-You can set Event as Private or Public. Private Events will be visible only to you, and if any other user selected in the participants table. Instead of User, you can also assign permission for event based on Role.
+You can set Event as Private or Public. Private Events will be visible only to you, and you can also assign permission for event based on Role in the participants table.
Public Event, like Birthday will be visible to all.
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 9e37081..87c070e 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -367,3 +367,5 @@
erpnext.patches.v7_2.contact_address_links
erpnext.patches.v7_2.mark_students_active
erpnext.patches.v7_2.set_null_value_to_fields
+erpnext.patches.v7_2.update_guardian_name_in_student_master
+erpnext.patches.v7_2.update_abbr_in_salary_slips
diff --git a/erpnext/patches/v7_2/update_abbr_in_salary_slips.py b/erpnext/patches/v7_2/update_abbr_in_salary_slips.py
new file mode 100644
index 0000000..aa6965f
--- /dev/null
+++ b/erpnext/patches/v7_2/update_abbr_in_salary_slips.py
@@ -0,0 +1,13 @@
+import frappe
+
+def execute():
+ frappe.reload_doctype('Salary Slip')
+ if not frappe.db.has_column('Salary Detail', 'abbr'):
+ return
+
+ salary_details = frappe.db.sql("""select abbr, salary_component, name from `tabSalary Detail`
+ where abbr is null or abbr = ''""", as_dict=True)
+
+ for salary_detail in salary_details:
+ salary_component_abbr = frappe.get_value("Salary Component", salary_detail.salary_component, "salary_component_abbr")
+ frappe.db.sql("""update `tabSalary Detail` set abbr = %s where name = %s""",(salary_component_abbr, salary_detail.name))
\ No newline at end of file
diff --git a/erpnext/patches/v7_2/update_assessment_modules.py b/erpnext/patches/v7_2/update_assessment_modules.py
index 43c5764..2ea9f6e 100644
--- a/erpnext/patches/v7_2/update_assessment_modules.py
+++ b/erpnext/patches/v7_2/update_assessment_modules.py
@@ -16,6 +16,10 @@
rename_field("Assessment Plan", "grading_structure", "grading_scale")
frappe.reload_doc("schools", "doctype", "assessment_result")
+ frappe.reload_doc("schools", "doctype", "assessment_result_detail")
+ frappe.reload_doc("schools", "doctype", "evaluation_criteria")
+
+
for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"]):
for stud_result in frappe.db.sql("select * from `tabAssessment Result` where parent= %s", assessment.name, as_dict=True):
if stud_result.result:
diff --git a/erpnext/patches/v7_2/update_guardian_name_in_student_master.py b/erpnext/patches/v7_2/update_guardian_name_in_student_master.py
new file mode 100644
index 0000000..6ac4073
--- /dev/null
+++ b/erpnext/patches/v7_2/update_guardian_name_in_student_master.py
@@ -0,0 +1,9 @@
+import frappe
+from frappe.model.utils.rename_field import rename_field
+
+def execute():
+ frappe.reload_doc("schools", "doctype", "student_guardian")
+ student_guardians = frappe.get_all("Student Guardian", fields=["guardian"])
+ for student_guardian in student_guardians:
+ guardian_name = frappe.db.get_value("Guardian", student_guardian.guardian, "guardian_name")
+ frappe.db.sql("update `tabStudent Guardian` set guardian_name = %s where guardian= %s", (guardian_name, student_guardian.guardian))
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student/student.js b/erpnext/schools/doctype/student/student.js
index e69de29..10fefae 100644
--- a/erpnext/schools/doctype/student/student.js
+++ b/erpnext/schools/doctype/student/student.js
@@ -0,0 +1 @@
+cur_frm.add_fetch("guardian", "guardian_name", "guardian_name");
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student/student.json b/erpnext/schools/doctype/student/student.json
index edaae07..50efdc1 100644
--- a/erpnext/schools/doctype/student/student.json
+++ b/erpnext/schools/doctype/student/student.json
@@ -472,6 +472,63 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "section_break_18",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Guardian Details",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "guardians",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Guardians",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student Guardian",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_22",
"fieldtype": "Section Break",
"hidden": 0,
@@ -667,63 +724,6 @@
"bold": 0,
"collapsible": 1,
"columns": 0,
- "fieldname": "section_break_18",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Guardian Details",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "guardians",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Guardians",
- "length": 0,
- "no_copy": 0,
- "options": "Student Guardian",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
"fieldname": "section_break_20",
"fieldtype": "Section Break",
"hidden": 0,
@@ -819,7 +819,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-01 12:55:32.453131",
+ "modified": "2017-01-27 13:19:55.693540",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student",
@@ -836,7 +836,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -857,7 +856,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -875,5 +873,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.json b/erpnext/schools/doctype/student_applicant/student_applicant.json
index 2c6947c..beb5314 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.json
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.json
@@ -988,7 +988,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-17 10:26:13.225135",
+ "modified": "2017-01-27 13:19:56.616331",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Applicant",
@@ -1005,7 +1005,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1023,5 +1022,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_batch_student/student_batch_student.json b/erpnext/schools/doctype/student_batch_student/student_batch_student.json
index 5933f9e..558281b 100644
--- a/erpnext/schools/doctype/student_batch_student/student_batch_student.json
+++ b/erpnext/schools/doctype/student_batch_student/student_batch_student.json
@@ -44,35 +44,6 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "default": "1",
- "fieldname": "active",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Active",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
@@ -123,6 +94,35 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "1",
+ "fieldname": "active",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Active",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
}
],
"hide_heading": 0,
@@ -135,8 +135,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-01-20 18:26:51.242924",
- "modified_by": "neil@frappe.io",
+ "modified": "2017-01-27 14:47:21.125366",
+ "modified_by": "Administrator",
"module": "Schools",
"name": "Student Batch Student",
"name_case": "",
diff --git a/erpnext/schools/doctype/student_group/student_group.json b/erpnext/schools/doctype/student_group/student_group.json
index 9e44f51..01e161e 100644
--- a/erpnext/schools/doctype/student_group/student_group.json
+++ b/erpnext/schools/doctype/student_group/student_group.json
@@ -216,7 +216,7 @@
{
"allow_on_submit": 0,
"bold": 0,
- "collapsible": 1,
+ "collapsible": 0,
"collapsible_depends_on": "",
"columns": 0,
"fieldname": "section_break_6",
@@ -311,7 +311,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-01 12:57:17.125085",
+ "modified": "2017-01-27 14:50:36.107270",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Group",
@@ -328,7 +328,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -349,7 +348,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -368,5 +366,6 @@
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_group_student/student_group_student.json b/erpnext/schools/doctype/student_group_student/student_group_student.json
index df49ba8..5ca7b66 100644
--- a/erpnext/schools/doctype/student_group_student/student_group_student.json
+++ b/erpnext/schools/doctype/student_group_student/student_group_student.json
@@ -44,35 +44,6 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "default": "1",
- "fieldname": "active",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Active",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
@@ -122,6 +93,35 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "1",
+ "fieldname": "active",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Active",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
}
],
"hide_heading": 0,
@@ -134,8 +134,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-01-20 19:11:16.837202",
- "modified_by": "neil@frappe.io",
+ "modified": "2017-01-27 14:49:54.533005",
+ "modified_by": "Administrator",
"module": "Schools",
"name": "Student Group Student",
"name_case": "",
diff --git a/erpnext/schools/doctype/student_guardian/student_guardian.json b/erpnext/schools/doctype/student_guardian/student_guardian.json
index d8e50c9..0a41538 100644
--- a/erpnext/schools/doctype/student_guardian/student_guardian.json
+++ b/erpnext/schools/doctype/student_guardian/student_guardian.json
@@ -22,6 +22,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Guardian",
"length": 0,
"no_copy": 0,
@@ -31,6 +32,35 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "guardian_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Guardian Name",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -49,6 +79,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Relation",
"length": 0,
"no_copy": 0,
@@ -58,6 +89,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -75,7 +107,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-01 14:39:03.576590",
+ "modified": "2017-01-27 13:36:47.177809",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Guardian",
@@ -87,5 +119,6 @@
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py b/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py
index c112b59..b6bedcb 100644
--- a/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py
+++ b/erpnext/schools/report/student_batch_wise_attendance/student_batch_wise_attendance.py
@@ -53,7 +53,7 @@
def get_student_batch_strength(student_batch):
student_batch_strength = frappe.db.sql("""select count(*) from `tabStudent Batch Student`
- where parent = %s""", student_batch)[0][0]
+ where parent = %s and active=1""", student_batch)[0][0]
return student_batch_strength
def get_student_attendance(student_batch, date):
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index cc69403..a9832de 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -130,7 +130,8 @@
throw(_('Special Characters except "-", "#", "." and "/" not allowed in naming series'))
def get_options(self, arg=None):
- return frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series").options
+ if frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series"):
+ return frappe.get_meta(arg or self.select_doc_for_series).get_field("naming_series").options
def get_current(self, arg=None):
"""get series current"""
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 73a04f2..03c23d2 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -218,7 +218,7 @@
return;
frappe.require('assets/js/item-dashboard.min.js', function() {
- var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;"><a href="#stock-balance">Stock Levels</a></h5>');
+ var section = frm.dashboard.add_section('<h5 style="margin-top: 0px;"><a href="#stock-balance">' + __("Stock Levels") + '</a></h5>');
erpnext.item.item_dashboard = new erpnext.stock.ItemDashboard({
parent: section,
item_code: frm.doc.name
diff --git a/erpnext/templates/pages/projects.html b/erpnext/templates/pages/projects.html
index aeee602..765e43f 100644
--- a/erpnext/templates/pages/projects.html
+++ b/erpnext/templates/pages/projects.html
@@ -24,7 +24,7 @@
<div class="clearfix">
<h4 style="float: left;">{{ _("Tasks") }}</h4>
- <a class="btn btn-secondary btn-default btn-sm" style="float: right; position: relative; top: 10px;" href='/tasks?new=1&project={{ doc.project_name }}'>New task</a>
+ <a class="btn btn-secondary btn-default btn-sm" style="float: right; position: relative; top: 10px;" href='/tasks?new=1&project={{ doc.project_name }}'>{{ _("New task") }}</a>
</div>
<p>
@@ -39,7 +39,7 @@
<p><a id= 'more-task' style='display: none;' class='more-tasks small underline'>{{ _("More") }}</a><p>
</div>
{% else %}
- <p class="text-muted">No tasks</p>
+ <p class="text-muted">{{ _("No tasks") }}</p>
{% endif %}
@@ -55,7 +55,7 @@
<p><a class='more-timelogs small underline'>{{ _("More") }}</a><p>
{% endif %}
{% else %}
- <p class="text-muted">No time sheets</p>
+ <p class="text-muted">{{ _("No time sheets") }}</p>
{% endif %}
</div>