Merge pull request #7576 from RobertSchouten/compact_dev
[fix] compact print format not longer ignores format builder
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 67d9a35..35508cc 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.23'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/account/account.json b/erpnext/accounts/doctype/account/account.json
index 7a845ce..3c9f233 100644
--- a/erpnext/accounts/doctype/account/account.json
+++ b/erpnext/accounts/doctype/account/account.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -76,7 +78,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Account Name",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Group",
@@ -134,7 +138,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Root Type",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Report Type",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -278,6 +287,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Parent Account",
@@ -308,7 +318,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Account Type",
@@ -340,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate",
@@ -370,6 +382,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frozen",
@@ -400,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -428,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Balance must be",
@@ -456,6 +471,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lft",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rgt",
@@ -510,6 +527,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Old Parent",
@@ -538,7 +556,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:43:50.121671",
+ "modified": "2017-02-17 16:22:49.249075",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
@@ -554,7 +572,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -575,7 +592,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -596,7 +612,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -617,7 +632,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -638,7 +652,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -654,6 +667,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "",
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json
index 68ab3fc..9a93423 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/ae_uae_chart_template_standard.json
@@ -341,9 +341,7 @@
"Post Dated Cheques Paid": {
"account_type": "Payable"
},
- "Staff Payable": {
- "account_type": "Payable"
- },
+ "Staff Payable": {},
"Suppliers Price Protection": {
"account_type": "Payable"
},
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json
index c7a8045..b3c7891 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/in_standard_chart_of_accounts.json
@@ -136,7 +136,8 @@
"Accounts Payable": {
"Creditors": {
"account_type": "Payable"
- }
+ },
+ "Payroll Payable": {}
},
"Stock Liabilities": {
"Stock Received But Not Billed": {
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json
index b266914..58a89b5 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_default_coa.json
@@ -265,7 +265,8 @@
"Accounts Payable": {
"Creditors": {
"account_type": "Payable"
- }
+ },
+ "Payroll Payable": {}
},
"Duties and Taxes": {
"Deferred Tax Liabilities-Current": {},
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json
index 961912d..15c2468 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/sg_fnb_coa.json
@@ -142,7 +142,8 @@
"Accounts Payable": {
"Creditors":{
"account_type": "Payable"
- }
+ },
+ "Payroll Payable": {}
},
"Duties and Taxes": {
"account_type": "Tax",
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py
index 5824704..c6495c1 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py
@@ -137,7 +137,8 @@
_("Accounts Payable"): {
_("Creditors"): {
"account_type": "Payable"
- }
+ },
+ _("Payroll Payable"): {},
},
_("Stock Liabilities"): {
_("Stock Received But Not Billed"): {
diff --git a/erpnext/accounts/doctype/asset/asset.json b/erpnext/accounts/doctype/asset/asset.json
index d093e69..469daa0 100644
--- a/erpnext/accounts/doctype/asset/asset.json
+++ b/erpnext/accounts/doctype/asset/asset.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Name",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Item Code",
@@ -73,12 +75,43 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "item_name",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Item Name",
+ "length": 0,
+ "no_copy": 0,
+ "options": "item_code.item_name",
+ "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": "asset_category",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Asset Category",
@@ -109,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -138,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -166,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -222,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Warehouse",
@@ -251,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Existing Asset",
@@ -279,6 +318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Date",
@@ -307,6 +347,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -336,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Invoice",
@@ -365,6 +407,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disposal Date",
@@ -393,6 +436,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Journal Entry for Scrap",
@@ -422,6 +466,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -449,6 +494,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gross Purchase Amount",
@@ -479,6 +525,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Value After Useful Life",
@@ -509,6 +556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opening Accumulated Depreciation",
@@ -538,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Value After Depreciation",
@@ -567,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -596,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Method",
@@ -625,6 +676,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Number of Depreciations",
@@ -654,6 +706,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Number of Depreciations Booked",
@@ -682,6 +735,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency of Depreciation (Months)",
@@ -711,6 +765,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Depreciation Date",
@@ -739,6 +794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Schedule",
@@ -767,6 +823,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Schedules",
@@ -796,6 +853,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -825,7 +883,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-18 15:59:19.774500",
+ "modified": "2017-02-17 16:26:19.111939",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset",
@@ -842,7 +900,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -857,7 +914,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 1,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/asset/asset.py b/erpnext/accounts/doctype/asset/asset.py
index 9caac07..b8d0ec8 100644
--- a/erpnext/accounts/doctype/asset/asset.py
+++ b/erpnext/accounts/doctype/asset/asset.py
@@ -81,7 +81,10 @@
frappe.throw(_("Number of Depreciations Booked cannot be greater than Total Number of Depreciations"))
if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(nowdate()):
- frappe.msgprint(_("Next Depreciation Date is entered as past date"))
+ frappe.msgprint(_("Next Depreciation Date is entered as past date"), title=_('Warning'), indicator='red')
+
+ if self.next_depreciation_date and getdate(self.next_depreciation_date) < getdate(self.purchase_date):
+ frappe.throw(_("Next Depreciation Date cannot be before Purchase Date"))
if (flt(self.value_after_depreciation) > flt(self.expected_value_after_useful_life)
and not self.next_depreciation_date):
@@ -242,4 +245,4 @@
"asset_category": asset_category
})
- return ret
\ No newline at end of file
+ return ret
diff --git a/erpnext/accounts/doctype/asset_category/asset_category.json b/erpnext/accounts/doctype/asset_category/asset_category.json
index 0ffdefc..74762d7 100644
--- a/erpnext/accounts/doctype/asset_category/asset_category.json
+++ b/erpnext/accounts/doctype/asset_category/asset_category.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Category Name",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Depreciation Method",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Number of Depreciations",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency of Depreciation (Months)",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -221,7 +228,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:49:42.600981",
+ "modified": "2017-02-17 16:09:52.955332",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Category",
@@ -238,7 +245,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -259,7 +265,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -274,7 +279,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/asset_movement/asset_movement.json b/erpnext/accounts/doctype/asset_movement/asset_movement.json
index 710f3b5..a1189f5 100644
--- a/erpnext/accounts/doctype/asset_movement/asset_movement.json
+++ b/erpnext/accounts/doctype/asset_movement/asset_movement.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Asset",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Source Warehouse",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Target Warehouse",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -221,7 +228,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:49:47.558549",
+ "modified": "2017-02-17 16:09:32.069344",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Asset Movement",
@@ -238,7 +245,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -259,7 +265,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -280,7 +285,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -295,7 +299,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index abc6eba..11dcfe7 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -74,6 +74,9 @@
clearance_date_updated = False
for d in self.get('payment_entries'):
if d.clearance_date:
+ if not d.payment_document:
+ frappe.throw(_("Row #{0}: Payment document is required to complete the trasaction"))
+
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}")
.format(d.idx, d.clearance_date, d.cheque_date))
diff --git a/erpnext/accounts/doctype/budget/budget.json b/erpnext/accounts/doctype/budget/budget.json
index 1e55601..45f549e 100644
--- a/erpnext/accounts/doctype/budget/budget.json
+++ b/erpnext/accounts/doctype/budget/budget.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Budget Against",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Cost Center",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Project",
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Fiscal Year",
@@ -169,6 +174,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Action if Annual Budget Exceeded",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Action if Accumulated Monthly Budget Exceeded",
@@ -258,6 +266,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Monthly Distribution",
@@ -287,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -315,6 +325,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Budget Accounts",
@@ -371,7 +383,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:45:31.079107",
+ "modified": "2017-02-17 16:25:32.342055",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",
@@ -388,7 +400,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -403,7 +414,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.json b/erpnext/accounts/doctype/cost_center/cost_center.json
index f590b5d..9eddeec 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.json
+++ b/erpnext/accounts/doctype/cost_center/cost_center.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Cost Center Name",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Parent Cost Center",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Group",
@@ -194,7 +200,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "lft",
@@ -223,7 +230,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "rgt",
@@ -253,6 +261,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "old_parent",
@@ -278,14 +287,14 @@
"icon": "fa fa-money",
"idx": 1,
"image_view": 0,
- "in_create": 1,
+ "in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:20:40.282432",
+ "modified": "2017-02-17 16:22:27.129572",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",
@@ -301,7 +310,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -322,7 +330,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -343,7 +350,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -364,7 +370,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -385,7 +390,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -401,6 +405,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_cost_center, is_group",
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
index f8284e6..f12de79 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.json
@@ -3,24 +3,30 @@
"allow_import": 1,
"allow_rename": 0,
"autoname": "field:year",
+ "beta": 0,
"creation": "2013-01-22 16:50:25",
"custom": 0,
"description": "**Fiscal Year** represents a Financial Year. All accounting entries and other major transactions are tracked against **Fiscal Year**.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "For e.g. 2012, 2012-13",
"fieldname": "year",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Year Name",
"length": 0,
"no_copy": 0,
@@ -28,7 +34,9 @@
"oldfieldtype": "Data",
"permlevel": 0,
"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,
@@ -39,19 +47,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "disabled",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Disabled",
"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,
@@ -62,12 +76,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "year_start_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Year Start Date",
"length": 0,
"no_copy": 1,
@@ -75,7 +93,9 @@
"oldfieldtype": "Date",
"permlevel": 0,
"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,
@@ -86,18 +106,24 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "year_end_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Year End Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"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,
@@ -108,12 +134,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "companies",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Companies",
"length": 0,
"no_copy": 0,
@@ -121,7 +151,9 @@
"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,
@@ -133,13 +165,14 @@
"hide_toolbar": 0,
"icon": "fa fa-calendar",
"idx": 1,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:47.289982",
+ "modified": "2017-02-17 16:22:08.431278",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",
@@ -266,8 +299,12 @@
"write": 0
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "name",
- "sort_order": "DESC"
+ "sort_order": "DESC",
+ "track_changes": 0,
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index c98e77f..bb01103 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -38,7 +38,7 @@
},
posting_date: function(frm) {
- if(!frm.doc.multi_currency) return;
+ if(!frm.doc.multi_currency || !frm.doc.posting_date) return;
$.each(frm.doc.accounts || [], function(i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);
@@ -86,9 +86,9 @@
};
});
- me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
- return {
- filters: {"name": ["in", ["Customer", "Supplier"]]}
+ me.frm.set_query("party_type", "accounts", function() {
+ return{
+ query: "erpnext.setup.doctype.party_type.party_type.get_party_type"
}
});
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.json b/erpnext/accounts/doctype/journal_entry/journal_entry.json
index 112112f..deb252c 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.json
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,7 +81,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Entry Type",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,7 +172,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -196,7 +202,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -227,6 +234,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -256,6 +264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting Entries",
@@ -286,6 +295,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -312,7 +322,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Reference Number",
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Date",
@@ -370,7 +382,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "User Remark",
@@ -400,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -425,7 +439,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Debit",
@@ -455,7 +470,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Credit",
@@ -487,6 +503,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference (Dr - Cr)",
@@ -518,6 +535,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Difference Entry",
@@ -546,6 +564,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Multi Currency",
@@ -574,6 +593,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount Currency",
@@ -603,6 +623,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Amount",
@@ -631,6 +652,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount in Words",
@@ -658,6 +680,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -685,7 +708,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Clearance Date",
@@ -716,6 +740,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remark",
@@ -745,6 +770,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -771,6 +797,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill No",
@@ -800,6 +827,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill Date",
@@ -829,6 +857,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
@@ -859,6 +888,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off",
@@ -889,6 +919,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Based On",
@@ -918,6 +949,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Outstanding Invoices",
@@ -946,6 +978,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -974,6 +1007,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount",
@@ -1002,6 +1036,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -1030,6 +1065,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pay To / Recd From",
@@ -1057,6 +1093,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1084,6 +1121,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1112,6 +1150,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1142,6 +1181,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1171,6 +1211,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1200,7 +1241,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Opening",
@@ -1232,6 +1274,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Entry",
@@ -1261,6 +1304,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1293,7 +1337,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:53:46.738161",
+ "modified": "2017-02-17 16:17:48.991851",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -1309,7 +1353,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1330,7 +1373,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1351,7 +1393,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1367,8 +1408,10 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
+ "show_name_in_global_search": 0,
"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/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index a176680..28a746e 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -9,6 +9,7 @@
from erpnext.accounts.utils import get_balance_on, get_account_currency
from erpnext.setup.utils import get_company_currency
from erpnext.accounts.party import get_party_account
+from erpnext.hr.doctype.expense_claim.expense_claim import update_reimbursed_amount
class JournalEntry(AccountsController):
def __init__(self, arg1, arg2=None):
@@ -45,6 +46,9 @@
self.accounts = [account for account in self.accounts
if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)]
+ if not self.accounts:
+ frappe.throw("Debit or Credit amount is not found in account table")
+
def on_submit(self):
self.check_credit_limit()
self.make_gl_entries()
@@ -375,7 +379,7 @@
bank_amount = party_amount = total_amount = 0.0
currency = bank_account_currency = party_account_currency = pay_to_recd_from= None
for d in self.get('accounts'):
- if d.party_type and d.party:
+ if d.party_type in ['Customer', 'Supplier'] and d.party:
if not pay_to_recd_from:
pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
"customer_name" if d.party_type=="Customer" else "supplier_name")
@@ -503,11 +507,9 @@
def update_expense_claim(self):
for d in self.accounts:
- if d.reference_type=="Expense Claim":
- amt = frappe.db.sql("""select sum(debit) as amt from `tabJournal Entry Account`
- where reference_type = "Expense Claim" and
- reference_name = %s and docstatus = 1""", d.reference_name ,as_dict=1)[0].amt
- frappe.db.set_value("Expense Claim", d.reference_name , "total_amount_reimbursed", amt)
+ if d.reference_type=="Expense Claim" and d.party:
+ doc = frappe.get_doc("Expense Claim", d.reference_name)
+ update_reimbursed_amount(doc)
def validate_expense_claim(self):
for d in self.accounts:
@@ -835,7 +837,7 @@
# Added posting_date as one of the parameters of get_exchange_rate
@frappe.whitelist()
-def get_exchange_rate(posting_date, account, account_currency=None, company=None,
+def get_exchange_rate(posting_date, account=None, account_currency=None, company=None,
reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None):
from erpnext.setup.utils import get_exchange_rate
account_details = frappe.db.get_value("Account", account,
diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
index 18fccbe..0bd6f86 100644
--- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
+++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.json
@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -20,8 +21,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Account",
"length": 0,
"no_copy": 0,
@@ -33,6 +36,7 @@
"print_hide_if_no_value": 0,
"print_width": "250px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -51,7 +55,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Account Type",
"length": 0,
"no_copy": 0,
@@ -60,6 +66,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,7 +84,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Account Balance",
"length": 0,
"no_copy": 1,
@@ -88,6 +97,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -106,8 +116,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
@@ -119,6 +131,7 @@
"print_hide_if_no_value": 0,
"print_width": "180px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -137,13 +150,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -161,7 +177,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
@@ -170,6 +188,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,
@@ -187,7 +206,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
@@ -196,6 +217,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,
@@ -213,7 +235,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Party Balance",
"length": 0,
"no_copy": 0,
@@ -223,6 +247,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -242,7 +267,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
@@ -251,6 +278,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,
@@ -268,7 +296,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 1,
@@ -278,6 +308,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -295,7 +326,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -303,6 +336,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,
@@ -320,7 +354,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
@@ -329,6 +365,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -346,7 +383,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -354,6 +393,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,
@@ -371,7 +411,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Debit",
"length": 0,
"no_copy": 0,
@@ -381,6 +423,7 @@
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -398,7 +441,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Debit in Company Currency",
"length": 0,
"no_copy": 1,
@@ -410,6 +455,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -427,13 +473,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -451,7 +500,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Credit",
"length": 0,
"no_copy": 0,
@@ -461,6 +512,7 @@
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -478,7 +530,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit in Company Currency",
"length": 0,
"no_copy": 1,
@@ -490,6 +544,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -507,7 +562,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
@@ -515,6 +572,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,
@@ -532,7 +590,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
@@ -542,6 +602,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,
@@ -559,7 +620,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
@@ -569,6 +632,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,
@@ -586,7 +650,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Project",
"length": 0,
"no_copy": 0,
@@ -596,6 +662,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,
@@ -613,13 +680,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -637,7 +707,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 1,
@@ -648,6 +720,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -665,7 +738,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Account",
"length": 0,
"no_copy": 1,
@@ -675,6 +750,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -692,7 +768,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-08-26 01:54:32.267927",
+ "modified": "2017-02-17 16:28:35.118357",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
@@ -701,6 +777,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
index 923e87d..8b03e2e 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Type",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -111,7 +114,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:54:39.560399",
+ "modified": "2017-02-17 16:31:34.207683",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",
@@ -127,7 +130,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -148,7 +150,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -163,6 +164,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index d3dbd31..79a8f2b 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -26,6 +26,14 @@
}
});
+ frm.set_query("party_type", function() {
+ return{
+ "filters": {
+ "name": ["in",["Customer","Supplier"]],
+ }
+ }
+ });
+
frm.set_query("paid_to", function() {
var account_types = in_list(["Receive", "Internal Transfer"], frm.doc.payment_type) ?
["Bank", "Cash"] : party_account_type;
@@ -79,8 +87,13 @@
frm.events.show_general_ledger(frm);
},
+ company: function(frm) {
+ frm.events.hide_unhide_fields(frm);
+ frm.events.set_dynamic_labels(frm);
+ },
+
hide_unhide_fields: function(frm) {
- var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
+ var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
frm.toggle_display("source_exchange_rate",
(frm.doc.paid_amount && frm.doc.paid_from_account_currency != company_currency));
@@ -118,7 +131,7 @@
},
set_dynamic_labels: function(frm) {
- var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
+ var company_currency = frm.doc.company? frappe.get_doc(":Company", frm.doc.company).default_currency: "";
frm.set_currency_labels(["base_paid_amount", "base_received_amount", "base_total_allocated_amount",
"difference_amount"], company_currency);
@@ -131,6 +144,10 @@
frm.set_currency_labels(["total_allocated_amount", "unallocated_amount"], party_account_currency);
+ var currency_field = (frm.doc.payment_type=="Receive") ? "paid_from_account_currency" : "paid_to_account_currency"
+ frm.set_df_property("total_allocated_amount", "options", currency_field);
+ frm.set_df_property("unallocated_amount", "options", currency_field);
+
frm.set_currency_labels(["total_amount", "outstanding_amount", "allocated_amount"],
party_account_currency, "references");
@@ -741,4 +758,4 @@
deductions_remove: function(frm) {
frm.events.set_difference_amount(frm);
}
-})
\ No newline at end of file
+})
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json
index c56a83d..e744a3c 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.json
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Type of Payment",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Payment Type",
@@ -102,101 +105,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
- "fieldname": "party_type",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 1,
- "label": "Party Type",
- "length": 0,
- "no_copy": 0,
- "options": "Customer\nSupplier",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "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": 1,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
- "fieldname": "party",
- "fieldtype": "Dynamic Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 1,
- "label": "Party",
- "length": 0,
- "no_copy": 0,
- "options": "party_type",
- "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": 1,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "party_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Party Name",
- "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_5",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -225,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -253,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -282,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -303,6 +221,158 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
+ "fieldname": "party_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Payment From / To",
+ "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,
+ "default": "",
+ "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)",
+ "fieldname": "party_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 1,
+ "label": "Party Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "DocType",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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": 1,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
+ "fieldname": "party",
+ "fieldtype": "Dynamic Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 1,
+ "label": "Party",
+ "length": 0,
+ "no_copy": 0,
+ "options": "party_type",
+ "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_11",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type",
+ "description": "",
+ "fieldname": "party_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Party Name",
+ "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": 1,
"columns": 0,
"fieldname": "payment_accounts_section",
@@ -311,6 +381,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -340,6 +411,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Balance",
@@ -369,6 +441,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Paid From",
@@ -399,6 +472,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -429,6 +503,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
@@ -458,6 +533,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -486,6 +562,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Paid To",
@@ -516,6 +593,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Currency",
@@ -546,6 +624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account Balance",
@@ -577,6 +656,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
@@ -606,6 +686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount",
@@ -636,6 +717,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -665,6 +747,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount (Company Currency)",
@@ -694,6 +777,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -722,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Amount",
@@ -752,6 +837,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -781,6 +867,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Amount (Company Currency)",
@@ -812,6 +899,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -842,6 +930,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allocate Payment Amount",
@@ -871,6 +960,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment References",
@@ -901,6 +991,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Writeoff",
@@ -930,6 +1021,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Allocated Amount",
@@ -959,6 +1051,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Allocated Amount (Company Currency)",
@@ -988,6 +1081,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Set Exchange Gain / Loss",
@@ -1016,6 +1110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1044,6 +1139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unallocated Amount",
@@ -1073,6 +1169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference Amount (Company Currency)",
@@ -1103,6 +1200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Difference Amount",
@@ -1133,6 +1231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deductions or Loss",
@@ -1161,6 +1260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Deductions or Loss",
@@ -1190,6 +1290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction ID",
@@ -1219,6 +1320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cheque/Reference No",
@@ -1247,6 +1349,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1275,6 +1378,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cheque/Reference Date",
@@ -1304,6 +1408,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Clearance Date",
@@ -1334,6 +1439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1363,6 +1469,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1392,6 +1499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -1420,6 +1528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1447,6 +1556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1476,6 +1586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1505,6 +1616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1533,6 +1645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -1561,7 +1674,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:33:40.371480",
+ "modified": "2017-02-17 16:15:52.917533",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -1578,7 +1691,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1599,7 +1711,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1614,8 +1725,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"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/accounts/doctype/payment_entry_reference/payment_entry_reference.json b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
index 437d695..8104e9b 100644
--- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
+++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.json
@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Type",
"length": 0,
"no_copy": 0,
@@ -49,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Name",
"length": 0,
"no_copy": 0,
@@ -77,7 +82,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Due Date",
"length": 0,
"no_copy": 0,
@@ -104,7 +111,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -130,7 +139,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
@@ -157,7 +168,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Outstanding",
"length": 0,
"no_copy": 0,
@@ -184,7 +197,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Allocated",
"length": 0,
"no_copy": 0,
@@ -211,7 +226,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
@@ -238,7 +255,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-11-14 12:28:51.822341",
+ "modified": "2017-02-17 16:47:17.156256",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",
@@ -248,7 +265,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
index 6a951a0..272e474 100644
--- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
+++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js
@@ -6,12 +6,10 @@
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this
- this.frm.set_query('party_type', function() {
- return {
- filters: {
- "name": ["in", ["Customer", "Supplier"]]
- }
- };
+ this.frm.set_query("party_type", function() {
+ return{
+ query: "erpnext.setup.doctype.party_type.party_type.get_party_type"
+ }
});
this.frm.set_query('receivable_payable_account', function() {
diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
index f77560c..57fce65 100644
--- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
+++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
@@ -22,6 +22,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
@@ -30,6 +31,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -48,7 +50,8 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
- "label": "Reference_name",
+ "in_standard_filter": 0,
+ "label": "Reference Name",
"length": 0,
"no_copy": 0,
"options": "reference_type",
@@ -57,6 +60,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -75,6 +79,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
@@ -82,6 +87,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,6 +106,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 0,
@@ -107,6 +114,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -125,6 +133,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reference Row",
"length": 0,
"no_copy": 0,
@@ -132,6 +141,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -150,6 +160,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -157,6 +168,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,
@@ -175,6 +187,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Invoice Number",
"length": 0,
"no_copy": 0,
@@ -183,6 +196,7 @@
"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,
@@ -201,6 +215,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -208,6 +223,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -226,6 +242,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Allocated amount",
"length": 0,
"no_copy": 0,
@@ -234,6 +251,7 @@
"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,
@@ -252,6 +270,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -259,6 +278,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,
@@ -277,6 +297,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Remark",
"length": 0,
"no_copy": 0,
@@ -284,6 +305,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -302,7 +324,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-08-26 02:08:35.879133",
+ "modified": "2017-01-30 01:04:22.557237",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Payment",
@@ -314,5 +336,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/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json
index e6a3131..23fa245 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.json
+++ b/erpnext/accounts/doctype/payment_request/payment_request.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recipient Message And Payment Details",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Format",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subject",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway Account",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Currency",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount",
@@ -282,6 +291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -312,6 +322,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Sales Invoice",
@@ -340,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -367,6 +379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message",
@@ -395,6 +408,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message Examples",
@@ -424,6 +438,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mute Email",
@@ -452,6 +467,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "payment_url",
@@ -481,6 +497,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway Details",
@@ -509,6 +526,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Gateway",
@@ -538,6 +556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Account",
@@ -567,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Details",
@@ -595,6 +615,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Reference Doctype",
@@ -624,6 +645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Reference Name",
@@ -653,6 +675,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -681,7 +704,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:46:19.662816",
+ "modified": "2017-02-17 16:31:07.618348",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",
@@ -698,7 +721,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -719,7 +741,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -734,7 +755,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.js b/erpnext/accounts/doctype/pricing_rule/pricing_rule.js
index 5a3e651..03bb7ae 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.js
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.js
@@ -91,8 +91,8 @@
}
//Dynamically change the description based on type of margin
-cur_frm.cscript.type = function(doc){
- cur_frm.set_df_property('rate', 'description', doc.type=='Percentage'?'In Percentage %':'In Amount')
+cur_frm.cscript.margin_type = function(doc){
+ cur_frm.set_df_property('margin_rate_or_amount', 'description', doc.margin_type=='Percentage'?'In Percentage %':'In Amount')
}
frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){
@@ -112,4 +112,4 @@
}
}
}
-})
\ No newline at end of file
+})
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
index fdf3db9..49af59b 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -49,6 +50,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Apply On",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Code",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Brand",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Group",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Priority",
@@ -249,6 +257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disable",
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -303,6 +313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Selling",
@@ -330,6 +341,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Buying",
@@ -357,6 +369,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -385,6 +398,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable For",
@@ -414,6 +428,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -443,6 +458,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -472,6 +488,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -501,6 +518,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -530,6 +548,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -559,6 +578,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -588,6 +608,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Type",
@@ -616,6 +637,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -643,6 +665,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Min Qty",
@@ -670,6 +693,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -697,6 +721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Qty",
@@ -724,6 +749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -752,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid From",
@@ -779,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid Upto",
@@ -806,6 +834,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -832,6 +861,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -861,6 +891,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin",
@@ -890,6 +921,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Type",
@@ -919,6 +951,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -948,6 +981,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Rate or Amount",
@@ -976,6 +1010,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1004,6 +1039,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price or Discount",
@@ -1032,6 +1068,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1059,6 +1096,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price",
@@ -1087,6 +1125,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -1115,6 +1154,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "For Price List",
@@ -1143,6 +1183,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1171,6 +1212,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule Help",
@@ -1199,7 +1241,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:19:31.478456",
+ "modified": "2017-02-17 16:21:28.446208",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
@@ -1215,7 +1257,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1236,7 +1277,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1257,7 +1297,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1278,7 +1317,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1299,7 +1337,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1314,8 +1351,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 3c62297..c5d2b31 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -123,12 +123,13 @@
def get_serial_no_for_item(args):
from erpnext.stock.get_item_details import get_serial_no
+
item_details = frappe._dict({
"doctype": args.doctype,
"name": args.name,
"serial_no": args.serial_no
})
- if args.get("parenttype") in ("Sales Invoice", "Delivery Note"):
+ if args.get("parenttype") in ("Sales Invoice", "Delivery Note") and args.qty > 0:
item_details.serial_no = get_serial_no(args)
return item_details
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index dfc3118..ff3a168 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Supplier",
@@ -112,6 +115,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
@@ -141,7 +145,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Invoice No",
@@ -171,6 +176,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Paid",
@@ -200,6 +206,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Return",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -256,7 +264,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -285,7 +294,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
@@ -314,7 +324,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Invoice Date",
@@ -344,6 +355,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -373,7 +385,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -403,6 +416,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Return Against Purchase Invoice",
@@ -432,6 +446,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -459,7 +474,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Supplier Address",
@@ -487,7 +503,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -517,6 +534,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -544,6 +562,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -571,6 +590,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -598,6 +618,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -625,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -653,6 +675,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Shipping Address",
@@ -682,6 +705,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -710,6 +734,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -738,6 +763,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -769,6 +795,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -799,6 +826,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -825,6 +853,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -853,6 +882,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -881,6 +911,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -909,6 +940,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -936,6 +968,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -966,6 +999,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Stock",
@@ -994,6 +1028,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -1024,6 +1059,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1050,6 +1086,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1080,6 +1117,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1110,6 +1148,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1136,6 +1175,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1165,6 +1205,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1195,6 +1236,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1224,6 +1266,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1254,6 +1297,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Taxes and Charges",
@@ -1284,6 +1328,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1312,6 +1357,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1341,6 +1387,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added (Company Currency)",
@@ -1371,6 +1418,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted (Company Currency)",
@@ -1401,6 +1449,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1431,6 +1480,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1458,6 +1508,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added",
@@ -1488,6 +1539,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted",
@@ -1518,6 +1570,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1548,6 +1601,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1577,6 +1631,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1606,6 +1661,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1635,6 +1691,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1662,6 +1719,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1690,6 +1748,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1719,6 +1778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1746,6 +1806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1777,6 +1838,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1806,6 +1868,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1834,6 +1897,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -1864,6 +1928,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -1893,6 +1958,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Advance",
@@ -1922,7 +1988,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Outstanding Amount",
@@ -1955,6 +2022,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payments",
@@ -1983,6 +2051,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -2012,6 +2081,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cash/Bank Account",
@@ -2041,6 +2111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2069,6 +2140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount",
@@ -2098,6 +2170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount (Company Currency)",
@@ -2129,6 +2202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off",
@@ -2157,6 +2231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount",
@@ -2185,6 +2260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount (Company Currency)",
@@ -2214,6 +2290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2242,6 +2319,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Account",
@@ -2271,6 +2349,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Cost Center",
@@ -2300,6 +2379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advance Payments",
@@ -2329,6 +2409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Advances Paid",
@@ -2358,6 +2439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advances",
@@ -2389,6 +2471,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -2417,6 +2500,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -2445,6 +2529,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions1",
@@ -2472,6 +2557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied",
@@ -2501,6 +2587,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied",
@@ -2530,6 +2617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Warehouse",
@@ -2561,6 +2649,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplied Items",
@@ -2590,6 +2679,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -2618,6 +2708,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -2647,6 +2738,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -2677,6 +2769,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -2705,6 +2798,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -2734,7 +2828,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit To",
@@ -2765,6 +2860,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Account Currency",
@@ -2795,7 +2891,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Opening",
@@ -2826,6 +2923,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Expense Account",
@@ -2855,6 +2953,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2882,7 +2981,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Status",
"length": 0,
"no_copy": 0,
@@ -2910,6 +3011,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Time",
@@ -2940,6 +3042,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -2970,6 +3073,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Warehouse",
@@ -2994,13 +3098,14 @@
"collapsible": 1,
"collapsible_depends_on": "is_recurring",
"columns": 0,
- "depends_on": "eval:doc.docstatus<2",
+ "depends_on": "eval:doc.docstatus<2 && !doc.__islocal",
"fieldname": "recurring_invoice",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Invoice",
@@ -3031,6 +3136,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Recurring",
@@ -3060,6 +3166,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Type",
@@ -3090,6 +3197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -3119,6 +3227,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -3147,6 +3256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Submit on creation",
@@ -3177,6 +3287,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notify by email",
@@ -3207,6 +3318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Repeat on Day of Month",
@@ -3236,6 +3348,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -3263,6 +3376,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -3292,6 +3406,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Date",
@@ -3321,6 +3436,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Id",
@@ -3350,6 +3466,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notification Email Address",
@@ -3378,6 +3495,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Print Format",
@@ -3409,7 +3527,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-09 14:18:47.094777",
+ "modified": "2017-02-22 18:16:09.890488",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
@@ -3425,7 +3543,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3446,7 +3563,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3467,7 +3583,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3488,7 +3603,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3509,7 +3623,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -3525,9 +3638,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
index d8c9b04..dffe72e 100644
--- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py
@@ -19,6 +19,7 @@
class TestPurchaseInvoice(unittest.TestCase):
def setUp(self):
unlink_payment_on_cancel_of_invoice()
+ frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
def tearDown(self):
unlink_payment_on_cancel_of_invoice(0)
diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
index 6f8e219..6102d3e 100755
--- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
+++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
@@ -21,7 +21,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -194,6 +200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -223,6 +230,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity and Rate",
@@ -250,6 +258,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received Qty",
@@ -278,6 +287,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Qty",
@@ -307,6 +317,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Qty",
@@ -335,6 +346,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -361,6 +373,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
@@ -389,6 +402,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Conversion Factor",
@@ -416,6 +430,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -442,6 +457,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -471,6 +487,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -498,6 +515,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -524,6 +542,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -552,6 +571,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -578,6 +598,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate ",
@@ -608,6 +629,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -638,6 +660,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -664,6 +687,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -694,6 +718,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -724,6 +749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -752,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -779,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -808,6 +836,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -837,6 +866,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -864,6 +894,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -893,6 +924,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -922,6 +954,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -951,6 +984,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accepted Warehouse",
@@ -980,6 +1014,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Warehouse",
@@ -1010,6 +1045,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1039,6 +1075,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1068,6 +1105,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1096,6 +1134,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1124,6 +1163,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Serial No",
@@ -1152,6 +1192,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting",
@@ -1179,6 +1220,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Head",
@@ -1211,6 +1253,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1236,7 +1279,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1267,6 +1311,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1299,6 +1344,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -1316,6 +1362,35 @@
"unique": 0
},
{
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "is_sample_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Sample Item",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
@@ -1326,6 +1401,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -1355,7 +1431,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1387,6 +1464,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1416,6 +1494,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Amount",
@@ -1445,7 +1524,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order",
@@ -1476,6 +1556,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "BOM",
@@ -1505,6 +1586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1531,6 +1613,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Fixed Asset",
@@ -1560,6 +1643,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset",
@@ -1588,7 +1672,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order Item",
@@ -1617,7 +1702,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipt",
@@ -1648,6 +1734,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1674,7 +1761,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "PR Detail",
@@ -1704,6 +1792,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valuation Rate",
@@ -1732,6 +1821,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied Cost",
@@ -1760,6 +1850,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Landed Cost Voucher Amount",
@@ -1788,7 +1879,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-11-16 16:04:52.465169",
+ "modified": "2017-02-17 16:28:26.719053",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",
@@ -1797,7 +1888,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index bd54776..070dbeb 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -30,6 +30,7 @@
'doc': doc,
'default_customer': pos_profile.get('customer'),
'items': get_items_list(pos_profile),
+ 'item_groups': get_item_group(pos_profile),
'customers': get_customers_list(pos_profile),
'serial_no_data': get_serial_no_data(pos_profile, doc.company),
'batch_no_data': get_batch_no_data(),
@@ -140,6 +141,15 @@
disabled = 0 and has_variants = 0 and is_sales_item = 1 and {cond}
""".format(cond=cond), tuple(item_groups), as_dict=1)
+def get_item_group(pos_profile):
+ if pos_profile.get('item_groups'):
+ item_groups = []
+ for d in pos_profile.get('item_groups'):
+ item_groups.extend(get_child_nodes('Item Group', d.item_group))
+ return item_groups
+ else:
+ return frappe.db.sql_list("""Select name from `tabItem Group` order by name""")
+
def get_customers_list(pos_profile):
cond = "1=1"
customer_groups = []
@@ -276,11 +286,33 @@
customer_doc = frappe.new_doc('Customer')
customer_doc.customer_name = doc.get('customer')
customer_doc.customer_type = 'Company'
- customer_doc.customer_group = doc.get('customer_group')
- customer_doc.territory = doc.get('territory')
+ customer_doc.customer_group = frappe.db.get_single_value('Selling Settings', 'customer_group')
+ customer_doc.territory = frappe.db.get_single_value('Selling Settings', 'territory')
+ customer_doc.flags.ignore_mandatory = True
customer_doc.save(ignore_permissions = True)
frappe.db.commit()
doc['customer'] = customer_doc.name
+ if doc.get('contact_details'):
+ args = json.loads(doc.get("contact_details"))
+ make_address(doc, args, customer_doc.name)
+
+def make_address(doc, args, customer):
+ if args.get("address_line1"):
+ address = frappe.new_doc('Address')
+ address.address_line1 = args.get('address_line1')
+ address.address_line2 = args.get('address_line2')
+ address.city = args.get('city')
+ address.state = args.get('state')
+ address.zip_code = args.get('zip_code')
+ address.email_id = args.get('email_id')
+ address.flags.ignore_mandatory = True
+ address.country = frappe.db.get_value('Company', doc.get('company'), 'country')
+ address.append('links',{
+ 'link_doctype': 'Customer',
+ 'link_name': customer
+ })
+ address.save(ignore_permissions = True)
+ frappe.db.commit()
def validate_item(doc):
for item in doc.get('items'):
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index 7ade318..ae8fd8a 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -6,7 +6,7 @@
"beta": 0,
"creation": "2013-05-24 19:29:05",
"custom": 0,
- "default_print_format": "Standard",
+ "default_print_format": "Sample Print",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -141,6 +145,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -170,6 +175,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is POS",
@@ -200,6 +206,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Return",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Offline POS Name",
@@ -256,6 +264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -283,7 +292,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -312,7 +322,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Due Date",
@@ -341,7 +352,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -371,7 +383,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -402,6 +415,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -433,6 +447,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Return Against Sales Invoice",
@@ -463,6 +478,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -491,6 +507,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -519,6 +536,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -546,6 +564,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -574,6 +593,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -601,6 +621,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -628,6 +649,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -656,6 +678,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -682,7 +705,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address Name",
@@ -712,6 +736,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -740,7 +765,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -769,6 +795,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -777,7 +804,7 @@
"options": "Territory",
"permlevel": 0,
"precision": "",
- "print_hide": 0,
+ "print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
@@ -799,6 +826,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -827,6 +855,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -858,6 +887,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -888,6 +918,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -915,6 +946,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -945,6 +977,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -974,6 +1007,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -1002,6 +1036,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -1029,6 +1064,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1058,6 +1094,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Stock",
@@ -1087,6 +1124,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -1117,6 +1155,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Packing List",
@@ -1145,6 +1184,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Packed Items",
@@ -1173,6 +1213,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Product Bundle Help",
@@ -1202,6 +1243,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Time Sheet List",
@@ -1230,6 +1272,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Time Sheets",
@@ -1260,6 +1303,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Billing Amount",
@@ -1288,6 +1332,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1314,6 +1359,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1343,6 +1389,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1373,6 +1420,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1399,6 +1447,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1427,6 +1476,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1456,6 +1506,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1485,6 +1536,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1515,6 +1567,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1541,6 +1594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Rule",
@@ -1570,6 +1624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1596,6 +1651,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Taxes and Charges",
@@ -1626,6 +1682,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1654,6 +1711,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1680,6 +1738,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1710,6 +1769,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1737,6 +1797,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1766,6 +1827,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1795,6 +1857,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1824,6 +1887,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1853,6 +1917,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1879,6 +1944,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1907,6 +1973,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1935,6 +2002,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1963,7 +2031,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1994,6 +2063,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -2025,6 +2095,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -2054,6 +2125,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2082,6 +2154,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -2112,6 +2185,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total",
@@ -2142,6 +2216,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -2171,6 +2246,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Advance",
@@ -2201,6 +2277,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Outstanding Amount",
@@ -2232,6 +2309,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advance Payments",
@@ -2261,6 +2339,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Advances Received",
@@ -2290,6 +2369,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advances",
@@ -2322,6 +2402,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payments",
@@ -2351,6 +2432,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cash/Bank Account",
@@ -2381,6 +2463,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Invoice Payment",
@@ -2410,6 +2493,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2437,6 +2521,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount (Company Currency)",
@@ -2466,6 +2551,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2494,6 +2580,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount",
@@ -2524,6 +2611,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2551,6 +2639,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Base Change Amount (Company Currency)",
@@ -2580,6 +2669,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2607,6 +2697,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Change Amount",
@@ -2636,6 +2727,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account for Change Amount",
@@ -2667,6 +2759,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off",
@@ -2696,6 +2789,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount",
@@ -2724,6 +2818,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Amount (Company Currency)",
@@ -2754,6 +2849,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Outstanding Amount",
@@ -2782,6 +2878,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2810,6 +2907,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Account",
@@ -2839,6 +2937,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Cost Center",
@@ -2868,6 +2967,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -2897,6 +2997,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -2927,6 +3028,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions Details",
@@ -2956,6 +3058,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -2984,6 +3087,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -3014,6 +3118,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -3042,6 +3147,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -3069,6 +3175,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -3100,6 +3207,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -3129,6 +3237,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -3159,6 +3268,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -3186,7 +3296,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -3216,6 +3327,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -3246,6 +3358,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting Details",
@@ -3275,7 +3388,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Debit To",
@@ -3306,6 +3420,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Account Currency",
@@ -3336,7 +3451,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Opening Entry",
@@ -3367,6 +3483,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "C-Form Applicable",
@@ -3395,6 +3512,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "C-Form No",
@@ -3423,6 +3541,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -3450,6 +3569,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Time",
@@ -3479,6 +3599,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -3509,6 +3630,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission",
@@ -3537,7 +3659,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -3568,6 +3691,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -3596,6 +3720,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission Rate (%)",
@@ -3625,6 +3750,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Commission",
@@ -3656,6 +3782,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team",
@@ -3683,6 +3810,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team1",
@@ -3708,16 +3836,17 @@
"collapsible": 1,
"collapsible_depends_on": "is_recurring",
"columns": 0,
- "depends_on": "eval:doc.docstatus<2",
+ "depends_on": "eval:doc.docstatus<2 && !doc.__islocal",
"fieldname": "recurring_invoice",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Recurring",
+ "label": "Recurring Invoice",
"length": 0,
"no_copy": 0,
"options": "fa fa-time",
@@ -3743,6 +3872,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Settings",
@@ -3773,6 +3903,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Recurring",
@@ -3802,6 +3933,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Document",
@@ -3832,6 +3964,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency",
@@ -3862,6 +3995,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Repeat on Day of Month",
@@ -3891,6 +4025,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -3919,6 +4054,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Submit on creation",
@@ -3949,6 +4085,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notify by email",
@@ -3979,6 +4116,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notification Email Address",
@@ -4008,6 +4146,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Print Format",
@@ -4037,6 +4176,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "This Document",
@@ -4067,6 +4207,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -4096,6 +4237,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -4125,6 +4267,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Date",
@@ -4152,6 +4295,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Income Account",
@@ -4183,7 +4327,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2017-01-18 13:21:13.226318",
+ "modified": "2017-02-22 18:20:35.085909",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",
@@ -4199,7 +4343,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -4220,7 +4363,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -4241,7 +4383,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -4262,7 +4403,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -4278,9 +4418,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "posting_date, due_date, customer, base_grand_total, outstanding_amount",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index 3eb2f7d..3dfe680 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -963,40 +963,6 @@
si.insert()
self.assertEqual(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
- def test_party_status(self):
- from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
- from frappe.utils import random_string
-
- customer_name = 'test customer for status'
-
- if frappe.db.exists('Customer', customer_name):
- customer = frappe.get_doc('Customer', customer_name)
- customer.db_set('status', 'Active')
- else:
- customer = frappe.get_doc({
- 'doctype': 'Customer',
- 'customer_name': customer_name,
- 'customer_group': 'Commercial',
- 'customer_type': 'Individual',
- 'territory': 'Rest of the World'
- }).insert()
-
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- invoice = create_sales_invoice(customer="test customer for status",
- debit_to="_Test Receivable - _TC",
- currency="USD", conversion_rate=50)
-
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- pe = get_payment_entry(invoice.doctype, invoice.name)
- pe.reference_no = random_string(10)
- pe.reference_date = invoice.posting_date
- pe.insert()
- pe.submit()
-
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
def test_outstanding_amount_after_advance_jv_cancelation(self):
from erpnext.accounts.doctype.journal_entry.test_journal_entry \
import test_records as jv_test_records
diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
index 944230b..4219053 100644
--- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
+++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Barcode",
@@ -48,7 +49,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -105,6 +108,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -134,6 +138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Item Code",
@@ -161,6 +166,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Edit Description",
@@ -189,6 +195,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -220,6 +227,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -247,6 +255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -304,6 +314,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -331,6 +342,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Quantity",
@@ -360,6 +372,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -390,6 +403,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -416,6 +430,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
@@ -444,6 +459,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -474,6 +490,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount and Margin",
@@ -503,6 +520,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -532,6 +550,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -560,6 +579,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Type",
@@ -590,6 +610,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Rate or Amount",
@@ -619,6 +640,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Margin",
@@ -647,6 +669,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -673,6 +696,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate",
@@ -703,6 +727,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -733,6 +758,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -759,6 +785,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -789,6 +816,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -819,6 +847,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -847,6 +876,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -874,6 +904,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -903,6 +934,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -932,6 +964,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -959,6 +992,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -988,6 +1022,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -1018,6 +1053,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Drop Ship",
@@ -1046,6 +1082,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivered By Supplier",
@@ -1074,6 +1111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting Details",
@@ -1100,7 +1138,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Income Account",
@@ -1132,7 +1171,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Account",
@@ -1162,6 +1202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1188,7 +1229,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1222,6 +1264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Details",
@@ -1249,6 +1292,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Warehouse",
@@ -1279,6 +1323,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Warehouse (Optional)",
@@ -1309,6 +1354,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1338,6 +1384,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1366,6 +1413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1382,6 +1430,35 @@
"unique": 0
},
{
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "is_sample_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Sample Item",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
@@ -1391,7 +1468,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1421,7 +1499,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1451,7 +1530,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand Name",
@@ -1481,6 +1561,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1510,6 +1591,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Available Batch Qty at Warehouse",
@@ -1540,6 +1622,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Available Qty at Warehouse",
@@ -1569,6 +1652,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "References",
@@ -1596,7 +1680,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order",
@@ -1626,7 +1711,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order Item",
@@ -1656,6 +1742,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1682,7 +1769,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Note",
@@ -1712,7 +1800,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Note Item",
@@ -1742,6 +1831,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivered Qty",
@@ -1771,6 +1861,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Fixed Asset",
@@ -1799,6 +1890,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset",
@@ -1828,6 +1920,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1855,6 +1948,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1882,7 +1976,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-11-16 16:04:02.438952",
+ "modified": "2017-02-17 16:28:57.719409",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",
@@ -1891,7 +1985,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json
index 1191ea7..a0a6312 100644
--- a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json
+++ b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.json
@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Time Sheet",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,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,
@@ -48,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Billing Hours",
"length": 0,
"no_copy": 0,
@@ -57,6 +63,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -74,7 +81,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Billing Amount",
"length": 0,
"no_copy": 0,
@@ -83,6 +92,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,7 +110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Timesheet Detail",
"length": 0,
"no_copy": 1,
@@ -109,6 +121,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -126,7 +139,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-09 14:01:04.095775",
+ "modified": "2017-02-17 16:47:04.413420",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Timesheet",
@@ -136,7 +149,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.json b/erpnext/accounts/doctype/tax_rule/tax_rule.json
index df7d872..a746daf 100644
--- a/erpnext/accounts/doctype/tax_rule/tax_rule.json
+++ b/erpnext/accounts/doctype/tax_rule/tax_rule.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Tax Type",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Use for Shopping Cart",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Tax Template",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Tax Template",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Filters",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -226,6 +233,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -255,6 +263,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing City",
@@ -283,6 +292,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing County",
@@ -311,6 +321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing State",
@@ -339,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Country",
@@ -368,6 +380,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -426,6 +440,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Type",
@@ -455,6 +470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping City",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping County",
@@ -511,6 +528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping State",
@@ -539,6 +557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Country",
@@ -568,6 +587,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Validity",
@@ -596,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -624,6 +645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -651,6 +673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -679,6 +702,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -707,6 +731,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Priority",
@@ -735,6 +760,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -762,6 +788,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -791,7 +818,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-13 15:56:28.704122",
+ "modified": "2017-02-17 16:22:42.501765",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Rule",
@@ -808,7 +835,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -823,7 +849,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
-}
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index 13abe14..ed54ab4 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -1,7 +1,7 @@
frappe.provide("erpnext.pos");
{% include "erpnext/public/js/controllers/taxes_and_totals.js" %}
-frappe.pages['pos'].on_page_load = function(wrapper) {
+frappe.pages['pos'].on_page_load = function (wrapper) {
var page = frappe.ui.make_app_page({
parent: wrapper,
title: __('Point of Sale'),
@@ -11,15 +11,15 @@
wrapper.pos = new erpnext.pos.PointOfSale(wrapper)
}
-frappe.pages['pos'].refresh = function(wrapper) {
+frappe.pages['pos'].refresh = function (wrapper) {
window.onbeforeunload = function () {
return wrapper.pos.beforeunload()
}
}
-
erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
- init: function(wrapper){
+ init: function (wrapper) {
+ this.page_len = 20;
this.page = wrapper.page;
this.wrapper = $(wrapper).find('.page-content');
this.set_indicator();
@@ -28,13 +28,13 @@
this.si_docs = this.get_doc_from_localstorage();
},
- beforeunload: function(e){
- if(this.connection_status == false && frappe.get_route()[0] == "pos"){
+ beforeunload: function (e) {
+ if (this.connection_status == false && frappe.get_route()[0] == "pos") {
e = e || window.event;
// For IE and Firefox prior to version 4
if (e) {
- e.returnValue = __("You are in offline mode. You will not be able to reload until you have network.");
+ e.returnValue = __("You are in offline mode. You will not be able to reload until you have network.");
return
}
@@ -43,23 +43,23 @@
}
},
- check_internet_connection: function(){
+ check_internet_connection: function () {
var me = this;
//Check Internet connection after every 30 seconds
- setInterval(function(){
+ setInterval(function () {
me.set_indicator();
}, 5000)
},
- set_indicator: function(){
+ set_indicator: function () {
var me = this;
// navigator.onLine
this.connection_status = false;
this.page.set_indicator(__("Offline"), "grey")
frappe.call({
- method:"frappe.handler.ping",
- callback: function(r){
- if(r.message){
+ method: "frappe.handler.ping",
+ callback: function (r) {
+ if (r.message) {
me.connection_status = true;
me.page.set_indicator(__("Online"), "green")
}
@@ -67,27 +67,23 @@
})
},
- onload: function(){
+ onload: function () {
var me = this;
- this.get_data_from_server(function(){
+ this.get_data_from_server(function () {
me.create_new();
});
},
- make_menu_list: function(){
+ make_menu_list: function () {
var me = this;
- this.page.add_menu_item(__("New Sales Invoice"), function() {
+ this.page.add_menu_item(__("New Sales Invoice"), function () {
me.save_previous_entry();
me.create_new();
})
- this.page.add_menu_item(__("View Offline Records"), function(){
- me.show_unsync_invoice_list();
- });
-
- this.page.add_menu_item(__("Sync Master Data"), function(){
- me.get_data_from_server(function(){
+ this.page.add_menu_item(__("Sync Master Data"), function () {
+ me.get_data_from_server(function () {
me.load_data(false);
me.make_customer();
me.make_item_list();
@@ -95,83 +91,29 @@
})
});
- this.page.add_menu_item(__("Sync Offline Invoices"), function(){
+ this.page.add_menu_item(__("Sync Offline Invoices"), function () {
me.sync_sales_invoice()
});
- this.page.add_menu_item(__("POS Profile"), function() {
+ this.page.add_menu_item(__("POS Profile"), function () {
frappe.set_route('List', 'POS Profile');
});
},
- show_unsync_invoice_list: function(){
- var me = this;
- this.si_docs = this.get_doc_from_localstorage();
- this.list_dialog = new frappe.ui.Dialog({
- title: 'Invoice List'
- });
-
- this.list_dialog.show();
- this.list_body = this.list_dialog.body;
- if(me.pos_profile_data["allow_delete"]) {
- this.list_dialog.set_primary_action(__("Delete"), function() {
- frappe.confirm(__("Delete permanently?"), function () {
- me.delete_records();
- })
- }).addClass("btn-danger");
- this.toggle_primary_action();
- }
-
- if(this.si_docs.length > 0){
- me.render_offline_data();
- me.dialog_actions()
- }else{
- $(this.list_body).append(repl('<div class="media-heading">%(message)s</div>', {'message': __("All records are synced.")}))
- }
- },
-
- render_offline_data: function() {
+ dialog_actions: function () {
var me = this;
- this.removed_items = [];
- $(this.list_body).empty();
-
- $(this.list_body).append('<div class="row list-row list-row-head pos-invoice-list">\
- <div class="col-xs-1"><input class="list-select-all" type="checkbox"></div>\
- <div class="col-xs-3">Customer</div>\
- <div class="col-xs-2 text-left">Status</div>\
- <div class="col-xs-3 text-right">Paid Amount</div>\
- <div class="col-xs-3 text-right">Grand Total</div>\
- </div>')
-
- $.each(this.si_docs, function(index, data){
- for(key in data) {
- $(frappe.render_template("pos_invoice_list", {
- sr: index + 1,
- name: key,
- customer: data[key].customer,
- paid_amount: format_currency(data[key].paid_amount, me.frm.doc.currency),
- grand_total: format_currency(data[key].grand_total, me.frm.doc.currency),
- data: me.get_doctype_status(data[key])
- })).appendTo($(me.list_body));
- }
- })
- },
-
- dialog_actions: function() {
- var me = this;
-
- $(this.list_body).find('.list-column').click(function() {
+ $(this.list_body).find('.list-column').click(function () {
me.name = $(this).parents().attr('invoice-name')
me.edit_record();
})
- $(this.list_body).find('.list-select-all').click(function() {
+ $(this.list_body).find('.list-select-all').click(function () {
me.removed_items = [];
$(me.list_body).find('.list-delete').prop("checked", $(this).is(":checked"))
- if($(this).is(":checked")) {
- $.each(me.si_docs, function(index, data){
- for(key in data) {
+ if ($(this).is(":checked")) {
+ $.each(me.si_docs, function (index, data) {
+ for (key in data) {
me.removed_items.push(key)
}
})
@@ -180,9 +122,9 @@
me.toggle_primary_action();
})
- $(this.list_body).find('.list-delete').click(function() {
+ $(this.list_body).find('.list-delete').click(function () {
me.name = $(this).parent().parent().attr('invoice-name');
- if($(this).is(":checked")) {
+ if ($(this).is(":checked")) {
me.removed_items.push(me.name);
} else {
me.removed_items.pop(me.name)
@@ -192,101 +134,103 @@
})
},
- edit_record: function() {
+ edit_record: function () {
var me = this;
doc_data = this.get_invoice_doc(this.si_docs);
- if(doc_data){
+ if (doc_data) {
this.frm.doc = doc_data[0][this.name];
this.set_missing_values();
this.refresh(false);
this.disable_input_field();
- this.list_dialog.hide();
+ this.list_dialog && this.list_dialog.hide();
}
},
- delete_records: function() {
+ delete_records: function () {
var me = this;
this.remove_doc_from_localstorage()
this.update_localstorage();
- this.render_offline_data();
this.dialog_actions();
this.toggle_primary_action();
},
- toggle_primary_action: function() {
+ toggle_primary_action: function () {
var me = this;
- if(this.removed_items && this.removed_items.length > 0) {
- $(this.list_dialog.wrapper).find('.btn-danger').show();
+ if(this.frm.doc.allow_delete) {
+ if (this.removed_items && this.removed_items.length > 0) {
+ $(this.wrapper).find('.btn-danger').show();
+ } else {
+ $(this.wrapper).find('.btn-danger').hide();
+ }
+ }
+ },
+
+ get_doctype_status: function (doc) {
+ if (doc.docstatus == 0) {
+ return { status: "Draft", indicator: "red" }
+ } else if (doc.outstanding_amount == 0) {
+ return { status: "Paid", indicator: "green" }
} else {
- $(this.list_dialog.wrapper).find('.btn-danger').hide();
+ return { status: "Submitted", indicator: "blue" }
}
},
- get_doctype_status: function(doc){
- if(doc.docstatus == 0) {
- return {status: "Draft", indicator: "red"}
- }else if(doc.outstanding_amount == 0) {
- return {status: "Paid", indicator: "green"}
- }else {
- return {status: "Submitted", indicator: "blue"}
- }
- },
-
- set_missing_values: function(){
+ set_missing_values: function () {
var me = this;
doc = JSON.parse(localStorage.getItem('doc'))
- if(this.frm.doc.payments.length == 0){
+ if (this.frm.doc.payments.length == 0) {
this.frm.doc.payments = doc.payments;
this.calculate_outstanding_amount();
}
- if(this.frm.doc.customer){
+ if (this.frm.doc.customer) {
this.party_field.$input.val(this.frm.doc.customer);
}
- if(!this.frm.doc.write_off_account){
+ if (!this.frm.doc.write_off_account) {
this.frm.doc.write_off_account = doc.write_off_account
}
- if(!this.frm.doc.account_for_change_amount){
+ if (!this.frm.doc.account_for_change_amount) {
this.frm.doc.account_for_change_amount = doc.account_for_change_amount
}
},
- get_invoice_doc: function(si_docs){
+ get_invoice_doc: function (si_docs) {
var me = this;
this.si_docs = this.get_doc_from_localstorage();
- return $.grep(this.si_docs, function(data){
- for(key in data){
+ return $.grep(this.si_docs, function (data) {
+ for (key in data) {
return key == me.name
}
})
},
- get_data_from_server: function(callback){
+ get_data_from_server: function (callback) {
var me = this;
frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.pos.get_pos_data",
freeze: true,
freeze_message: __("Master data syncing, it might take some time"),
- callback: function(r){
+ callback: function (r) {
me.init_master_data(r)
localStorage.setItem('doc', JSON.stringify(r.message.doc));
me.set_interval_for_si_sync();
me.check_internet_connection();
- if(callback){
+ if (callback) {
callback();
}
}
})
},
- init_master_data: function(r){
+ init_master_data: function (r) {
var me = this;
this.meta = r.message.meta;
this.item_data = r.message.items;
+ this.item_groups = r.message.item_groups;
this.customers = r.message.customers;
this.serial_no_data = r.message.serial_no_data;
this.batch_no_data = r.message.batch_no_data;
@@ -301,48 +245,51 @@
this.letter_head = (this.pos_profile_data.length > 0) ? frappe.boot.letter_heads[this.pos_profile_data[letter_head]] : {};
},
- save_previous_entry : function(){
- if(this.frm.doc.docstatus < 1 && this.frm.doc.items.length > 0){
- this.create_invoice()
+ save_previous_entry: function () {
+ if (this.frm.doc.docstatus < 1 && this.frm.doc.items.length > 0) {
+ this.create_invoice();
}
},
- create_new: function(){
+ create_new: function () {
var me = this;
this.frm = {}
- this.name = '';
+ this.name = null;
this.load_data(true);
this.setup();
},
- load_data: function(load_doc){
+ load_data: function (load_doc) {
var me = this;
this.items = this.item_data;
this.actual_qty_dict = {};
- if(load_doc) {
- this.frm.doc = JSON.parse(localStorage.getItem('doc'));
+ if (load_doc) {
+ this.frm.doc = JSON.parse(localStorage.getItem('doc'));
}
- $.each(this.meta, function(i, data){
+ $.each(this.meta, function (i, data) {
frappe.meta.sync(data)
locals["DocType"][data.name] = data;
})
- this.print_template_data = frappe.render_template("print_template", {content: this.print_template,
- title:"POS", base_url: frappe.urllib.get_base_url(), print_css: frappe.boot.print_css,
- print_settings: this.print_settings, header: this.letter_head.header, footer: this.letter_head.footer})
+ this.print_template_data = frappe.render_template("print_template", {
+ content: this.print_template,
+ title: "POS", base_url: frappe.urllib.get_base_url(), print_css: frappe.boot.print_css,
+ print_settings: this.print_settings, header: this.letter_head.header, footer: this.letter_head.footer
+ })
},
- setup: function(){
+ setup: function () {
+ this.frm.doc.allow_delete = this.pos_profile_data["allow_delete"];
this.wrapper.html(frappe.render_template("pos", this.frm.doc));
this.set_transaction_defaults("Customer");
this.make();
this.set_primary_action();
},
- set_transaction_defaults: function(party) {
+ set_transaction_defaults: function (party) {
var me = this;
this.party = party;
this.price_list = (party == "Customer" ?
@@ -351,34 +298,54 @@
this.sales_or_purchase = (party == "Customer" ? "Sales" : "Purchase");
},
- make: function() {
+ make: function () {
this.make_search();
+ this.make_list_customers();
this.make_customer();
this.make_item_list();
this.make_discount_field()
},
- make_search: function() {
+ make_search: function () {
var me = this;
- this.search = frappe.ui.form.make_control({
+ this.serach_item = frappe.ui.form.make_control({
df: {
"fieldtype": "Data",
"label": "Item",
"fieldname": "pos_item",
"placeholder": __("Search Item")
},
- parent: this.wrapper.find(".search-area"),
+ parent: this.wrapper.find(".search-item"),
only_input: true,
});
- this.search.make_input();
- this.search.$input.on("keyup", function() {
- setTimeout(function() {
+ this.serach_item.make_input();
+ this.serach_item.$input.on("keyup", function () {
+ setTimeout(function () {
me.items = me.get_items();
me.make_item_list();
}, 1000);
});
+ this.search_item_group = frappe.ui.form.make_control({
+ df: {
+ "fieldtype": "Select",
+ "options": me.item_groups,
+ "label": __("Item Group"),
+ "fieldname": "item_group",
+ "placeholder": __("Item Group")
+ },
+ parent: this.wrapper.find(".search-item-group"),
+ only_input: true,
+ });
+
+ this.search_item_group.make_input();
+ this.search_item_group.$input.on("change", function () {
+ me.page_len = 20;
+ me.items = me.get_items();
+ me.make_item_list();
+ });
+
this.party_field = frappe.ui.form.make_control({
df: {
"fieldtype": "Data",
@@ -392,21 +359,139 @@
});
this.party_field.make_input();
- this.set_focus()
+ setTimeout(this.set_focus.bind(this), 500);
+
+ this.wrapper.find(".btn-more").on("click", function() {
+ me.page_len += 20;
+ me.items = me.get_items();
+ me.make_item_list();
+ })
},
- set_focus: function(){
- if(this.default_customer){
- this.search.$input.focus();
- }else{
+ make_list_customers: function () {
+ var me = this;
+ this.list_customers_btn = this.wrapper.find('.list-customers-btn');
+ this.add_customer_btn = this.wrapper.find('.add-customer-btn');
+ this.pos_bill = this.wrapper.find('.pos-bill').hide();
+ this.list_customers = this.wrapper.find('.list-customers');
+
+ this.list_customers_btn.on('click', function () {
+ $(this).toggleClass("view_customer");
+ if($(this).hasClass("view_customer")) {
+ me.render_list_customers();
+ me.bind_delete_event()
+ me.party_field.$input.attr('disabled', true);
+ me.list_customers.show();
+ me.pos_bill.hide();
+ } else {
+ if(me.frm.doc.docstatus == 0) {
+ me.party_field.$input.attr('disabled', false);
+ }
+ me.pos_bill.show();
+ me.list_customers.hide()
+ }
+ });
+ this.add_customer_btn.on('click', function() {
+ me.save_previous_entry();
+ me.create_new();
+ me.refresh();
+ me.set_focus();
+ });
+ },
+
+ render_list_customers: function () {
+ var me = this;
+
+ this.removed_items = [];
+ this.list_customers.empty();
+ this.si_docs = this.get_doc_from_localstorage();
+
+ if (!this.si_docs.length) {
+ this.list_customers.append(
+ '<div style="padding: 12px; margin-left:-12px;">' + __("No offline records.") + '</div>'
+ )
+ return;
+ }
+ var html = '<div class="row list-row list-row-head pos-invoice-list">\
+ <div class="col-xs-1"><input class="list-select-all" type="checkbox"></div>\
+ <div class="col-xs-3">Customer</div>\
+ <div class="col-xs-2 text-left">Status</div>\
+ <div class="col-xs-3 text-right">Paid Amount</div>\
+ <div class="col-xs-3 text-right">Grand Total</div>\
+ </div>';
+ this.si_docs.forEach(function (data, i) {
+ for (key in data) {
+ html += frappe.render_template("pos_invoice_list", {
+ sr: i + 1,
+ name: key,
+ customer: data[key].customer,
+ paid_amount: format_currency(data[key].paid_amount, me.frm.doc.currency),
+ grand_total: format_currency(data[key].grand_total, me.frm.doc.currency),
+ data: me.get_doctype_status(data[key])
+ });
+ }
+ });
+ this.list_customers.append(html);
+
+ this.list_customers.find('.list-column').click(function () {
+ me.list_customers.hide();
+ me.list_customers_btn.toggleClass("view_customer");
+ me.pos_bill.show();
+ me.list_customers_btn.show();
+ me.name = $(this).parents().attr('invoice-name')
+ me.edit_record();
+ })
+
+ //actions
+ $(this.wrapper).find('.list-select-all').click(function () {
+ me.list_customers.find('.list-delete').prop("checked", $(this).is(":checked"))
+ me.removed_items = [];
+ if ($(this).is(":checked")) {
+ $.each(me.si_docs, function (index, data) {
+ for (key in data) {
+ me.removed_items.push(key)
+ }
+ });
+ }
+
+ me.toggle_primary_action();
+ });
+
+ $(this.wrapper).find('.list-delete').click(function () {
+ me.name = $(this).parent().parent().attr('invoice-name');
+ if ($(this).is(":checked")) {
+ me.removed_items.push(me.name);
+ } else {
+ me.removed_items.pop(me.name)
+ }
+
+ me.toggle_primary_action();
+ });
+ },
+
+ bind_delete_event: function() {
+ var me = this;
+
+ $(this.wrapper).find('.btn-danger').click(function(){
+ frappe.confirm(__("Delete permanently?"), function () {
+ me.delete_records();
+ me.render_list_customers();
+ })
+ })
+ },
+
+ set_focus: function () {
+ if (this.default_customer || this.frm.doc.customer) {
+ this.serach_item.$input.focus();
+ } else {
this.party_field.$input.focus();
}
},
- make_customer: function() {
+ make_customer: function () {
var me = this;
- if(this.default_customer && !this.frm.doc.customer){
+ if (this.default_customer && !this.frm.doc.customer) {
this.party_field.$input.val(this.default_customer);
this.frm.doc.customer = this.default_customer;
}
@@ -417,14 +502,14 @@
maxItems: 99,
autoFirst: true,
list: [],
- filter: function(item, input) {
+ filter: function (item, input) {
var value = item.value.toLowerCase();
- if(value.indexOf('is_action') !== -1 ||
+ if (value.indexOf('is_action') !== -1 ||
value.indexOf(input) !== -1) {
return true;
}
},
- item: function(item, input) {
+ item: function (item, input) {
var d = item;
var html = "<span>" + __(d.label || d.value) + "</span>";
return $('<li></li>')
@@ -433,7 +518,7 @@
.get(0);
}
});
- var items = this.customers.map(function(c) {
+ var customers = this.customers.map(function (c) {
return {
label: c.name,
value: c.name,
@@ -441,44 +526,47 @@
territory: c.territory
}
});
- items.push({
+
+ customers.push({
label: "<span class='text-primary link-option'>"
- + "<i class='fa fa-plus' style='margin-right: 5px;'></i> "
- + __("Create a new Customer")
- + "</span>",
+ + "<i class='fa fa-plus' style='margin-right: 5px;'></i> "
+ + __("Create a new Customer")
+ + "</span>",
value: 'is_action',
action: me.new_customer
});
- this.party_field.awesomeplete.list = items;
+ this.party_field.awesomeplete.list = customers;
this.party_field.$input
- .on('input', function(e) {
- me.party_field.awesomeplete.list = items;
+ .on('input', function (e) {
+ me.party_field.awesomeplete.list = customers;
})
- .on('awesomplete-select', function(e) {
- var item = me.party_field.awesomeplete
+ .on('awesomplete-select', function (e) {
+ var customer = me.party_field.awesomeplete
.get_item(e.originalEvent.text.value);
- if(!item) return;
- if(item.action) {
- item.action.apply(me);
+ if (!customer) return;
+ // create customer link
+ if (customer.action) {
+ customer.action.apply(me);
return;
}
- me.update_customer_data(item);
+ me.update_customer_data(customer);
me.refresh();
+ me.set_focus();
})
- .on('change', function(e) {
- if(!e.originalEvent.text) {
+ .on('change', function (e) {
+ if (!e.originalEvent.text) {
me.frm.doc.customer = $(this).val();
}
})
- .on('focus', function(e) {
+ .on('focus', function (e) {
$(e.target).val('').trigger('input');
})
- .on("awesomplete-selectcomplete", function(e) {
+ .on("awesomplete-selectcomplete", function (e) {
var item = me.party_field.awesomeplete
.get_item(e.originalEvent.text.value);
// clear text input if item is action
- if(item.action) {
+ if (item.action) {
$(this).val("");
}
});
@@ -486,45 +574,119 @@
new_customer: function () {
var me = this;
- if(!this.connection_status) return;
- frappe.ui.form.quick_entry('Customer', function (doc) {
- me.customers.push(doc);
- me.party_field.$input.val(doc.name);
- me.update_customer_data(doc);
+ if (!this.connection_status) return;
+
+ this.customer_doc = new frappe.ui.Dialog({
+ 'title': 'Customer',
+ fields: [
+ {
+ "label": __("Full Name"),
+ "fieldname": "full_name",
+ "fieldtype": "Data",
+ "reqd": 1
+ },
+ {
+ "fieldtype": "Section Break"
+ },
+ {
+ "label": __("Email Id"),
+ "fieldname": "email_id",
+ "fieldtype": "Data"
+ },
+ {
+ "fieldtype": "Column Break"
+ },
+ {
+ "label": __("Contact Number"),
+ "fieldname": "contact_no",
+ "fieldtype": "Data"
+ },
+ {
+ "fieldtype": "Section Break"
+ },
+ {
+ "label": __("Address Line 1"),
+ "fieldname": "address_line1",
+ "fieldtype": "Data"
+ },
+ {
+ "label": __("Address Line 2"),
+ "fieldname": "address_line2",
+ "fieldtype": "Data"
+ },
+ {
+ "fieldtype": "Column Break"
+ },
+ {
+ "label": __("City"),
+ "fieldname": "city",
+ "fieldtype": "Data"
+ },
+ {
+ "label": __("State"),
+ "fieldname": "state",
+ "fieldtype": "Data"
+ },
+ {
+ "label": __("ZIP Code"),
+ "fieldname": "zip_code",
+ "fieldtype": "Data"
+ }
+ ]
})
+
+ this.customer_doc.show()
+
+ this.customer_doc.set_primary_action(__("Save"), function () {
+ me.make_offline_customer();
+ me.pos_bill.show();
+ });
},
- update_customer_data: function(doc) {
+ make_offline_customer: function() {
+ this.frm.doc.customer = this.customer_doc.get_values().full_name;
+ this.frm.doc.contact_details = JSON.stringify(this.customer_doc.get_values());
+ this.party_field.$input.val(this.frm.doc.customer);
+ this.customers.push({
+ name: this.frm.doc.customer,
+ customer_name: this.frm.doc.customer
+ });
+
+ this.customer_doc.hide()
+ },
+
+ update_customer_data: function (doc) {
var me = this;
this.frm.doc.customer = doc.label || doc.name;
this.frm.doc.customer_name = doc.customer_name;
this.frm.doc.customer_group = doc.customer_group;
this.frm.doc.territory = doc.territory;
+ this.pos_bill.show();
},
- get_customers: function(key){
+ get_customers: function (key) {
var me = this;
key = key.toLowerCase().trim()
var re = new RegExp('%', 'g');
var reg = new RegExp(key.replace(re, '\\w*\\s*[a-zA-Z0-9]*'))
- if(key){
- return $.grep(this.customers, function(data) {
- if(reg.test(data.name.toLowerCase())
+ if (key) {
+ return $.grep(this.customers, function (data) {
+ if (reg.test(data.name.toLowerCase())
|| reg.test(data.customer_name.toLowerCase())
- || (data.customer_group && reg.test(data.customer_group.toLowerCase()))){
+ || (data.customer_group && reg.test(data.customer_group.toLowerCase()))) {
return data
}
})
- }else{
- customers = this.customers.sort(function(a,b){ return a.idx < b.idx })
+ } else {
+ customers = this.customers.sort(function (a, b) { return a.idx < b.idx })
return customers.slice(0, 20)
}
},
- make_item_list: function() {
+ make_item_list: function () {
var me = this;
- if(!this.price_list) {
+ if (!this.price_list) {
msgprint(__("Price List not found or disabled"));
return;
}
@@ -536,11 +698,11 @@
if (this.items.length > 0) {
$.each(this.items, function(index, obj) {
- if(index < 30){
+ if(index < me.page_len){
$(frappe.render_template("pos_item", {
item_code: obj.name,
item_price: format_currency(me.price_list_data[obj.name], me.frm.doc.currency),
- item_name: obj.name===obj.item_name ? "" : obj.item_name,
+ item_name: obj.name === obj.item_name ? "" : obj.item_name,
item_image: obj.image ? "url('" + obj.image + "')" : null,
color: frappe.get_palette(obj.item_name),
abbr: frappe.get_abbr(obj.item_name)
@@ -548,143 +710,173 @@
}
});
} else {
- $("<h4>Searching record not found.</h4>").appendTo($wrap)
+ $("<p class='text-muted small' style='padding-left: 10px'>"
+ +__("Not items found")+"</p>").appendTo($wrap)
}
- if(this.items.length == 1
- && this.search.$input.val()) {
- this.search.$input.val("");
+ if (this.items.length == 1
+ && this.serach_item.$input.val()) {
+ this.serach_item.$input.val("");
this.add_to_cart();
}
// if form is local then allow this function
- $(me.wrapper).find("div.pos-item").on("click", function() {
+ $(me.wrapper).find("div.pos-item").on("click", function () {
+ if(me.list_customers_btn.hasClass("view_customer")) return;
+
me.customer_validate();
- if(me.frm.doc.docstatus==0) {
+ if (me.frm.doc.docstatus == 0) {
me.items = me.get_items($(this).attr("data-item-code"))
me.add_to_cart();
}
});
},
- get_items: function(item_code){
+ get_items: function (item_code) {
// To search item as per the key enter
var me = this;
this.item_serial_no = {};
this.item_batch_no = {};
- if(item_code){
- return $.grep(this.item_data, function(item){
- if(item.item_code == item_code ){
+ if (item_code) {
+ return $.grep(this.item_data, function (item) {
+ if (item.item_code == item_code) {
return true
}
})
}
- key = this.search.$input.val().toLowerCase().replace(/[&\/\\#,+()\[\]$~.'":*?<>{}]/g,'\\$&');
+ this.items_list = this.apply_category();
+
+ key = this.serach_item.$input.val().toLowerCase().replace(/[&\/\\#,+()\[\]$~.'":*?<>{}]/g, '\\$&');
var re = new RegExp('%', 'g');
var reg = new RegExp(key.replace(re, '[\\w*\\s*[a-zA-Z0-9]*]*'))
search_status = true
- if(key){
- return $.grep(this.item_data, function(item){
- if(search_status){
- if(in_list(me.batch_no_data[item.item_code], me.search.$input.val())){
+ if (key) {
+ return $.grep(this.items_list, function (item) {
+ if (search_status) {
+ if (in_list(me.batch_no_data[item.item_code], me.serach_item.$input.val())) {
search_status = false;
- return me.item_batch_no[item.item_code] = me.search.$input.val()
- } else if( me.serial_no_data[item.item_code]
- && in_list(Object.keys(me.serial_no_data[item.item_code]), me.search.$input.val())) {
+ return me.item_batch_no[item.item_code] = me.serach_item.$input.val()
+ } else if (me.serial_no_data[item.item_code]
+ && in_list(Object.keys(me.serial_no_data[item.item_code]), me.serach_item.$input.val())) {
search_status = false;
- me.item_serial_no[item.item_code] = [me.search.$input.val(), me.serial_no_data[item.item_code][me.search.$input.val()]]
+ me.item_serial_no[item.item_code] = [me.serach_item.$input.val(), me.serial_no_data[item.item_code][me.serach_item.$input.val()]]
return true
- } else if(item.barcode == me.search.$input.val()) {
+ } else if (item.barcode == me.serach_item.$input.val()) {
search_status = false;
- return item.barcode == me.search.$input.val();
- } else if(reg.test(item.item_code.toLowerCase()) || reg.test(item.description.toLowerCase()) ||
- reg.test(item.item_name.toLowerCase()) || reg.test(item.item_group.toLowerCase()) ){
+ return item.barcode == me.serach_item.$input.val();
+ } else if (reg.test(item.item_code.toLowerCase()) || reg.test(item.description.toLowerCase()) ||
+ reg.test(item.item_name.toLowerCase()) || reg.test(item.item_group.toLowerCase())) {
return true
}
}
})
- }else{
- return this.item_data;
+ } else {
+ return this.items_list;
}
},
- bind_qty_event: function() {
+ apply_category: function() {
+ var me = this;
+ category = this.search_item_group.$input.val();
+
+ if(category == 'All Item Groups') {
+ return this.item_data
+ } else {
+ return this.item_data.filter(function(element, index, array){
+ return element.item_group == category;
+ });
+ }
+ },
+
+ bind_qty_event: function () {
var me = this;
- $(this.wrapper).find(".pos-item-qty").on("change", function(){
+ $(this.wrapper).find(".pos-item-qty").on("change", function () {
var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
var qty = $(this).val();
me.update_qty(item_code, qty)
})
- $(this.wrapper).find("[data-action='increase-qty']").on("click", function(){
+ $(this.wrapper).find("[data-action='increase-qty']").on("click", function () {
var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
var qty = flt($(this).parents(".pos-bill-item").find('.pos-item-qty').val()) + 1;
me.update_qty(item_code, qty)
})
- $(this.wrapper).find("[data-action='decrease-qty']").on("click", function(){
+ $(this.wrapper).find("[data-action='decrease-qty']").on("click", function () {
var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
var qty = flt($(this).parents(".pos-bill-item").find('.pos-item-qty').val()) - 1;
me.update_qty(item_code, qty)
})
- },
- update_qty: function(item_code, qty) {
- var me = this;
- this.items = this.get_items(item_code);
- this.validate_serial_no()
- this.update_qty_rate_against_item_code(item_code, "qty", qty);
- },
-
- update_rate: function() {
- var me = this;
-
- $(this.wrapper).find(".pos-item-rate").on("change", function(){
+ $(this.wrapper).find(".pos-item-discount").on("change", function () {
var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
- me.update_qty_rate_against_item_code(item_code, "rate", $(this).val());
+ var discount = $(this).val();
+ me.update_discount(item_code, discount)
})
},
- update_qty_rate_against_item_code: function(item_code, field, value){
+ update_qty: function (item_code, qty) {
var me = this;
- if(value < 0){
+ this.items = this.get_items(item_code);
+ this.validate_serial_no()
+ this.set_item_details(item_code, "qty", qty);
+ },
+
+ update_discount: function(item_code, discount) {
+ var me = this;
+ this.items = this.get_items(item_code);
+ this.set_item_details(item_code, "discount_percentage", discount);
+ },
+
+ update_rate: function () {
+ var me = this;
+
+ $(this.wrapper).find(".pos-item-rate").on("change", function () {
+ var item_code = $(this).parents(".pos-bill-item").attr("data-item-code");
+ me.set_item_details(item_code, "rate", $(this).val());
+ })
+ },
+
+ set_item_details: function (item_code, field, value) {
+ var me = this;
+ if (value < 0) {
frappe.throw(__("Enter value must be positive"));
}
this.remove_item = []
- $.each(this.frm.doc["items"] || [], function(i, d) {
- if(d.serial_no && field == 'qty'){
- me.validate_serial_no_qty(d, item_code, field, value)
- }
-
+ $.each(this.frm.doc["items"] || [], function (i, d) {
if (d.item_code == item_code) {
+ if (d.serial_no && field == 'qty') {
+ me.validate_serial_no_qty(d, item_code, field, value)
+ }
+
d[field] = flt(value);
d.amount = flt(d.rate) * flt(d.qty);
- if(d.qty==0){
+ if (d.qty == 0) {
me.remove_item.push(d.idx)
}
}
});
- if(field == 'qty'){
+ if (field == 'qty') {
this.remove_zero_qty_item();
}
this.update_paid_amount_status(false)
},
- remove_zero_qty_item: function(){
+ remove_zero_qty_item: function () {
var me = this;
idx = 0
this.items = []
idx = 0
- $.each(this.frm.doc["items"] || [], function(i, d) {
- if(!in_list(me.remove_item, d.idx)){
+ $.each(this.frm.doc["items"] || [], function (i, d) {
+ if (!in_list(me.remove_item, d.idx)) {
d.idx = idx;
me.items.push(d);
idx++;
@@ -694,23 +886,23 @@
this.frm.doc["items"] = this.items;
},
- make_discount_field: function(){
+ make_discount_field: function () {
var me = this;
- this.wrapper.find('input.discount-percentage').on("change", function() {
+ this.wrapper.find('input.discount-percentage').on("change", function () {
me.frm.doc.additional_discount_percentage = flt($(this).val(), precision("additional_discount_percentage"));
total = me.frm.doc.grand_total
- if(me.frm.doc.apply_discount_on == 'Net Total'){
+ if (me.frm.doc.apply_discount_on == 'Net Total') {
total = me.frm.doc.net_total
}
- me.frm.doc.discount_amount = flt(total*flt(me.frm.doc.additional_discount_percentage) / 100, precision("discount_amount"));
+ me.frm.doc.discount_amount = flt(total * flt(me.frm.doc.additional_discount_percentage) / 100, precision("discount_amount"));
me.wrapper.find('input.discount-amount').val(me.frm.doc.discount_amount)
me.refresh();
});
- this.wrapper.find('input.discount-amount').on("change", function() {
+ this.wrapper.find('input.discount-amount').on("change", function () {
me.frm.doc.discount_amount = flt($(this).val(), precision("discount_amount"));
me.frm.doc.additional_discount_percentage = 0.0;
me.wrapper.find('input.discount-percentage').val(0);
@@ -718,14 +910,14 @@
});
},
- customer_validate: function(){
+ customer_validate: function () {
var me = this;
- if(!this.frm.doc.customer){
+ if (!this.frm.doc.customer) {
frappe.throw(__("Please select customer"))
}
},
- add_to_cart: function() {
+ add_to_cart: function () {
var me = this;
var caught = false;
var no_of_items = me.wrapper.find(".pos-bill-item").length;
@@ -736,17 +928,17 @@
this.validate_warehouse();
if (no_of_items != 0) {
- $.each(this.frm.doc["items"] || [], function(i, d) {
+ $.each(this.frm.doc["items"] || [], function (i, d) {
if (d.item_code == me.items[0].item_code) {
caught = true;
d.qty += 1;
d.amount = flt(d.rate) * flt(d.qty);
- if(me.item_serial_no[d.item_code]){
+ if (me.item_serial_no[d.item_code]) {
d.serial_no += '\n' + me.item_serial_no[d.item_code][0]
d.warehouse = me.item_serial_no[d.item_code][1]
}
- if(me.item_batch_no.length){
+ if (me.item_batch_no.length) {
d.batch_no = me.item_batch_no[d.item_code]
}
}
@@ -760,7 +952,7 @@
this.update_paid_amount_status(false)
},
- add_new_item_to_grid: function() {
+ add_new_item_to_grid: function () {
var me = this;
this.child = frappe.model.add_child(this.frm.doc, this.frm.doc.doctype + " Item", "items");
this.child.item_code = this.items[0].item_code;
@@ -772,7 +964,7 @@
this.child.cost_center = this.pos_profile_data['cost_center'] || this.items[0].cost_center;
this.child.income_account = this.pos_profile_data['income_account'] || this.items[0].income_account;
this.child.warehouse = (this.item_serial_no[this.child.item_code]
- ? this.item_serial_no[this.child.item_code][1] : (this.pos_profile_data['warehouse'] || this.items[0].default_warehouse) );
+ ? this.item_serial_no[this.child.item_code][1] : (this.pos_profile_data['warehouse'] || this.items[0].default_warehouse));
this.child.price_list_rate = flt(this.price_list_data[this.child.item_code], 9) / flt(this.frm.doc.conversion_rate, 9);
this.child.rate = flt(this.price_list_data[this.child.item_code], 9) / flt(this.frm.doc.conversion_rate, 9);
this.child.actual_qty = me.get_actual_qty(this.items[0]);
@@ -783,15 +975,15 @@
this.child.item_tax_rate = JSON.stringify(this.tax_data[this.child.item_code]);
},
- update_paid_amount_status: function(update_paid_amount){
- if(this.name){
+ update_paid_amount_status: function (update_paid_amount) {
+ if (this.name) {
update_paid_amount = update_paid_amount ? false : true;
}
this.refresh(update_paid_amount);
},
- refresh: function(update_paid_amount) {
+ refresh: function (update_paid_amount) {
var me = this;
this.refresh_fields(update_paid_amount);
this.bind_qty_event();
@@ -799,7 +991,7 @@
this.set_primary_action();
},
- refresh_fields: function(update_paid_amount) {
+ refresh_fields: function (update_paid_amount) {
this.apply_pricing_rule();
this.discount_amount_applied = false;
this._calculate_taxes_and_totals();
@@ -810,40 +1002,45 @@
this.set_totals();
},
- get_company_currency: function() {
+ get_company_currency: function () {
return erpnext.get_currency(this.frm.doc.company);
},
- show_item_wise_taxes: function(){
+ show_item_wise_taxes: function () {
return null;
},
- show_items_in_item_cart: function() {
+ show_items_in_item_cart: function () {
var me = this;
var $items = this.wrapper.find(".items").empty();
- $.each(this.frm.doc.items|| [], function(i, d) {
+ $.each(this.frm.doc.items || [], function (i, d) {
$(frappe.render_template("pos_bill_item", {
item_code: d.item_code,
- item_name: (d.item_name===d.item_code || !d.item_name) ? "" : ("<br>" + d.item_name),
+ item_name: (d.item_name === d.item_code || !d.item_name) ? "" : ("<br>" + d.item_name),
qty: d.qty,
- actual_qty: me.actual_qty_dict[d.item_code] || 0,
+ discount_percentage: d.discount_percentage || 0.0,
+ actual_qty: me.actual_qty_dict[d.item_code] || 0.0,
projected_qty: d.projected_qty,
rate: format_number(d.rate, me.frm.doc.currency),
- enabled: me.pos_profile_data["allow_user_to_edit_rate"] ? true: false,
+ enabled: me.pos_profile_data["allow_user_to_edit_rate"] ? true : false,
amount: format_currency(d.amount, me.frm.doc.currency)
})).appendTo($items);
});
- this.wrapper.find("input.pos-item-qty").on("focus", function() {
+ this.wrapper.find("input.pos-item-qty").on("focus", function () {
$(this).select();
});
- this.wrapper.find("input.pos-item-rate").on("focus", function() {
+ this.wrapper.find("input.pos-item-discount").on("focus", function () {
+ $(this).select();
+ });
+
+ this.wrapper.find("input.pos-item-rate").on("focus", function () {
$(this).select();
});
},
- set_taxes: function(){
+ set_taxes: function () {
var me = this;
me.frm.doc.total_taxes_and_charges = 0.0
@@ -852,7 +1049,7 @@
.find(".tax-area").toggleClass("hide", (taxes && taxes.length) ? false : true)
.find(".tax-table").empty();
- $.each(taxes, function(i, d) {
+ $.each(taxes, function (i, d) {
if (d.tax_amount && cint(d.included_in_print_rate) == 0) {
$(frappe.render_template("pos_tax_row", {
description: d.description,
@@ -863,104 +1060,106 @@
});
},
- set_totals: function() {
+ set_totals: function () {
var me = this;
this.wrapper.find(".net-total").text(format_currency(me.frm.doc.total, me.frm.doc.currency));
this.wrapper.find(".grand-total").text(format_currency(me.frm.doc.grand_total, me.frm.doc.currency));
},
- set_primary_action: function() {
+ set_primary_action: function () {
var me = this;
- if (this.frm.doc.docstatus==0) {
- this.page.set_primary_action(__("Pay"), function() {
+ if (this.frm.doc.docstatus == 0) {
+ this.page.set_primary_action(__("Pay"), function () {
me.validate();
me.update_paid_amount_status(true);
me.create_invoice();
me.make_payment();
- }, "octicon octfa fa-credit-card");
- }else if(this.frm.doc.docstatus == 1) {
- this.page.set_primary_action(__("Print"), function() {
+ }, "fa fa-credit-card");
+ } else if (this.frm.doc.docstatus == 1) {
+ this.page.set_primary_action(__("Print"), function () {
html = frappe.render(me.print_template_data, me.frm.doc)
me.print_document(html)
})
- }else {
+ } else {
this.page.clear_primary_action()
}
- this.page.set_secondary_action(__("New"), function() {
- me.save_previous_entry();
- me.create_new();
- }, "octicon octfa fa-plus").addClass("btn-primary");
+ // this.page.set_secondary_action(__("New"), function () {
+ // me.save_previous_entry();
+ // me.create_new();
+ // }, "fa fa-plus").addClass("btn-primary");
},
- print_dialog: function(){
+ print_dialog: function () {
var me = this;
msgprint = frappe.msgprint(format('<a class="btn btn-primary print_doc" \
style="margin-right: 5px;">{0}</a>\
<a class="btn btn-default new_doc">{1}</a>', [
- __('Print'), __('New')
- ]));
+ __('Print'), __('New')
+ ]));
- $('.print_doc').click(function(){
+ $('.print_doc').click(function () {
html = frappe.render(me.print_template_data, me.frm.doc)
me.print_document(html)
})
- $('.new_doc').click(function(){
+ $('.new_doc').click(function () {
msgprint.hide()
me.create_new();
})
},
- print_document: function(html){
+ print_document: function (html) {
var w = window.open();
w.document.write(html);
w.document.close();
- setTimeout(function(){
+ setTimeout(function () {
w.print();
w.close();
}, 1000)
},
- submit_invoice: function(){
+ submit_invoice: function () {
var me = this;
this.change_status();
- if(this.frm.doc.docstatus == 1){
+ if (this.frm.doc.docstatus == 1) {
this.print_dialog()
}
},
- change_status: function(){
- if(this.frm.doc.docstatus == 0){
+ change_status: function () {
+ if (this.frm.doc.docstatus == 0) {
this.frm.doc.docstatus = 1;
this.update_invoice();
this.disable_input_field();
}
},
- disable_input_field: function(){
+ disable_input_field: function () {
var pointer_events = 'inherit'
$(this.wrapper).find('input').attr("disabled", false);
+ $(this.wrapper).find('select').attr("disabled", false);
- if(this.frm.doc.docstatus == 1){
+ if (this.frm.doc.docstatus == 1) {
pointer_events = 'none';
$(this.wrapper).find('input').attr("disabled", true);
+ $(this.wrapper).find('select').attr("disabled", true);
}
- $(this.wrapper).find('.pos-bill-wrapper').css('pointer-events', pointer_events);
+ $(this.wrapper).find('.pos-bill').css('pointer-events', pointer_events);
$(this.wrapper).find('.pos-items-section').css('pointer-events', pointer_events);
this.set_primary_action();
},
- create_invoice: function(){
+ create_invoice: function () {
var me = this;
var invoice_data = {}
this.si_docs = this.get_doc_from_localstorage();
- if(this.name){
+ if (this.name) {
this.update_invoice()
- }else{
+ } else {
this.name = $.now();
this.frm.doc.offline_pos_name = this.name;
this.frm.doc.posting_date = frappe.datetime.get_today();
@@ -970,14 +1169,15 @@
this.update_localstorage();
this.set_primary_action();
}
+ return invoice_data;
},
- update_invoice: function(){
+ update_invoice: function () {
var me = this;
this.si_docs = this.get_doc_from_localstorage();
- $.each(this.si_docs, function(index, data){
- for(key in data){
- if(key == me.name){
+ $.each(this.si_docs, function (index, data) {
+ for (key in data) {
+ if (key == me.name) {
me.si_docs[index][key] = me.frm.doc;
me.update_localstorage();
}
@@ -985,41 +1185,41 @@
})
},
- update_localstorage: function(){
- try{
+ update_localstorage: function () {
+ try {
localStorage.setItem('sales_invoice_doc', JSON.stringify(this.si_docs));
- }catch(e){
+ } catch (e) {
frappe.throw(__("LocalStorage is full , did not save"))
}
},
- get_doc_from_localstorage: function(){
- try{
+ get_doc_from_localstorage: function () {
+ try {
return JSON.parse(localStorage.getItem('sales_invoice_doc')) || [];
- }catch(e){
+ } catch (e) {
return []
}
},
- set_interval_for_si_sync: function(){
+ set_interval_for_si_sync: function () {
var me = this;
- setInterval(function(){
+ setInterval(function () {
me.sync_sales_invoice()
}, 60000)
},
- sync_sales_invoice: function(){
+ sync_sales_invoice: function () {
var me = this;
this.si_docs = this.get_submitted_invoice();
- if(this.si_docs.length){
+ if (this.si_docs.length) {
frappe.call({
method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice",
args: {
doc_list: me.si_docs
},
- callback: function(r){
- if(r.message){
+ callback: function (r) {
+ if (r.message) {
me.removed_items = r.message;
me.remove_doc_from_localstorage();
}
@@ -1028,14 +1228,14 @@
}
},
- get_submitted_invoice: function(){
+ get_submitted_invoice: function () {
var invoices = [];
var index = 1;
docs = this.get_doc_from_localstorage();
- if(docs){
- invoices = $.map(docs, function(data){
- for(key in data){
- if(data[key].docstatus == 1 && index < 50){
+ if (docs) {
+ invoices = $.map(docs, function (data) {
+ for (key in data) {
+ if (data[key].docstatus == 1 && index < 50) {
index++
data[key].docstatus = 0;
return data
@@ -1047,14 +1247,14 @@
return invoices
},
- remove_doc_from_localstorage: function(){
+ remove_doc_from_localstorage: function () {
var me = this;
this.si_docs = this.get_doc_from_localstorage();
this.new_si_docs = [];
- if(this.removed_items){
- $.each(this.si_docs, function(index, data){
- for(key in data){
- if(!in_list(me.removed_items, key)){
+ if (this.removed_items) {
+ $.each(this.si_docs, function (index, data) {
+ for (key in data) {
+ if (!in_list(me.removed_items, key)) {
me.new_si_docs.push(data);
}
}
@@ -1064,44 +1264,44 @@
}
},
- validate: function(){
+ validate: function () {
var me = this;
this.customer_validate();
this.item_validate();
this.validate_mode_of_payments();
},
- item_validate: function(){
- if(this.frm.doc.items.length == 0){
+ item_validate: function () {
+ if (this.frm.doc.items.length == 0) {
frappe.throw(__("Select items to save the invoice"))
}
},
- validate_mode_of_payments: function(){
- if (this.frm.doc.payments.length === 0){
+ validate_mode_of_payments: function () {
+ if (this.frm.doc.payments.length === 0) {
frappe.throw(__("Payment Mode is not configured. Please check, whether account has been set on Mode of Payments or on POS Profile."))
}
},
- validate_serial_no: function(){
+ validate_serial_no: function () {
var me = this;
var item_code = serial_no = '';
- for (key in this.item_serial_no){
+ for (key in this.item_serial_no) {
item_code = key;
serial_no = me.item_serial_no[key][0];
}
- if(this.items[0].has_serial_no && serial_no == ""){
+ if (this.items[0].has_serial_no && serial_no == "") {
this.refresh();
frappe.throw(__(repl("Error: Serial no is mandatory for item %(item)s", {
'item': this.items[0].item_code
})))
}
- if(item_code && serial_no){
- $.each(this.frm.doc.items, function(index, data){
- if(data.item_code == item_code){
- if(in_list(data.serial_no.split('\n'), serial_no)){
+ if (item_code && serial_no) {
+ $.each(this.frm.doc.items, function (index, data) {
+ if (data.item_code == item_code) {
+ if (in_list(data.serial_no.split('\n'), serial_no)) {
frappe.throw(__(repl("Serial no %(serial_no)s is already taken", {
'serial_no': serial_no
})))
@@ -1111,7 +1311,7 @@
}
},
- validate_serial_no_qty: function(args, item_code, field, value){
+ validate_serial_no_qty: function (args, item_code, field, value) {
var me = this;
if (args.item_code == item_code && args.serial_no
&& field == 'qty' && cint(value) != value) {
@@ -1120,7 +1320,7 @@
frappe.throw(__("Serial no item cannot be a fraction"))
}
- if(args.item_code == item_code && args.serial_no && args.serial_no.split('\n').length != cint(value)){
+ if (args.item_code == item_code && args.serial_no && args.serial_no.split('\n').length != cint(value)) {
args.qty = 0.0;
args.serial_no = ''
this.refresh();
@@ -1130,42 +1330,44 @@
}
},
- mandatory_batch_no: function(){
+ mandatory_batch_no: function () {
var me = this;
- if(this.items[0].has_batch_no && !this.item_batch_no[this.items[0].item_code]){
+ if (this.items[0].has_batch_no && !this.item_batch_no[this.items[0].item_code]) {
frappe.throw(__(repl("Error: Batch no is mandatory for item %(item)s", {
'item': this.items[0].item_code
})))
}
},
- apply_pricing_rule: function(){
+ apply_pricing_rule: function () {
var me = this;
- $.each(this.frm.doc["items"], function(n, item) {
+ $.each(this.frm.doc["items"], function (n, item) {
pricing_rule = me.get_pricing_rule(item)
me.validate_pricing_rule(pricing_rule)
- if(pricing_rule.length){
+ if (pricing_rule.length) {
+ item.pricing_rule = pricing_rule[0].name;
item.margin_type = pricing_rule[0].margin_type;
item.price_list_rate = pricing_rule[0].price || item.price_list_rate;
item.margin_rate_or_amount = pricing_rule[0].margin_rate_or_amount;
item.discount_percentage = pricing_rule[0].discount_percentage || 0.0;
- me.apply_pricing_rule_on_item(item)
- } else if(item.discount_percentage > 0 || item.margin_rate_or_amount > 0) {
+ } else if ((item.discount_percentage > 0 || item.margin_rate_or_amount > 0) && item.pricing_rule) {
item.margin_rate_or_amount = 0.0;
item.discount_percentage = 0.0;
- me.apply_pricing_rule_on_item(item)
+ item.pricing_rule = null;
}
+
+ me.apply_pricing_rule_on_item(item)
})
},
- get_pricing_rule: function(item){
+ get_pricing_rule: function (item) {
var me = this;
- return $.grep(this.pricing_rules, function(data){
- if(item.qty >= data.min_qty && (item.qty <= (data.max_qty ? data.max_qty : item.qty)) ){
- if(data.item_code == item.item_code || in_list(['All Item Groups', item.item_group], data.item_group)) {
- if(in_list(['Customer', 'Customer Group', 'Territory', 'Campaign'], data.applicable_for)){
+ return $.grep(this.pricing_rules, function (data) {
+ if (item.qty >= data.min_qty && (item.qty <= (data.max_qty ? data.max_qty : item.qty))) {
+ if (data.item_code == item.item_code || in_list(['All Item Groups', item.item_group], data.item_group)) {
+ if (in_list(['Customer', 'Customer Group', 'Territory', 'Campaign'], data.applicable_for)) {
return me.validate_condition(data)
- }else{
+ } else {
return true
}
}
@@ -1173,15 +1375,15 @@
})
},
- validate_condition: function(data){
+ validate_condition: function (data) {
//This method check condition based on applicable for
condition = this.get_mapper_for_pricing_rule(data)[data.applicable_for]
- if(in_list(condition[1], condition[0])){
+ if (in_list(condition[1], condition[0])) {
return true
}
},
- get_mapper_for_pricing_rule: function(data){
+ get_mapper_for_pricing_rule: function (data) {
return {
'Customer': [data.customer, [this.frm.doc.customer]],
'Customer Group': [data.customer_group, [this.frm.doc.customer_group, 'All Customer Groups']],
@@ -1190,32 +1392,32 @@
}
},
- validate_pricing_rule: function(pricing_rule){
+ validate_pricing_rule: function (pricing_rule) {
//This method validate duplicate pricing rule
var pricing_rule_name = '';
var priority = 0;
var pricing_rule_list = [];
var priority_list = []
- if(pricing_rule.length > 1){
+ if (pricing_rule.length > 1) {
- $.each(pricing_rule, function(index, data){
+ $.each(pricing_rule, function (index, data) {
pricing_rule_name += data.name + ','
priority_list.push(data.priority)
- if(priority <= data.priority){
+ if (priority <= data.priority) {
priority = data.priority
pricing_rule_list.push(data)
}
})
count = 0
- $.each(priority_list, function(index, value){
- if(value == priority){
+ $.each(priority_list, function (index, value) {
+ if (value == priority) {
count++
}
})
- if(priority == 0 || count > 1){
+ if (priority == 0 || count > 1) {
frappe.throw(__(repl("Multiple Price Rules exists with same criteria, please resolve conflict by assigning priority. Price Rules: %(pricing_rule)s", {
'pricing_rule': pricing_rule_name
})))
@@ -1225,17 +1427,17 @@
}
},
- validate_warehouse: function(){
- if(this.items[0].is_stock_item && !this.items[0].default_warehouse && !this.pos_profile_data['warehouse']){
+ validate_warehouse: function () {
+ if (this.items[0].is_stock_item && !this.items[0].default_warehouse && !this.pos_profile_data['warehouse']) {
frappe.throw(__("Default warehouse is required for selected item"))
}
},
- get_actual_qty: function(item) {
+ get_actual_qty: function (item) {
this.actual_qty = 0.0;
var warehouse = this.pos_profile_data['warehouse'] || item.default_warehouse;
- if(warehouse && this.bin_data[item.item_code]) {
+ if (warehouse && this.bin_data[item.item_code]) {
this.actual_qty = this.bin_data[item.item_code][warehouse] || 0;
this.actual_qty_dict[item.item_code] = this.actual_qty
}
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 471da9e..8aedf78 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -7,7 +7,7 @@
import datetime
from frappe import _, msgprint, scrub
from frappe.defaults import get_user_permissions
-from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years
+from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff, add_years, get_timestamp
from frappe.geo.doctype.address.address import get_address_display, get_default_address
from frappe.email.doctype.contact.contact import get_contact_details, get_default_contact
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
@@ -171,13 +171,13 @@
account = frappe.db.get_value("Party Account",
{"parenttype": party_type, "parent": party, "company": company}, "account")
- if not account:
+ if not account and party_type in ['Customer', 'Supplier']:
party_group_doctype = "Customer Group" if party_type=="Customer" else "Supplier Type"
group = frappe.db.get_value(party_type, party, scrub(party_group_doctype))
account = frappe.db.get_value("Party Account",
{"parenttype": party_group_doctype, "parent": group, "company": company}, "account")
- if not account:
+ if not account and party_type in ['Customer', 'Supplier']:
default_account_name = "default_receivable_account" \
if party_type=="Customer" else "default_payable_account"
account = frappe.db.get_value("Company", company, default_account_name)
@@ -249,7 +249,7 @@
if existing_gle_currency and party_account_currency != existing_gle_currency:
frappe.throw(_("Accounting entries have already been made in currency {0} for company {1}. Please select a receivable or payable account with currency {0}.").format(existing_gle_currency, account.company))
- if doc.default_currency and party_account_currency and company_default_currency:
+ if doc.get("default_currency") and party_account_currency and company_default_currency:
if doc.default_currency != party_account_currency and doc.default_currency != company_default_currency:
frappe.throw(_("Billing currency must be equal to either default comapany's currency or party account currency"))
@@ -337,19 +337,33 @@
def validate_party_frozen_disabled(party_type, party_name):
if party_type and party_name:
- party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
- if party.disabled:
- frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
- elif party.is_frozen:
- frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
- if not frozen_accounts_modifier in frappe.get_roles():
- frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
+ if party_type in ("Customer", "Supplier"):
+ party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
+ if party.disabled:
+ frappe.throw(_("{0} {1} is disabled").format(party_type, party_name), PartyDisabled)
+ elif party.get("is_frozen"):
+ frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
+ if not frozen_accounts_modifier in frappe.get_roles():
+ frappe.throw(_("{0} {1} is frozen").format(party_type, party_name), PartyFrozen)
+
+ elif party_type == "Employee":
+ if frappe.db.get_value("Employee", party_name, "status") == "Left":
+ frappe.msgprint(_("{0} {1} is not active").format(party_type, party_name), PartyDisabled, alert=True)
def get_timeline_data(doctype, name):
'''returns timeline data for the past one year'''
from frappe.desk.form.load import get_communication_data
+
+ out = {}
data = get_communication_data(doctype, name,
- fields = 'unix_timestamp(date(creation)), count(name)',
- after = add_years(None, -1).strftime('%Y-%m-%d'), limit = 366,
+ fields = 'date(creation), count(name)',
+ after = add_years(None, -1).strftime('%Y-%m-%d'),
group_by='group by date(creation)', as_dict=False)
- return dict(data)
\ No newline at end of file
+
+ timeline_items = dict(data)
+
+ for date, count in timeline_items.iteritems():
+ timestamp = get_timestamp(date)
+ out.update({ timestamp: count })
+
+ return out
\ No newline at end of file
diff --git a/erpnext/accounts/party_status.py b/erpnext/accounts/party_status.py
deleted file mode 100644
index 6d9efb1..0000000
--- a/erpnext/accounts/party_status.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-
-import frappe
-
-from frappe.utils import evaluate_filters
-from frappe.desk.notifications import get_filters_for
-
-# NOTE: if you change this also update triggers in erpnext/hooks.py
-status_depends_on = {
- 'Customer': ('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', 'Project', 'Issue'),
- 'Supplier': ('Supplier Quotation', 'Purchase Order', 'Purchase Receipt', 'Purchase Invoice')
-}
-
-default_status = {
- 'Customer': 'Active',
- 'Supplier': None
-}
-
-def notify_status(doc, method=None):
- '''Notify status to customer, supplier'''
-
- party_type = None
- for key, doctypes in status_depends_on.iteritems():
- if doc.doctype in doctypes:
- party_type = key
- break
-
- if not party_type:
- return
-
- name = doc.get(party_type.lower())
- if not name:
- return
-
- party = frappe.get_doc(party_type, name)
- filters = get_filters_for(doc.doctype)
- party.flags.ignore_mandatory = True
-
- status = None
- if filters:
- if evaluate_filters(doc, filters):
- # filters match, passed document is open
- status = 'Open'
-
- if status=='Open':
- if party.status != 'Open':
- # party not open, make it open
- party.status = 'Open'
- party.save(ignore_permissions=True)
-
- else:
- if party.status == 'Open':
- # may be open elsewhere, check
- # default status
- update_status(party)
-
- party.update_modified()
- party.notify_update()
-
-def get_party_status(doc):
- '''return party status based on open documents'''
- status = default_status[doc.doctype]
- for doctype in status_depends_on[doc.doctype]:
- filters = get_filters_for(doctype)
- filters[doc.doctype.lower()] = doc.name
- if filters:
- open_count = frappe.get_all(doctype, fields='name', filters=filters, limit_page_length=1)
- if len(open_count) > 0:
- status = 'Open'
- break
-
- return status
-
-def update_status(doc):
- '''Set status as open if there is any open notification'''
- status = get_party_status(doc)
- if doc.status != status:
- doc.db_set('status', status)
diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py
index 5ff8e3e..7e57dce 100644
--- a/erpnext/accounts/report/balance_sheet/balance_sheet.py
+++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py
@@ -8,7 +8,7 @@
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
def execute(filters=None):
- period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity)
+ period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity, filters.company)
asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False)
liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False)
diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py
index 7a776f5..d2c8c3e 100644
--- a/erpnext/accounts/report/cash_flow/cash_flow.py
+++ b/erpnext/accounts/report/cash_flow/cash_flow.py
@@ -11,7 +11,7 @@
def execute(filters=None):
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
- filters.periodicity)
+ filters.periodicity, filters.company)
operation_accounts = {
"section_name": "Operations",
diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py
index c897d1c..5e84a65 100644
--- a/erpnext/accounts/report/financial_statements.py
+++ b/erpnext/accounts/report/financial_statements.py
@@ -6,7 +6,7 @@
from frappe import _
from frappe.utils import flt, getdate, get_first_day, add_months, add_days, formatdate
-def get_period_list(from_fiscal_year, to_fiscal_year, periodicity):
+def get_period_list(from_fiscal_year, to_fiscal_year, periodicity, company):
"""Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label}
Periodicity can be (Yearly, Quarterly, Monthly)"""
@@ -48,7 +48,7 @@
# if a fiscal year ends before a 12 month period
period.to_date = year_end_date
- period.to_date_fiscal_year = get_date_fiscal_year(period.to_date)
+ period.to_date_fiscal_year = get_date_fiscal_year(period.to_date, company)
period_list.append(period)
@@ -140,14 +140,15 @@
if entry.posting_date <= period.to_date:
if (accumulated_values or entry.posting_date >= period.from_date) and \
(entry.fiscal_year == period.to_date_fiscal_year or not ignore_accumulated_values_for_fy):
+ frappe.errprint([entry.fiscal_year, period.to_date_fiscal_year])
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
if entry.posting_date < period_list[0].year_start_date:
d["opening_balance"] = d.get("opening_balance", 0.0) + flt(entry.debit) - flt(entry.credit)
-def get_date_fiscal_year(date):
+def get_date_fiscal_year(date, company):
from erpnext.accounts.utils import get_fiscal_year
- return get_fiscal_year(date)[0]
+ return get_fiscal_year(date, company=company)[0]
def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values):
"""accumulate children's values in parent accounts"""
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js
index dc79d1f..a422871 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.js
+++ b/erpnext/accounts/report/general_ledger/general_ledger.js
@@ -48,13 +48,19 @@
"fieldtype": "Data",
},
{
+ "fieldname":"project",
+ "label": __("Project"),
+ "fieldtype": "Link",
+ "options": "Project"
+ },
+ {
"fieldtype": "Break",
},
{
"fieldname":"party_type",
"label": __("Party Type"),
- "fieldtype": "Select",
- "options": ["", "Customer", "Supplier"],
+ "fieldtype": "Link",
+ "options": "Party Type",
"default": ""
},
{
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index 00c17e8..d09ac70 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -149,6 +149,9 @@
if not (filters.get("account") or filters.get("party") or filters.get("group_by_account")):
conditions.append("posting_date >=%(from_date)s")
+ if filters.get("project"):
+ conditions.append("project=%(project)s")
+
from frappe.desk.reportview import build_match_conditions
match_conditions = build_match_conditions("GL Entry")
if match_conditions: conditions.append(match_conditions)
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index 3451238..df6cb3c 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _, scrub
+from erpnext.stock.utils import get_incoming_rate
from frappe.utils import flt
@@ -208,21 +209,18 @@
flt(my_sle[i+1].stock_value) or 0.0
return previous_stock_value - flt(sle.stock_value)
else:
- return flt(row.qty) * self.get_average_buying_rate(item_code)
-
+ return flt(row.qty) * self.get_average_buying_rate(row, item_code)
return 0.0
- def get_average_buying_rate(self, item_code):
+ def get_average_buying_rate(self, row, item_code):
if not item_code in self.average_buying_rate:
if item_code in self.non_stock_items:
self.average_buying_rate[item_code] = flt(frappe.db.sql("""select sum(base_net_amount) / sum(qty * conversion_factor)
from `tabPurchase Invoice Item`
where item_code = %s and docstatus=1""", item_code)[0][0])
else:
- self.average_buying_rate[item_code] = flt(frappe.db.sql("""select avg(valuation_rate)
- from `tabStock Ledger Entry`
- where item_code = %s and qty_after_transaction > 0""", item_code)[0][0])
+ self.average_buying_rate[item_code] = get_incoming_rate(row)
return self.average_buying_rate[item_code]
diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
index 747eb43..02dc870 100644
--- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
+++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py
@@ -8,13 +8,14 @@
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
def execute(filters=None):
- period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year, filters.periodicity)
-
+ period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
+ filters.periodicity, filters.company)
+
income = get_data(filters.company, "Income", "Credit", period_list, filters = filters,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True)
expense = get_data(filters.company, "Expense", "Debit", period_list, filters=filters,
accumulated_values=filters.accumulated_values, ignore_closing_entries=True, ignore_accumulated_values_for_fy= True)
-
+
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
data = []
@@ -24,7 +25,7 @@
data.append(net_profit_loss)
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
-
+
chart = get_chart_data(filters, columns, income, expense, net_profit_loss)
return columns, data, None, chart
@@ -43,21 +44,21 @@
for period in period_list:
net_profit_loss[period.key] = flt(income[-2][period.key] - expense[-2][period.key], 3)
-
+
if net_profit_loss[period.key]:
has_value=True
-
+
total += flt(net_profit_loss[period.key])
net_profit_loss["total"] = total
-
+
if has_value:
return net_profit_loss
def get_chart_data(filters, columns, income, expense, net_profit_loss):
x_intervals = ['x'] + [d.get("label") for d in columns[2:]]
-
+
income_data, expense_data, net_profit = [], [], []
-
+
for p in columns[2:]:
if income:
income_data.append(income[-2].get(p.get("fieldname")))
@@ -65,7 +66,7 @@
expense_data.append(expense[-2].get(p.get("fieldname")))
if net_profit_loss:
net_profit.append(net_profit_loss.get(p.get("fieldname")))
-
+
columns = [x_intervals]
if income_data:
columns.append(["Income"] + income_data)
@@ -73,15 +74,20 @@
columns.append(["Expense"] + expense_data)
if net_profit:
columns.append(["Net Profit/Loss"] + net_profit)
-
+
chart = {
"data": {
'x': 'x',
- 'columns': columns
+ 'columns': columns,
+ 'colors': {
+ 'Income': '#5E64FF',
+ 'Expense': '#b8c2cc',
+ 'Net Profit/Loss': '#ff5858'
+ }
}
}
-
+
if not filters.accumulated_values:
chart["chart_type"] = "bar"
-
+
return chart
\ No newline at end of file
diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py
index 09ba40c..c0a4212 100644
--- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py
+++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py
@@ -11,9 +11,11 @@
value_fields = ("income", "expense", "gross_profit_loss")
def execute(filters=None):
+ if not filters.get('based_on'): filters["based_on"] = 'Cost Center'
+
based_on = filters.based_on.replace(' ', '_').lower()
validate_filters(filters)
- accounts = get_accounts_data(based_on, filters.company)
+ accounts = get_accounts_data(based_on, filters.get("company"))
data = get_data(accounts, filters, based_on)
columns = get_columns(filters)
return columns, data
@@ -27,14 +29,14 @@
def get_data(accounts, filters, based_on):
if not accounts:
- return None
+ return []
accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
gl_entries_by_account = {}
- set_gl_entries_by_account(filters.company, filters.from_date,
- filters.to_date, based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry))
+ set_gl_entries_by_account(filters.get("company"), filters.get("from_date"),
+ filters.get("to_date"), based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.get("with_period_closing_entry")))
total_row = calculate_values(accounts, gl_entries_by_account, filters)
accumulate_values_into_parents(accounts, accounts_by_name)
@@ -90,7 +92,7 @@
def prepare_data(accounts, filters, total_row, parent_children_map, based_on):
data = []
- company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
+ company_currency = frappe.db.get_value("Company", filters.get("company"), "default_currency")
for d in accounts:
has_value = False
@@ -99,7 +101,7 @@
"account": d.name,
"parent_account": d.parent_account,
"indent": d.indent,
- "fiscal_year": filters.fiscal_year,
+ "fiscal_year": filters.get("fiscal_year"),
"currency": company_currency,
"based_on": based_on
}
@@ -122,9 +124,9 @@
return [
{
"fieldname": "account",
- "label": _(filters.based_on),
+ "label": _(filters.get("based_on")),
"fieldtype": "Link",
- "options": filters.based_on,
+ "options": filters.get("based_on"),
"width": 300
},
{
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/accounts/report/unpaid_expense_claim/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/accounts/report/unpaid_expense_claim/__init__.py
diff --git a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.js b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.js
new file mode 100644
index 0000000..811414a
--- /dev/null
+++ b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.js
@@ -0,0 +1,12 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.query_reports["Unpaid Expense Claim"] = {
+ "filters": [
+ {
+ "fieldname":"employee",
+ "label": __("Employee"),
+ "fieldtype": "Link"
+ }
+ ]
+}
diff --git a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json
new file mode 100644
index 0000000..a1087c0
--- /dev/null
+++ b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.json
@@ -0,0 +1,18 @@
+{
+ "add_total_row": 0,
+ "apply_user_permissions": 1,
+ "creation": "2017-01-04 16:26:18.309717",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "modified": "2017-01-04 16:26:18.309717",
+ "modified_by": "Administrator",
+ "module": "Accounts",
+ "name": "Unpaid Expense Claim",
+ "owner": "Administrator",
+ "ref_doctype": "Expense Claim",
+ "report_name": "Unpaid Expense Claim",
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py
new file mode 100644
index 0000000..eee620b
--- /dev/null
+++ b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py
@@ -0,0 +1,34 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe import _
+
+def execute(filters=None):
+ columns, data = [], []
+ columns = get_columns()
+ data = get_unclaimed_expese_claims(filters)
+ return columns, data
+
+def get_columns():
+ return [_("Employee") + ":Link/Employee:120", _("Employee Name") + "::120",_("Expense Claim") + ":Link/Expense Claim:120",
+ _("Sanctioned Amount") + ":Currency:120", _("Paid Amount") + ":Currency:120", _("Outstanding Amount") + ":Currency:150"]
+
+def get_unclaimed_expese_claims(filters):
+ cond = "1=1"
+ if filters.get("employee"):
+ cond = "ec.employee = %(employee)s"
+
+ return frappe.db.sql("""
+ select
+ ec.employee, ec.employee_name, ec.name, ec.total_sanctioned_amount, ec.total_amount_reimbursed,
+ sum(gle.credit_in_account_currency - gle.debit_in_account_currency) as outstanding_amt
+ from
+ `tabExpense Claim` ec, `tabGL Entry` gle
+ where
+ gle.against_voucher_type = "Expense Claim" and gle.against_voucher = ec.name
+ and gle.party is not null and ec.docstatus = 1 and ec.is_paid = 0 and {cond} group by ec.name
+ having
+ outstanding_amt > 0
+ """.format(cond=cond), filters, as_list=1)
diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py
index c35ca82..c2812d4 100644
--- a/erpnext/accounts/utils.py
+++ b/erpnext/accounts/utils.py
@@ -242,6 +242,7 @@
if not args:
args = frappe.local.form_dict
+ args.doctype = "Account"
args = make_tree_args(**args)
ac = frappe.new_doc("Account")
@@ -271,7 +272,8 @@
if not args:
args = frappe.local.form_dict
-
+
+ args.doctype = "Cost Center"
args = make_tree_args(**args)
cc = frappe.new_doc("Cost Center")
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 720a1dc..c03ccc8 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -21,20 +21,12 @@
if(this.frm.get_field('shipping_address')) {
this.frm.set_query("shipping_address", function(){
if(me.frm.doc.customer){
- return{
- filters:{
- "customer": me.frm.doc.customer
- }
- }
- }
- else{
- return{
- filters:{
- "is_your_company_address": 1,
- "company": me.frm.doc.company
- }
- }
- }
+ return {
+ query: 'frappe.geo.doctype.address.address.address_query',
+ filters: { link_doctype: 'Customer', link_name: me.frm.doc.customer }
+ };
+ } else
+ return erpnext.queries.company_address_query(me.frm.doc)
});
}
},
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index 8435f3b..79820fa 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -72,8 +72,7 @@
if items and len(items) != len(set(items)) and \
not cint(frappe.db.get_single_value("Buying Settings", "allow_multiple_items") or 0):
- frappe.msgprint(_("Warning: Same item has been entered multiple times."), alert=True)
-
+ frappe.throw(_("Same item cannot be entered multiple times."))
def check_for_closed_status(self, doctype, docname):
status = frappe.db.get_value(doctype, docname, "status")
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index f2f04fe..0a577c3 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -66,7 +66,7 @@
if(doc.docstatus == 1 && doc.status != "Closed") {
if(flt(doc.per_received, 2) < 100 && allow_receipt) {
- cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt, __("Make"));
+ cur_frm.add_custom_button(__('Receipt'), this.make_purchase_receipt, __("Make"));
if(doc.is_subcontracted==="Yes") {
cur_frm.add_custom_button(__('Material to Supplier'),
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.json b/erpnext/buying/doctype/purchase_order/purchase_order.json
index d7dce92..09ffe71 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.json
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -109,7 +112,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Supplier",
@@ -141,6 +145,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Items from Open Material Requests",
@@ -170,6 +175,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Supply Raw Materials",
@@ -198,6 +204,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -254,7 +262,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -284,6 +293,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -314,7 +324,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -346,6 +357,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Drop Ship",
@@ -375,6 +387,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -405,6 +418,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -433,6 +447,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -461,6 +476,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Contact",
@@ -490,6 +506,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Contact",
@@ -518,6 +535,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Mobile No",
@@ -546,6 +564,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Contact Email",
@@ -575,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -602,7 +622,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Supplier Address",
@@ -630,7 +651,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -660,6 +682,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -687,6 +710,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -714,6 +738,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -741,6 +766,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -768,6 +794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -796,6 +823,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Shipping Address",
@@ -825,6 +853,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -853,6 +882,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -881,6 +911,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -912,6 +943,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -942,6 +974,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -968,6 +1001,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -996,6 +1030,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -1024,6 +1059,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -1052,6 +1088,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -1079,6 +1116,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1108,6 +1146,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -1139,6 +1178,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get last purchase rate",
@@ -1167,6 +1207,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1193,6 +1234,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1222,6 +1264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1252,6 +1295,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1278,6 +1322,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1307,6 +1352,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1337,6 +1383,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1367,6 +1414,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1397,6 +1445,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Taxes and Charges",
@@ -1427,6 +1476,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1455,6 +1505,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1484,6 +1535,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added (Company Currency)",
@@ -1514,6 +1566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted (Company Currency)",
@@ -1544,6 +1597,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1574,6 +1628,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1601,6 +1656,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added",
@@ -1631,6 +1687,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted",
@@ -1661,6 +1718,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1691,6 +1749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1720,6 +1779,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1749,6 +1809,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1778,6 +1839,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1805,6 +1867,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1833,6 +1896,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1862,6 +1926,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1889,6 +1954,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1920,6 +1986,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1949,6 +2016,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -1979,6 +2047,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2006,6 +2075,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -2036,6 +2106,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -2065,6 +2136,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advance Paid",
@@ -2094,6 +2166,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -2123,6 +2196,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -2153,6 +2227,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -2182,6 +2257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -2210,7 +2286,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -2241,6 +2318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ref SQ",
@@ -2270,6 +2348,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Account Currency",
@@ -2299,6 +2378,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2328,6 +2408,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "% Received",
@@ -2359,6 +2440,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "% Billed",
@@ -2388,6 +2470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -2418,6 +2501,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -2448,6 +2532,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -2478,6 +2563,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2506,6 +2592,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Group same items",
@@ -2535,6 +2622,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -2566,6 +2654,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied",
@@ -2595,6 +2684,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplied Items",
@@ -2620,15 +2710,17 @@
"collapsible": 1,
"collapsible_depends_on": "is_recurring",
"columns": 0,
+ "depends_on": "eval:doc.docstatus<2 && !doc.__islocal",
"fieldname": "recurring_order",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Recurring",
+ "label": "Recurring Order",
"length": 0,
"no_copy": 0,
"options": "fa fa-time",
@@ -2654,6 +2746,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Settings",
@@ -2683,6 +2776,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Recurring",
@@ -2712,6 +2806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Document",
@@ -2742,6 +2837,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency",
@@ -2772,6 +2868,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Repeat on Day of Month",
@@ -2801,6 +2898,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -2829,6 +2927,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Submit on creation",
@@ -2859,6 +2958,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notify by email",
@@ -2889,6 +2989,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notification Email Address",
@@ -2918,6 +3019,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Print Format",
@@ -2947,6 +3049,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "This Document",
@@ -2976,6 +3079,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -3005,6 +3109,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -3034,6 +3139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Date",
@@ -3062,7 +3168,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-06 12:51:56.556331",
+ "modified": "2017-02-22 18:20:15.650815",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",
@@ -3078,7 +3184,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -3099,7 +3204,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3120,7 +3224,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3141,7 +3244,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -3157,9 +3259,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status, transaction_date, supplier,grand_total",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
index d4a0d07..17786aa 100644
--- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py
@@ -112,6 +112,7 @@
self.assertEquals(get_ordered_qty(item_code="_Test Item", warehouse="_Test Warehouse - _TC"), existing_ordered_qty)
def test_group_same_items(self):
+ frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
frappe.get_doc({
"doctype": "Purchase Order",
"company": "_Test Company",
@@ -121,10 +122,10 @@
"conversion_factor" : 1,
"items" : get_same_items(),
"group_same_items": 1
- }).insert()
+ }).insert(ignore_permissions=True)
-def get_same_items():
+def get_same_items():
return [
{
"item_code": "_Test FG Item",
diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
index 6fb6af7..12d0da8 100755
--- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
+++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -33,6 +36,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -51,7 +55,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier Part Number",
"length": 0,
"no_copy": 0,
@@ -59,6 +65,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -75,8 +82,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -86,6 +95,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -103,7 +113,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -111,6 +123,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,
@@ -127,8 +140,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reqd By Date",
"length": 0,
"no_copy": 0,
@@ -138,6 +153,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -155,7 +171,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Expected Delivery Date",
"length": 0,
"no_copy": 0,
@@ -164,6 +182,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": 1,
@@ -181,7 +200,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -190,6 +211,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,
@@ -207,7 +229,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -218,6 +242,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -236,13 +261,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -260,7 +288,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -269,6 +299,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,
@@ -286,7 +317,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -296,6 +329,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -313,7 +347,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
@@ -321,6 +357,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,
@@ -338,7 +375,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -349,6 +388,7 @@
"print_hide_if_no_value": 0,
"print_width": "60px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -367,7 +407,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
@@ -379,6 +421,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -397,13 +440,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -421,7 +467,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -433,6 +481,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -451,7 +500,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM Conversion Factor",
"length": 0,
"no_copy": 0,
@@ -462,6 +513,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -480,13 +532,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -504,7 +559,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
@@ -513,6 +570,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -531,7 +589,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
@@ -539,6 +599,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,
@@ -556,13 +617,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -580,7 +644,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -589,6 +655,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -606,13 +673,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -630,7 +700,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -641,6 +713,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,
@@ -658,7 +731,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -669,6 +744,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -686,13 +762,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -710,7 +789,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -722,6 +803,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -740,7 +822,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -751,6 +835,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -768,7 +853,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
@@ -777,6 +864,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -794,7 +882,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -802,6 +892,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,
@@ -819,7 +910,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
@@ -829,6 +922,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -846,7 +940,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
@@ -856,6 +952,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -873,7 +970,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -881,6 +980,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,
@@ -898,7 +998,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -908,6 +1010,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -925,7 +1028,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -935,6 +1040,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -952,7 +1058,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Warehouse and Reference",
"length": 0,
"no_copy": 0,
@@ -960,6 +1068,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,
@@ -977,7 +1086,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -988,6 +1099,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1004,8 +1116,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Project",
"length": 0,
"no_copy": 0,
@@ -1014,6 +1128,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1030,8 +1145,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request",
"length": 0,
"no_copy": 1,
@@ -1043,6 +1160,7 @@
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1060,8 +1178,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request Item",
"length": 0,
"no_copy": 1,
@@ -1071,6 +1191,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1088,7 +1209,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Order",
"length": 0,
"no_copy": 1,
@@ -1098,6 +1221,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1115,7 +1239,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Order Item",
"length": 0,
"no_copy": 1,
@@ -1124,6 +1250,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1141,7 +1268,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier Quotation",
"length": 0,
"no_copy": 1,
@@ -1150,6 +1279,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1167,7 +1297,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier Quotation Item",
"length": 0,
"no_copy": 1,
@@ -1176,6 +1308,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1193,7 +1326,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "To be delivered to customer",
"length": 0,
"no_copy": 0,
@@ -1202,6 +1337,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1219,13 +1355,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -1243,8 +1382,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -1255,6 +1396,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1272,7 +1414,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
@@ -1283,6 +1427,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1300,7 +1445,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "BOM",
"length": 0,
"no_copy": 0,
@@ -1310,6 +1457,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1327,7 +1475,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Qty as per Stock UOM",
"length": 0,
"no_copy": 1,
@@ -1338,6 +1488,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1356,7 +1507,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Received Qty",
"length": 0,
"no_copy": 1,
@@ -1366,6 +1519,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1384,7 +1538,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Returned Qty",
"length": 0,
"no_copy": 1,
@@ -1393,6 +1549,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1410,7 +1567,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Billed Amt",
"length": 0,
"no_copy": 1,
@@ -1419,6 +1578,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1437,7 +1597,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
@@ -1447,6 +1609,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1464,7 +1627,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
@@ -1474,6 +1639,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1491,7 +1657,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-10-26 16:07:40.592325",
+ "modified": "2017-02-17 16:44:55.434162",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",
@@ -1500,7 +1666,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
-}
+}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json
index d92aa78..85130a1 100644
--- a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json
+++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.json
@@ -8,18 +8,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "main_item_code",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -29,6 +33,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -39,13 +44,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rm_item_code",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Raw Material Item Code",
"length": 0,
"no_copy": 0,
@@ -55,6 +63,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -65,13 +74,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -82,6 +94,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -93,13 +106,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "batch_no",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Batch No",
"length": 0,
"no_copy": 1,
@@ -108,6 +124,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,
@@ -118,13 +135,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "serial_no",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 1,
@@ -132,6 +152,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,
@@ -142,19 +163,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -165,13 +190,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "required_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Required Qty",
"length": 0,
"no_copy": 0,
@@ -181,6 +209,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -191,13 +220,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "consumed_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Consumed Qty",
"length": 0,
"no_copy": 0,
@@ -207,6 +239,7 @@
"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,
@@ -217,13 +250,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Stock Uom",
"length": 0,
"no_copy": 0,
@@ -234,6 +270,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -244,13 +281,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rate",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -261,6 +301,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -271,13 +312,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -288,6 +332,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -298,13 +343,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "conversion_factor",
"fieldtype": "Float",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Conversion Factor",
"length": 0,
"no_copy": 0,
@@ -314,6 +362,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -324,13 +373,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "current_stock",
"fieldtype": "Float",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Current Stock",
"length": 0,
"no_copy": 0,
@@ -340,6 +392,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -350,13 +403,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "reference_name",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
@@ -366,6 +422,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -376,13 +433,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "bom_detail_no",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "BOM Detail No",
"length": 0,
"no_copy": 0,
@@ -392,6 +452,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -409,7 +470,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:05.972909",
+ "modified": "2017-02-17 16:43:21.668443",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Receipt Item Supplied",
@@ -418,7 +479,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
index fbdb0e4..7f2802c 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -53,7 +54,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -86,6 +88,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Supplier",
@@ -115,6 +118,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -144,7 +148,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -175,6 +180,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -203,6 +209,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Detail",
@@ -232,6 +239,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -262,6 +270,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -293,6 +302,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -321,6 +331,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Standard Reply",
@@ -350,6 +361,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Message for Supplier",
@@ -379,6 +391,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -409,6 +422,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -440,6 +454,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -470,6 +485,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -498,6 +514,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -529,6 +546,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -560,6 +578,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -589,7 +608,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -620,7 +640,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fiscal Year",
@@ -652,6 +673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -679,6 +701,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -708,7 +731,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:34:08.567257",
+ "modified": "2017-02-17 16:44:39.531065",
"modified_by": "Administrator",
"module": "Buying",
"name": "Request for Quotation",
@@ -725,7 +748,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -746,7 +768,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -767,7 +788,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -788,7 +808,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -809,7 +828,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -830,7 +848,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -851,7 +868,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -867,9 +883,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status, transaction_date",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "",
"title_field": "",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json
index cc7e36c..a7ae8a6 100644
--- a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json
+++ b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -34,6 +37,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -51,7 +55,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier Part No",
"length": 0,
"no_copy": 1,
@@ -60,6 +66,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,7 +84,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -85,6 +94,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,
@@ -101,8 +111,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -113,6 +125,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": 1,
@@ -130,7 +143,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -139,6 +154,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,
@@ -156,7 +172,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -168,6 +186,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -186,7 +205,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -194,6 +215,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,
@@ -211,7 +233,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -220,6 +244,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,
@@ -237,7 +262,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -247,6 +274,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -264,7 +292,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -273,6 +303,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,
@@ -290,7 +321,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -302,6 +335,7 @@
"print_hide_if_no_value": 0,
"print_width": "60px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -320,7 +354,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -328,6 +364,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,
@@ -346,7 +383,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Required Date",
"length": 0,
"no_copy": 0,
@@ -355,6 +394,7 @@
"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,
@@ -372,7 +412,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -385,6 +427,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -403,7 +446,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Warehouse and Reference",
"length": 0,
"no_copy": 0,
@@ -412,6 +457,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,
@@ -429,7 +475,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -441,6 +489,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -457,8 +506,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
@@ -468,6 +519,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -485,7 +537,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request",
"length": 0,
"no_copy": 0,
@@ -495,6 +549,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -512,7 +567,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -520,6 +577,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,
@@ -537,7 +595,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request Item",
"length": 0,
"no_copy": 0,
@@ -546,6 +606,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -563,7 +624,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
@@ -575,6 +638,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -592,8 +656,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -605,6 +671,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -622,7 +689,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
@@ -633,6 +702,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -650,7 +720,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-08-26 02:40:48.487168",
+ "modified": "2017-02-17 16:43:46.152268",
"modified_by": "Administrator",
"module": "Buying",
"name": "Request for Quotation Item",
@@ -660,7 +730,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json
index 0af30c2..7bc0def 100644
--- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json
+++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.json
@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 1,
@@ -22,7 +23,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Send Email",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,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,
@@ -48,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Supplier",
"length": 0,
"no_copy": 0,
@@ -58,6 +64,7 @@
"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,
@@ -75,7 +82,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Contact",
"length": 0,
"no_copy": 1,
@@ -85,6 +94,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,
@@ -102,7 +112,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -110,6 +122,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,
@@ -127,7 +140,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier Name",
"length": 0,
"no_copy": 0,
@@ -137,6 +152,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,
@@ -154,8 +170,10 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
- "label": "Email Address",
+ "in_standard_filter": 0,
+ "label": "Email Id",
"length": 0,
"no_copy": 1,
"options": "contact.email_id",
@@ -164,6 +182,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,
@@ -181,7 +200,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Download PDF",
"length": 0,
"no_copy": 0,
@@ -190,6 +211,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,
@@ -207,7 +229,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-08-26 02:38:45.634613",
+ "modified": "2017-02-17 16:42:57.254211",
"modified_by": "Administrator",
"module": "Buying",
"name": "Request for Quotation Supplier",
@@ -217,7 +239,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index ce6f451..7e5e045 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -26,11 +26,11 @@
if(frm.doc.__islocal){
hide_field(['address_html','contact_html']);
- erpnext.utils.clear_address_and_contact(frm);
+ frappe.geo.clear_address_and_contact(frm);
}
else {
unhide_field(['address_html','contact_html']);
- erpnext.utils.render_address_and_contact(frm);
+ frappe.geo.render_address_and_contact(frm);
// custom buttons
frm.add_custom_button(__('Accounting Ledger'), function() {
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 4b8f8c5..76f28ae 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -24,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Name and Type",
@@ -53,6 +54,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -83,6 +85,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
@@ -112,6 +115,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Country",
@@ -141,6 +145,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -163,41 +168,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Status",
- "length": 0,
- "no_copy": 0,
- "options": "\nOpen",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "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_break0",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -225,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Supplier Type",
@@ -255,6 +233,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -285,6 +264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
@@ -313,6 +293,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -341,6 +322,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Currency",
@@ -369,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -396,6 +379,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -424,6 +408,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Limit",
@@ -452,6 +437,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days Based On",
@@ -482,6 +468,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days",
@@ -510,6 +497,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contacts",
@@ -539,6 +527,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address HTML",
@@ -566,6 +555,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -593,6 +583,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact HTML",
@@ -621,6 +612,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Payable Accounts",
@@ -650,6 +642,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -679,6 +672,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -707,6 +701,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website",
@@ -737,6 +732,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Details",
@@ -766,6 +762,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Frozen",
@@ -796,7 +793,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:24:30.465053",
+ "modified": "2017-02-17 16:46:48.202078",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",
@@ -813,7 +810,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -834,7 +830,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -855,7 +850,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -876,7 +870,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -897,7 +890,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -918,7 +910,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -939,7 +930,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -955,7 +945,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "supplier_name, supplier_type",
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
"title_field": "supplier_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py
index 9eaaad1..704e828 100644
--- a/erpnext/buying/doctype/supplier/supplier.py
+++ b/erpnext/buying/doctype/supplier/supplier.py
@@ -6,12 +6,11 @@
import frappe.defaults
from frappe import msgprint, _
from frappe.model.naming import make_autoname
-from erpnext.utilities.address_and_contact import (load_address_and_contact,
+from frappe.geo.address_and_contact import (load_address_and_contact,
delete_contact_and_address)
from erpnext.utilities.transaction_base import TransactionBase
from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
-from erpnext.accounts.party_status import get_party_status
class Supplier(TransactionBase):
def get_feed(self):
@@ -59,15 +58,6 @@
msgprint(_("Series is mandatory"), raise_exception=1)
validate_party_accounts(self)
- self.status = get_party_status(self)
-
- def get_contacts(self,nm):
- if nm:
- contact_details =frappe.db.convert_to_lists(frappe.db.sql("select name, CONCAT(IFNULL(first_name,''),' ',IFNULL(last_name,'')),contact_no,email_id from `tabContact` where supplier = %s", nm))
-
- return contact_details
- else:
- return ''
def on_trash(self):
delete_contact_and_address('Supplier', self.name)
diff --git a/erpnext/buying/doctype/supplier/supplier_list.js b/erpnext/buying/doctype/supplier/supplier_list.js
index acf8e68..dd98c43 100644
--- a/erpnext/buying/doctype/supplier/supplier_list.js
+++ b/erpnext/buying/doctype/supplier/supplier_list.js
@@ -1,8 +1,3 @@
frappe.listview_settings['Supplier'] = {
- add_fields: ["supplier_name", "supplier_type", 'status'],
- get_indicator: function(doc) {
- if(doc.status==="Open") {
- return [doc.status, "red", "status,=," + doc.status];
- }
- }
+ add_fields: ["supplier_name", "supplier_type"],
};
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
index 519c37e..e1319ed 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -109,7 +112,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Supplier",
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Name",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -196,7 +202,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -226,6 +233,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -256,7 +264,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -287,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -314,7 +324,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Address",
@@ -342,7 +353,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -371,6 +383,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -398,6 +411,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -425,6 +439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -452,6 +467,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -480,6 +496,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -508,6 +525,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -539,6 +557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -569,6 +588,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -597,6 +617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -626,6 +647,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -655,6 +677,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -683,6 +706,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -710,6 +734,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -739,6 +764,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -769,6 +795,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -795,6 +822,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -824,6 +852,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -854,6 +883,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -880,6 +910,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -909,6 +940,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -939,6 +971,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -969,6 +1002,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -999,6 +1033,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Taxes and Charges",
@@ -1029,6 +1064,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1057,6 +1093,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1086,6 +1123,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added (Company Currency)",
@@ -1116,6 +1154,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted (Company Currency)",
@@ -1146,6 +1185,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1176,6 +1216,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1203,6 +1244,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added",
@@ -1233,6 +1275,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted",
@@ -1263,6 +1306,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1293,6 +1337,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1322,6 +1367,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1351,6 +1397,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1380,6 +1427,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1407,6 +1455,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1435,6 +1484,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1464,6 +1514,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1491,6 +1542,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1522,6 +1574,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1551,6 +1604,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -1581,6 +1635,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1608,6 +1663,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -1638,6 +1694,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -1668,6 +1725,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -1697,6 +1755,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -1727,6 +1786,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -1756,6 +1816,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -1784,6 +1845,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1814,6 +1876,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1844,6 +1907,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -1872,6 +1936,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1900,7 +1965,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -1931,6 +1997,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1958,6 +2025,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Subcontracted",
@@ -1986,6 +2054,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference",
@@ -2014,6 +2083,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opportunity",
@@ -2045,7 +2115,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:59:51.237877",
+ "modified": "2017-02-17 16:45:32.200667",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",
@@ -2061,7 +2131,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2082,7 +2151,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2103,7 +2171,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2124,7 +2191,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2145,7 +2211,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -2161,9 +2226,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status, transaction_date, supplier,grand_total",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
index 73ebf23..622e630 100644
--- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
+++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -33,6 +36,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -51,7 +55,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier Part Number",
"length": 0,
"no_copy": 0,
@@ -59,6 +65,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -76,7 +83,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -84,6 +93,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,
@@ -100,8 +110,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -111,6 +123,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -128,7 +141,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -137,6 +152,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,
@@ -154,7 +170,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -165,6 +183,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -183,13 +202,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -207,7 +229,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -216,6 +240,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,
@@ -233,7 +258,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -243,6 +270,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -260,7 +288,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
@@ -268,6 +298,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,
@@ -285,7 +316,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -296,6 +329,7 @@
"print_hide_if_no_value": 0,
"print_width": "60px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -314,7 +348,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
@@ -324,6 +360,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -341,7 +378,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
@@ -350,6 +389,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -368,7 +408,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
@@ -376,6 +418,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,
@@ -393,13 +436,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -417,7 +463,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -429,6 +477,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -447,7 +496,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM Conversion Factor",
"length": 0,
"no_copy": 0,
@@ -456,6 +507,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -473,7 +525,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -482,6 +536,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -499,13 +554,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -523,7 +581,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Rate ",
"length": 0,
"no_copy": 0,
@@ -534,6 +594,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,
@@ -551,7 +612,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -562,6 +625,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -579,13 +643,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -603,7 +670,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -616,6 +685,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -634,7 +704,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -645,6 +717,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -662,7 +735,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
@@ -671,6 +746,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -688,7 +764,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -696,6 +774,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,
@@ -713,7 +792,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
@@ -722,6 +803,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -739,7 +821,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
@@ -749,6 +833,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -766,7 +851,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -774,6 +861,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,
@@ -791,7 +879,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -801,6 +891,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -818,7 +909,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -828,6 +921,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -845,7 +939,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Warehouse and Reference",
"length": 0,
"no_copy": 0,
@@ -853,6 +949,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,
@@ -870,7 +967,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -881,6 +980,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -897,8 +997,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Project",
"length": 0,
"no_copy": 0,
@@ -907,6 +1009,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -924,7 +1027,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Prevdoc DocType",
"length": 0,
"no_copy": 1,
@@ -934,6 +1039,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -950,8 +1056,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request",
"length": 0,
"no_copy": 0,
@@ -963,6 +1071,7 @@
"print_hide_if_no_value": 0,
"print_width": "120px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -981,7 +1090,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Request for Quotation",
"length": 0,
"no_copy": 1,
@@ -991,6 +1102,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1008,13 +1120,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -1031,8 +1146,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request Item",
"length": 0,
"no_copy": 0,
@@ -1042,6 +1159,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1059,7 +1177,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Request for Quotation Item",
"length": 0,
"no_copy": 1,
@@ -1068,6 +1188,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1085,7 +1206,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
@@ -1096,6 +1219,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1113,8 +1237,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -1125,6 +1251,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1143,7 +1270,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
@@ -1153,6 +1282,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1170,7 +1300,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -1178,6 +1310,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,
@@ -1195,7 +1328,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Qty as per Stock UOM",
"length": 0,
"no_copy": 1,
@@ -1204,6 +1339,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1221,7 +1357,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
@@ -1231,6 +1369,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1248,7 +1387,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-06 02:40:11.022104",
+ "modified": "2017-02-17 16:43:59.582188",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation Item",
@@ -1257,7 +1396,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/buying/report/supplier_addresses_and_contacts/__init__.py b/erpnext/buying/report/supplier_addresses_and_contacts/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/buying/report/supplier_addresses_and_contacts/__init__.py
+++ /dev/null
diff --git a/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json b/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json
deleted file mode 100644
index 128548f..0000000
--- a/erpnext/buying/report/supplier_addresses_and_contacts/supplier_addresses_and_contacts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "apply_user_permissions": 1,
- "creation": "2013-10-09 10:38:40",
- "docstatus": 0,
- "doctype": "Report",
- "idx": 1,
- "is_standard": "Yes",
- "modified": "2014-09-11 08:53:17.358554",
- "modified_by": "Administrator",
- "module": "Buying",
- "name": "Supplier Addresses and Contacts",
- "owner": "Administrator",
- "query": "SELECT\n `tabSupplier`.name as \"Supplier:Link/Supplier:120\",\n\t`tabSupplier`.supplier_name as \"Supplier Name::120\",\n\t`tabSupplier`.supplier_type as \"Supplier Type:Link/Supplier Type:120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2), \n\t\ttabAddress.state, tabAddress.pincode, tabAddress.country\n\t) as 'Address::180',\n concat_ws(', ', `tabContact`.first_name, `tabContact`.last_name) as \"Contact Name::180\",\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Address::120\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact::120\"\nFROM\n\t`tabSupplier`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.supplier=`tabSupplier`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.supplier=`tabSupplier`.name\n\t)\nWHERE\n\t`tabSupplier`.docstatus<2\nORDER BY\n\t`tabSupplier`.name asc",
- "ref_doctype": "Supplier",
- "report_name": "Supplier Addresses and Contacts",
- "report_type": "Query Report"
-}
\ No newline at end of file
diff --git a/erpnext/config/buying.py b/erpnext/config/buying.py
index e246266..990ca7a 100644
--- a/erpnext/config/buying.py
+++ b/erpnext/config/buying.py
@@ -172,8 +172,12 @@
{
"type": "report",
"is_query_report": True,
- "name": "Supplier Addresses and Contacts",
- "doctype": "Supplier"
+ "name": "Addresses And Contacts",
+ "label": "Supplier Addresses And Contacts",
+ "doctype": "Address",
+ "route_options": {
+ "party_type": "Supplier"
+ }
},
]
},
diff --git a/erpnext/config/hr.py b/erpnext/config/hr.py
index 3a18a27..0a969ed 100644
--- a/erpnext/config/hr.py
+++ b/erpnext/config/hr.py
@@ -146,6 +146,11 @@
"name": "Appraisal Template",
"description": _("Template for performance appraisals.")
},
+ {
+ "type": "page",
+ "name": "team-updates",
+ "label": _("Team Updates")
+ },
]
},
@@ -166,7 +171,7 @@
},
]
},
-
+
{
"label": _("Fleet Management"),
"items": [
@@ -180,7 +185,7 @@
},
]
},
-
+
{
"label": _("Setup"),
@@ -266,6 +271,26 @@
]
},
{
+ "label": _("Employee Loan Management"),
+ "icon": "icon-list",
+ "items": [
+ {
+ "type": "doctype",
+ "name": "Loan Type",
+ "description": _("Define various loan types")
+ },
+ {
+ "type": "doctype",
+ "name": "Employee Loan Application",
+ "description": _("Employee Loan Application")
+ },
+ {
+ "type": "doctype",
+ "name": "Employee Loan"
+ },
+ ]
+ },
+ {
"label": _("Help"),
"icon": "fa fa-facetime-video",
"items": [
diff --git a/erpnext/config/learn.py b/erpnext/config/learn.py
index 426449b..86db808 100644
--- a/erpnext/config/learn.py
+++ b/erpnext/config/learn.py
@@ -44,7 +44,7 @@
},
{
"type": "help",
- "label": _("Setting up Email"),
+ "label": _("Setting up Email Account"),
"youtube_id": "YFYe0DrB95o"
},
{
@@ -64,11 +64,6 @@
},
{
"type": "help",
- "label": _("Email Account"),
- "youtube_id": "YFYe0DrB95o"
- },
- {
- "type": "help",
"label": _("File Manager"),
"youtube_id": "4-osLW3E_Rk"
},
diff --git a/erpnext/config/manufacturing.py b/erpnext/config/manufacturing.py
index 0f76952..a930ddc 100644
--- a/erpnext/config/manufacturing.py
+++ b/erpnext/config/manufacturing.py
@@ -112,13 +112,18 @@
"is_query_report": True,
"name": "Completed Production Orders",
"doctype": "Production Order"
+ },{
+ "type": "page",
+ "name": "production-analytics",
+ "label": _("Production Analytics"),
+ "icon": "fa fa-bar-chart",
},
{
"type": "report",
"is_query_report": True,
"name": "BOM Search",
"doctype": "BOM"
- },
+ }
]
},
{
diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py
index 903f54b..e95b734 100644
--- a/erpnext/config/schools.py
+++ b/erpnext/config/schools.py
@@ -128,7 +128,11 @@
},
{
"type": "doctype",
- "name": "Evaluation Criteria"
+ "name": "Assessment Criteria"
+ },
+ {
+ "type": "doctype",
+ "name": "Assessment Criteria Group"
},
{
"type": "doctype",
@@ -160,23 +164,6 @@
]
},
{
- "label": _("LMS"),
- "items": [
- {
- "type": "doctype",
- "name": "Announcement"
- },
- {
- "type": "doctype",
- "name": "Topic"
- },
- {
- "type": "doctype",
- "name": "Discussion"
- }
- ]
- },
- {
"label": _("Setup"),
"items": [
{
diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py
index c406d09..bbae245 100644
--- a/erpnext/config/selling.py
+++ b/erpnext/config/selling.py
@@ -120,6 +120,16 @@
{
"type": "report",
"is_query_report": True,
+ "name": "Addresses And Contacts",
+ "label": "Sales Partner Addresses And Contacts",
+ "doctype": "Address",
+ "route_options": {
+ "party_type": "Sales Partner"
+ }
+ },
+ {
+ "type": "report",
+ "is_query_report": True,
"name": "Territory Target Variance (Item Group-Wise)",
"route": "query-report/Territory Target Variance Item Group-Wise",
"doctype": "Territory"
@@ -215,8 +225,12 @@
{
"type": "report",
"is_query_report": True,
- "name": "Customer Addresses And Contacts",
- "doctype": "Contact"
+ "name": "Addresses And Contacts",
+ "label": "Customer Addresses And Contacts",
+ "doctype": "Address",
+ "route_options": {
+ "party_type": "Customer"
+ }
},
{
"type": "report",
diff --git a/erpnext/config/setup.py b/erpnext/config/setup.py
index 9c9bae2..878b2f2 100644
--- a/erpnext/config/setup.py
+++ b/erpnext/config/setup.py
@@ -96,6 +96,12 @@
"items": [
{
"type": "doctype",
+ "name": "Feedback Trigger",
+ "label": _("Feedback Trigger"),
+ "description": _("Automatically triggers the feedback request based on conditions.")
+ },
+ {
+ "type": "doctype",
"name": "Email Digest",
"description": _("Create and manage daily, weekly and monthly email digests.")
},
diff --git a/erpnext/config/stock.py b/erpnext/config/stock.py
index 14e7999..a98c40e 100644
--- a/erpnext/config/stock.py
+++ b/erpnext/config/stock.py
@@ -50,6 +50,11 @@
"doctype": "Item",
},
{
+ "type": "page",
+ "name": "stock-balance",
+ "label": _("Stock Summary")
+ },
+ {
"type": "report",
"is_query_report": True,
"name": "Stock Ageing",
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index c4ba9e7..1d1b4e2 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -178,6 +178,9 @@
for item in self.get("items"):
item.rm_supp_cost = 0.0
+ if self.is_subcontracted == "No" and self.get("supplied_items"):
+ self.set('supplied_items', [])
+
def update_raw_materials_supplied(self, item, raw_material_table):
bom_items = self.get_items_from_bom(item.item_code, item.bom)
raw_materials_cost = 0
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index cc3f277..88600e8 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -5,6 +5,7 @@
import frappe
from frappe.desk.reportview import get_match_cond, get_filters_cond
from frappe.utils import nowdate
+from collections import defaultdict
# searches for active employees
@@ -348,3 +349,46 @@
'company': filters.get("company", ""),
'txt': "%%%s%%" % frappe.db.escape(txt)
})
+
+
+@frappe.whitelist()
+def warehouse_query(doctype, txt, searchfield, start, page_len, filters):
+ # Should be used when item code is passed in filters.
+ conditions, bin_conditions = [], []
+ filter_dict = get_doctype_wise_filters(filters)
+
+ sub_query = """ select round(`tabBin`.actual_qty, 2) from `tabBin`
+ where `tabBin`.warehouse = `tabWarehouse`.name
+ {bin_conditions} """.format(
+ bin_conditions=get_filters_cond(doctype, filter_dict.get("Bin"), bin_conditions))
+
+ response = frappe.db.sql("""select `tabWarehouse`.name,
+ CONCAT_WS(" : ", "Actual Qty", ifnull( ({sub_query}), 0) ) as actual_qty
+ from `tabWarehouse`
+ where
+ `tabWarehouse`.`{key}` like %(txt)s
+ {fcond} {mcond}
+ order by
+ `tabWarehouse`.name desc
+ limit
+ %(start)s, %(page_len)s
+ """.format(
+ sub_query=sub_query,
+ key=frappe.db.escape(searchfield),
+ fcond=get_filters_cond(doctype, filter_dict.get("Warehouse"), conditions),
+ mcond=get_match_cond(doctype)
+ ),
+ {
+ "txt": "%%%s%%" % frappe.db.escape(txt),
+ "start": start,
+ "page_len": page_len
+ })
+ return response
+
+
+def get_doctype_wise_filters(filters):
+ # Helper function to seperate filters doctype_wise
+ filter_dict = defaultdict(list)
+ for row in filters:
+ filter_dict[row[0]].append(row)
+ return filter_dict
diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py
index 4fbee58..55bcaf3 100644
--- a/erpnext/controllers/status_updater.py
+++ b/erpnext/controllers/status_updater.py
@@ -6,7 +6,6 @@
from frappe.utils import flt, comma_or, nowdate, getdate
from frappe import _
from frappe.model.document import Document
-from erpnext.accounts.party_status import notify_status
def validate_status(status, options):
if status not in options:
@@ -287,7 +286,6 @@
target = frappe.get_doc(args["target_parent_dt"], args["name"])
target.set_status(update=True)
target.notify_update()
- notify_status(target)
def _update_modified(self, args, update_modified):
args['update_modified'] = ''
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index 5ecab8d..add882c 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):
@@ -53,8 +54,16 @@
self.check_expense_account(item_row)
- if not sle.stock_value_difference:
- self.validate_negative_stock(sle)
+ # If item is not a sample item
+ # and ( valuation rate not mentioned in an incoming entry
+ # or incoming entry not found while delivering the item),
+ # try to pick valuation rate from previous sle or Item master and update in SLE
+ # Otherwise, throw an exception
+
+ if not sle.stock_value_difference and self.doctype != "Stock Reconciliation" \
+ and not item_row.get("is_sample_item"):
+
+ sle = self.update_stock_ledger_entries(sle)
gl_list.append(self.get_gl_dict({
"account": warehouse_account[sle.warehouse]["name"],
@@ -86,11 +95,26 @@
return process_gl_map(gl_list)
- 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}")
- .format(sle.item_code, sle.voucher_type, sle.voucher_no))
+ def update_stock_ledger_entries(self, sle):
+ sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
+ self.doctype, self.name)
+ sle.stock_value = flt(sle.qty_after_transaction) * flt(sle.valuation_rate)
+ sle.stock_value_difference = flt(sle.actual_qty) * flt(sle.valuation_rate)
+
+ if sle.name:
+ frappe.db.sql("""
+ update
+ `tabStock Ledger Entry`
+ set
+ stock_value = %(stock_value)s,
+ valuation_rate = %(valuation_rate)s,
+ stock_value_difference = %(stock_value_difference)s
+ where
+ name = %(name)s""", (sle))
+
+ return sle
+
def get_voucher_details(self, default_expense_account, default_cost_center, sle_map):
if self.doctype == "Stock Reconciliation":
return [frappe._dict({ "name": voucher_detail_no, "expense_account": default_expense_account,
@@ -138,10 +162,18 @@
def get_stock_ledger_details(self):
stock_ledger = {}
- for sle in frappe.db.sql("""select warehouse, stock_value_difference,
- voucher_detail_no, item_code, posting_date, posting_time, actual_qty, qty_after_transaction
- from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""",
- (self.doctype, self.name), as_dict=True):
+ stock_ledger_entries = frappe.db.sql("""
+ select
+ name, warehouse, stock_value_difference, valuation_rate,
+ voucher_detail_no, item_code, posting_date, posting_time,
+ actual_qty, qty_after_transaction
+ from
+ `tabStock Ledger Entry`
+ where
+ voucher_type=%s and voucher_no=%s
+ """, (self.doctype, self.name), as_dict=True)
+
+ for sle in stock_ledger_entries:
stock_ledger.setdefault(sle.voucher_detail_no, []).append(sle)
return stock_ledger
diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js
index be3cd82..7e22125 100644
--- a/erpnext/crm/doctype/lead/lead.js
+++ b/erpnext/crm/doctype/lead/lead.js
@@ -25,6 +25,7 @@
refresh: function() {
var doc = this.frm.doc;
erpnext.toggle_naming_series();
+ frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'name', doctype: 'Lead'}
if(!this.frm.doc.__islocal && this.frm.doc.__onload && !this.frm.doc.__onload.is_customer) {
this.frm.add_custom_button(__("Customer"), this.create_customer, __("Make"));
@@ -34,9 +35,9 @@
}
if(!this.frm.doc.__islocal) {
- erpnext.utils.render_address_and_contact(cur_frm);
+ frappe.geo.render_address_and_contact(cur_frm);
} else {
- erpnext.utils.clear_address_and_contact(cur_frm);
+ frappe.geo.clear_address_and_contact(cur_frm);
}
},
diff --git a/erpnext/crm/doctype/lead/lead.json b/erpnext/crm/doctype/lead/lead.json
index 8c4be89..17c4022 100644
--- a/erpnext/crm/doctype/lead/lead.json
+++ b/erpnext/crm/doctype/lead/lead.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -79,7 +81,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Person Name",
@@ -108,7 +111,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Organization Name",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Email Address",
@@ -168,6 +173,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -195,7 +201,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -220,12 +227,14 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "depends_on": "",
"fieldname": "source",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -250,13 +259,14 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "eval:doc.source == 'Customer'",
+ "depends_on": "eval:doc.source == 'Existing Customer'",
"fieldname": "customer",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Customer",
@@ -281,7 +291,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "depends_on": "",
+ "depends_on": "eval: doc.source==\"Campaign\"",
"description": "",
"fieldname": "campaign_name",
"fieldtype": "Link",
@@ -289,6 +299,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign Name",
@@ -319,6 +330,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -347,6 +359,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -374,7 +387,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lead Owner",
@@ -405,6 +419,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -431,7 +446,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Contact By",
@@ -463,7 +479,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Contact Date",
@@ -494,6 +511,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address & Contact",
@@ -524,6 +542,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address Desc",
@@ -551,6 +570,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address HTML",
@@ -578,6 +598,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -604,6 +625,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Phone",
@@ -633,6 +655,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No.",
@@ -662,6 +685,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fax",
@@ -691,6 +715,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website",
@@ -721,6 +746,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -751,6 +777,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -779,7 +806,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lead Type",
@@ -809,7 +837,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Market Segment",
@@ -840,6 +869,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Industry",
@@ -870,6 +900,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Request Type",
@@ -900,6 +931,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -928,6 +960,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -958,6 +991,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unsubscribed",
@@ -985,6 +1019,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Blog Subscriber",
@@ -1014,7 +1049,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 05:16:25.037080",
+ "modified": "2017-02-22 18:53:16.231035",
"modified_by": "Administrator",
"module": "CRM",
"name": "Lead",
@@ -1030,7 +1065,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1051,7 +1085,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1072,7 +1105,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1093,7 +1125,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1114,7 +1145,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1135,7 +1165,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1151,8 +1180,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "lead_name,lead_owner,status",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "lead_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 4b2899d..c306cbf 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -4,11 +4,12 @@
from __future__ import unicode_literals
import frappe
from frappe import _
-from frappe.utils import cstr, validate_email_add, cint, comma_and, has_gravatar, nowdate
+from frappe.utils import (cstr, validate_email_add, cint, comma_and, has_gravatar,
+ getdate, nowdate)
from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.selling_controller import SellingController
-from erpnext.utilities.address_and_contact import load_address_and_contact
+from frappe.geo.address_and_contact import load_address_and_contact
from erpnext.accounts.party import set_taxes
sender_field = "email_id"
@@ -45,7 +46,7 @@
self.image = has_gravatar(self.email_id)
- if self.contact_date and self.contact_date < nowdate():
+ if self.contact_date and getdate(self.contact_date) < nowdate():
frappe.throw(_("Next Contact Date cannot be in the past"))
def on_update(self):
@@ -87,7 +88,7 @@
"lead": self.name,
"docstatus": 1,
"status": ["!=", "Lost"]
-
+
})
def has_lost_quotation(self):
@@ -127,7 +128,7 @@
@frappe.whitelist()
def make_opportunity(source_name, target_doc=None):
- target_doc = get_mapped_doc("Lead", source_name,
+ target_doc = get_mapped_doc("Lead", source_name,
{"Lead": {
"doctype": "Opportunity",
"field_map": {
@@ -154,6 +155,9 @@
}
}}, target_doc)
target_doc.quotation_to = "Lead"
+ target_doc.run_method("set_missing_values")
+ target_doc.run_method("set_other_charges")
+ target_doc.run_method("calculate_taxes_and_totals")
return target_doc
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 32171b0..def67d8 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() {
@@ -101,8 +101,7 @@
$.each([["lead", "lead"],
["customer", "customer"],
- ["contact_person", "customer_filter"],
- ["territory", "not_a_group_filter"]], function(i, opts) {
+ ["contact_person", "customer_filter"]], function(i, opts) {
me.frm.set_query(opts[0], erpnext.queries[opts[1]]);
});
},
@@ -121,7 +120,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/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json
index fa0ec81..e38ca6d 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.json
+++ b/erpnext/crm/doctype/opportunity/opportunity.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opportunity From",
@@ -111,7 +114,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -142,7 +146,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Lead",
@@ -174,6 +179,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer / Lead Name",
@@ -201,6 +207,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -229,6 +236,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -258,6 +266,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Opportunity Type",
@@ -289,6 +298,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -320,6 +330,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lost Reason",
@@ -347,6 +358,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mins to first response",
@@ -375,6 +387,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "With Items",
@@ -404,6 +417,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -434,6 +448,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -466,6 +481,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Info",
@@ -494,7 +510,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer / Lead Address",
@@ -523,6 +540,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -553,7 +571,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Territory",
@@ -583,7 +602,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -614,6 +634,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -640,7 +661,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -670,6 +692,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -698,6 +721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -726,6 +750,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Mobile No",
@@ -754,6 +779,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -783,6 +809,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -814,6 +841,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Campaign",
@@ -844,6 +872,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -871,7 +900,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -903,6 +933,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opportunity Date",
@@ -934,6 +965,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Contact",
@@ -962,7 +994,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Next Contact By",
@@ -995,6 +1028,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Contact Date",
@@ -1024,6 +1058,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1052,6 +1087,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Discuss",
@@ -1081,6 +1117,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1113,7 +1150,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:55:17.785342",
+ "modified": "2017-02-17 16:37:39.028830",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",
@@ -1129,7 +1166,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1150,7 +1186,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1166,9 +1201,11 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 1
}
\ No newline at end of file
diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py
index 4bb6765..786a36c 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.py
+++ b/erpnext/crm/doctype/opportunity/opportunity.py
@@ -106,30 +106,6 @@
lead_name, company_name = frappe.db.get_value("Lead", self.lead, ["lead_name", "company_name"])
self.customer_name = company_name or lead_name
- def get_cust_address(self,name):
- details = frappe.db.sql("""select customer_name, address, territory, customer_group
- from `tabCustomer` where name = %s and docstatus != 2""", (name), as_dict = 1)
- if details:
- ret = {
- 'customer_name': details and details[0]['customer_name'] or '',
- 'address' : details and details[0]['address'] or '',
- 'territory' : details and details[0]['territory'] or '',
- 'customer_group' : details and details[0]['customer_group'] or ''
- }
- # ********** get primary contact details (this is done separately coz. , in case there is no primary contact thn it would not be able to fetch customer details in case of join query)
-
- contact_det = frappe.db.sql("""select contact_name, contact_no, email_id
- from `tabContact` where customer = %s and is_customer = 1
- and is_primary_contact = 'Yes' and docstatus != 2""", name, as_dict = 1)
-
- ret['contact_person'] = contact_det and contact_det[0]['contact_name'] or ''
- ret['contact_no'] = contact_det and contact_det[0]['contact_no'] or ''
- ret['email_id'] = contact_det and contact_det[0]['email_id'] or ''
-
- return ret
- else:
- frappe.throw(_("Customer {0} does not exist").format(name), frappe.DoesNotExistError)
-
def on_update(self):
self.add_calendar_event()
@@ -269,3 +245,15 @@
opp = frappe.get_doc("Opportunity", name)
opp.status = status
opp.save()
+
+def auto_close_opportunity():
+ """ auto close the `Replied` Opportunities after 7 days """
+ auto_close_after_days = frappe.db.get_value("Support Settings", "Support Settings", "close_opportunity_after_days") or 15
+
+ opportunities = frappe.db.sql(""" select name from tabOpportunity where status='Replied' and
+ modified<DATE_SUB(CURDATE(), INTERVAL %s DAY) """, (auto_close_after_days), as_dict=True)
+
+ for opportunity in opportunities:
+ doc = frappe.get_doc("Opportunity", opportunity.get("name"))
+ doc.status = "Closed"
+ doc.save(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/crm/doctype/opportunity_item/opportunity_item.json b/erpnext/crm/doctype/opportunity_item/opportunity_item.json
index 043d6f5..0845d42 100644
--- a/erpnext/crm/doctype/opportunity_item/opportunity_item.json
+++ b/erpnext/crm/doctype/opportunity_item/opportunity_item.json
@@ -8,18 +8,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -30,6 +34,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,
@@ -40,19 +45,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "col_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -63,13 +72,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty",
"length": 0,
"no_copy": 0,
@@ -79,6 +91,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,
@@ -89,6 +102,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "item_group",
"fieldtype": "Link",
@@ -96,7 +110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -107,6 +123,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -117,13 +134,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "brand",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
@@ -134,6 +154,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -144,13 +165,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -158,6 +182,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,
@@ -168,13 +193,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -185,6 +213,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,
@@ -195,13 +224,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -211,6 +243,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,
@@ -221,13 +254,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -238,6 +274,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -249,13 +286,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -263,6 +303,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,
@@ -273,13 +314,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -289,6 +333,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,
@@ -299,13 +344,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "image_view",
"fieldtype": "Image",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -315,6 +363,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -325,13 +374,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "basic_rate",
"fieldtype": "Currency",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Basic Rate",
"length": 0,
"no_copy": 0,
@@ -342,6 +394,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -359,7 +412,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:02.856524",
+ "modified": "2017-02-17 17:03:05.528055",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity Item",
@@ -368,5 +421,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/demo/setup/setup_data.py b/erpnext/demo/setup/setup_data.py
index 0c6a9b8..4c1d443 100644
--- a/erpnext/demo/setup/setup_data.py
+++ b/erpnext/demo/setup/setup_data.py
@@ -46,9 +46,8 @@
if not frappe.get_all('Company', limit=1):
setup_complete({
- "first_name": "Test",
- "last_name": "User",
- "email": "demo@erpnext.com",
+ "full_name": "Test User",
+ "email": "test_demo@erpnext.com",
"company_tagline": 'Awesome Products and Services',
"password": "demo",
"fy_start_date": "2015-01-01",
diff --git a/erpnext/demo/user/hr.py b/erpnext/demo/user/hr.py
index e18a123..2536602 100644
--- a/erpnext/demo/user/hr.py
+++ b/erpnext/demo/user/hr.py
@@ -6,6 +6,7 @@
from erpnext.projects.doctype.timesheet.test_timesheet import make_timesheet
from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_sales_invoice
from frappe.utils.make_random import get_random
+from erpnext.hr.doctype.expense_claim.test_expense_claim import get_payable_account
from erpnext.hr.doctype.expense_claim.expense_claim import get_expense_approver, make_bank_entry
from erpnext.hr.doctype.leave_application.leave_application import (get_leave_balance_on,
OverlapError, AttendanceAlreadyMarkedError)
@@ -50,6 +51,7 @@
expense_claim.extend('expenses', get_expenses())
expense_claim.employee = get_random("Employee")
expense_claim.company = frappe.flags.company
+ expense_claim.payable_account = get_payable_account(expense_claim.company)
expense_claim.posting_date = frappe.flags.current_date
expense_claim.exp_approver = filter((lambda x: x[0] != 'Administrator'), get_expense_approver(None, '', None, 0, 20, None))[0][0]
expense_claim.insert()
diff --git a/erpnext/docs/assets/img/accounts/offline-records.png b/erpnext/docs/assets/img/accounts/offline-records.png
index 78bb730..a73f696 100644
--- a/erpnext/docs/assets/img/accounts/offline-records.png
+++ b/erpnext/docs/assets/img/accounts/offline-records.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/pos-customer.png b/erpnext/docs/assets/img/accounts/pos-customer.png
index ffb058a..c3cbb8a 100644
--- a/erpnext/docs/assets/img/accounts/pos-customer.png
+++ b/erpnext/docs/assets/img/accounts/pos-customer.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/pos-item.png b/erpnext/docs/assets/img/accounts/pos-item.png
index 321e8dc..14bd371 100644
--- a/erpnext/docs/assets/img/accounts/pos-item.png
+++ b/erpnext/docs/assets/img/accounts/pos-item.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/employee-loan-application.png b/erpnext/docs/assets/img/human-resources/employee-loan-application.png
new file mode 100644
index 0000000..317de4f
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/employee-loan-application.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/employee-loan.png b/erpnext/docs/assets/img/human-resources/employee-loan.png
new file mode 100644
index 0000000..19f3181
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/employee-loan.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/employee_account.png b/erpnext/docs/assets/img/human-resources/employee_account.png
new file mode 100644
index 0000000..a9a6066
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/employee_account.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/expense_claim.png b/erpnext/docs/assets/img/human-resources/expense_claim.png
index ddca100..9647d3d 100644
--- a/erpnext/docs/assets/img/human-resources/expense_claim.png
+++ b/erpnext/docs/assets/img/human-resources/expense_claim.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/expense_claim_book.png b/erpnext/docs/assets/img/human-resources/expense_claim_book.png
new file mode 100644
index 0000000..4b81604
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/expense_claim_book.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/loan-repayment-salary-slip.png b/erpnext/docs/assets/img/human-resources/loan-repayment-salary-slip.png
new file mode 100644
index 0000000..4e5f340
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/loan-repayment-salary-slip.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/loan-type.png b/erpnext/docs/assets/img/human-resources/loan-type.png
new file mode 100644
index 0000000..9146b89
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/loan-type.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/payment.png b/erpnext/docs/assets/img/human-resources/payment.png
new file mode 100644
index 0000000..f6b6e5d
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/payment.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/payment_entry.png b/erpnext/docs/assets/img/human-resources/payment_entry.png
new file mode 100644
index 0000000..a499ccf
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/payment_entry.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/repayment-info.png b/erpnext/docs/assets/img/human-resources/repayment-info.png
new file mode 100644
index 0000000..5b8bdf7
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/repayment-info.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/repayment-schedule.png b/erpnext/docs/assets/img/human-resources/repayment-schedule.png
new file mode 100644
index 0000000..f2ddf02
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/repayment-schedule.png
Binary files differ
diff --git a/erpnext/docs/assets/img/human-resources/unclaimed_expense_claims.png b/erpnext/docs/assets/img/human-resources/unclaimed_expense_claims.png
new file mode 100644
index 0000000..1581bb7
--- /dev/null
+++ b/erpnext/docs/assets/img/human-resources/unclaimed_expense_claims.png
Binary files differ
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/docs/assets/img/setup/feedback/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/docs/assets/img/setup/feedback/__init__.py
diff --git a/erpnext/docs/assets/img/setup/feedback/feedback-trigger-condition.png b/erpnext/docs/assets/img/setup/feedback/feedback-trigger-condition.png
new file mode 100644
index 0000000..5fdae3c
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/feedback-trigger-condition.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/feedback-trigger-subject.png b/erpnext/docs/assets/img/setup/feedback/feedback-trigger-subject.png
new file mode 100644
index 0000000..22c3f4c
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/feedback-trigger-subject.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/manual-feedback-request-option.png b/erpnext/docs/assets/img/setup/feedback/manual-feedback-request-option.png
new file mode 100644
index 0000000..e9f6487
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/manual-feedback-request-option.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/manual-feedback-request.png b/erpnext/docs/assets/img/setup/feedback/manual-feedback-request.png
new file mode 100644
index 0000000..cf9ecc0
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/manual-feedback-request.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/resend-feedback-request-button.png b/erpnext/docs/assets/img/setup/feedback/resend-feedback-request-button.png
new file mode 100644
index 0000000..9a4b19d
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/resend-feedback-request-button.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/resend-feedback-request-custom-message.png b/erpnext/docs/assets/img/setup/feedback/resend-feedback-request-custom-message.png
new file mode 100644
index 0000000..a68f520
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/resend-feedback-request-custom-message.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/setting-up-feedback-trigger-message.png b/erpnext/docs/assets/img/setup/feedback/setting-up-feedback-trigger-message.png
new file mode 100644
index 0000000..6bc802e
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/setting-up-feedback-trigger-message.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/setting-up-feedback-trigger.png b/erpnext/docs/assets/img/setup/feedback/setting-up-feedback-trigger.png
new file mode 100644
index 0000000..dec0336
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/setting-up-feedback-trigger.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/sidebar-ratings.png b/erpnext/docs/assets/img/setup/feedback/sidebar-ratings.png
new file mode 100644
index 0000000..72f4377
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/sidebar-ratings.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/submit-feedback.png b/erpnext/docs/assets/img/setup/feedback/submit-feedback.png
new file mode 100644
index 0000000..a1ccf0d
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/submit-feedback.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/feedback/timeline-rating-and-feedback.png b/erpnext/docs/assets/img/setup/feedback/timeline-rating-and-feedback.png
new file mode 100644
index 0000000..0f691d3
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/feedback/timeline-rating-and-feedback.png
Binary files differ
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/install.md b/erpnext/docs/install.md
index 26ad128..c6a87cb 100644
--- a/erpnext/docs/install.md
+++ b/erpnext/docs/install.md
@@ -8,7 +8,7 @@
After you have installed Frappe Bench, go to you bench folder, which is `frappe.bench` by default and setup **erpnext**.
- bench get-app erpnext {{ source_link }}
+ bench get-app erpnext https://github.com/frappe/erpnext
Then create a new site to install the app.
@@ -27,4 +27,4 @@
Fire up your browser and go to http://localhost:8000 and you should see the login screen. Login as **Administrator** and **admin** (or the password you set at the time of `new-site`) and you are set.
<!-- jinja -->
-<!-- autodoc -->
\ No newline at end of file
+<!-- autodoc -->
diff --git a/erpnext/docs/user/manual/en/CRM/customer.md b/erpnext/docs/user/manual/en/CRM/customer.md
index 55755e6..1e4e0b5 100644
--- a/erpnext/docs/user/manual/en/CRM/customer.md
+++ b/erpnext/docs/user/manual/en/CRM/customer.md
@@ -13,7 +13,7 @@
or upload it via the Data Import Tool.
-A Customer can avail the features (operations) in the selling process. The general flow can be summarazed as:
+A Customer can avail the features (operations) in the selling process. The general flow can be summarised as:
<img class="screenshot" alt="Customer" src="{{docs_base_url}}/assets/img/crm/customer-to selling-flowchart.jpeg">
diff --git a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
index 8eefe7f..efbe95f 100644
--- a/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
+++ b/erpnext/docs/user/manual/en/accounts/managing-fixed-assets.md
@@ -89,3 +89,5 @@
There is also a dedicated button "Transfer Asset" inside the Asset form to track the Asset Movement.
<img class="screenshot" alt="Asset" src="{{docs_base_url}}/assets/img/accounts/asset-movement-using-button.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md b/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md
index 92932b5..4e44490 100644
--- a/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md
+++ b/erpnext/docs/user/manual/en/accounts/multi-currency-accounting.md
@@ -116,3 +116,5 @@
In Accounts Receivable / Payable report, system shows all the amounts in Party / Account Currency.
<img class="screenshot" alt="Accounts Receivable Report" src="{{docs_base_url}}/assets/img/accounts/multi-currency/accounts-receivable.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/accounts/payment-request.md b/erpnext/docs/user/manual/en/accounts/payment-request.md
index 67c812d..30f5b1b 100644
--- a/erpnext/docs/user/manual/en/accounts/payment-request.md
+++ b/erpnext/docs/user/manual/en/accounts/payment-request.md
@@ -25,4 +25,4 @@
##### Request Mail
<img class="screenshot" alt="Payment Request" src="{{docs_base_url}}/assets/img/accounts/pr-email.png">
-
+{next}
diff --git a/erpnext/docs/user/manual/en/accounts/payments.md b/erpnext/docs/user/manual/en/accounts/payments.md
index 881d366..74da054 100644
--- a/erpnext/docs/user/manual/en/accounts/payments.md
+++ b/erpnext/docs/user/manual/en/accounts/payments.md
@@ -46,3 +46,5 @@
<img class="screenshot" alt="Making Payment" src="{{docs_base_url}}/assets/img/accounts/journal-entry.png">
For more details about journal entry [check here.]({{docs_base_url}}/user/manual/en/accounts/journal-entry)
+
+{next}
diff --git a/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md b/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md
index 770e71a..713fb60 100644
--- a/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md
+++ b/erpnext/docs/user/manual/en/accounts/recurring-orders-and-invoices.md
@@ -30,4 +30,6 @@
Failure in creation of recurring invoice could be due to multiple reasons like wrong Email Address mentioned in the Email Notification field in Recurring section etc.
-On receipt of notification, if cause of failure is fixed (like correcting Email Address) within 24 hours, then recurring invoice will be generated automatically. If issue is not fixed within the said time, then document should be created for that month/year manually.
\ No newline at end of file
+On receipt of notification, if cause of failure is fixed (like correcting Email Address) within 24 hours, then recurring invoice will be generated automatically. If issue is not fixed within the said time, then document should be created for that month/year manually.
+
+{next}
diff --git a/erpnext/docs/user/manual/en/human-resources/employee-loan-management.md b/erpnext/docs/user/manual/en/human-resources/employee-loan-management.md
new file mode 100644
index 0000000..b76a226
--- /dev/null
+++ b/erpnext/docs/user/manual/en/human-resources/employee-loan-management.md
@@ -0,0 +1,56 @@
+# Employee Loan Management
+This module enables companies which provides employee loans to define and manage employee loans.
+Employees can request loans, which are then reviewed and approved. For the approved loans,
+repayment schedule for the entire loan cycle can be generated and automatic deduction from salary can also be set up.
+
+### Loan Type
+To create a new Loan Type go to:
+
+> Human Resources > Employee Loan Management > Loan Type > New Loan Type
+
+Configure Loan limit and Rate of interest.
+
+<img class="screenshot" alt="Loan Type" src="{{docs_base_url}}/assets/img/human-resources/loan-type.png">
+
+### Employee Loan Application
+
+Employee can apply for loan by going to:
+
+> Human Resources > Employee Loan Management > Employee Loan Application > New Employee Loan Application
+
+<img class="screenshot" alt="Employee Loan Application" src="{{docs_base_url}}/assets/img/human-resources/employee-loan-application.png">
+
+#### In the Employee Loan Application,
+
+ * Enter Employee details and Loan details
+ * Select the repayment method, and based on your selection enter Repayment Period in Months or repayment Amount
+
+On save, Employee can see Repayment Information and make changes if required before submitting.
+
+<img class="screenshot" alt="Employee Loan Application" src="{{docs_base_url}}/assets/img/human-resources/repayment-info.png">
+
+### Employee Loan
+
+Once the Loan is approved, Manager can create Employee Loan record for the Employee.
+
+> Human Resources > Employee Loan Management > Employee Loan > New Employee Loan
+
+<img class="screenshot" alt="Employee Loan Application" src="{{docs_base_url}}/assets/img/human-resources/employee-loan.png">
+
+#### In the Employee Loan,
+
+ * Enter Employee and Loan Application
+ * Check "Repay from Salary" if the loan repayment will be deducted from the salary
+ * Enter Disbursement Date and Account Info
+ * As soon as you hit save, the repayment schedule is generated.
+
+<img class="screenshot" alt="repayment Schedule" src="{{docs_base_url}}/assets/img/human-resources/repayment-schedule.png">
+
+#### Loan repayment deduction from Salary
+
+To auto deduct the Loan repayment from Salary, check "Repay from Salary" in Employee Loan. It will appear as Loan repayment in Salary Slip.
+
+<img class="screenshot" alt="Salary Slip" src="{{docs_base_url}}/assets/img/human-resources/loan-repayment-salary-slip.png">
+
+
+
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/human-resources/expense-claim.md b/erpnext/docs/user/manual/en/human-resources/expense-claim.md
index da3b2ee..1d4996d 100644
--- a/erpnext/docs/user/manual/en/human-resources/expense-claim.md
+++ b/erpnext/docs/user/manual/en/human-resources/expense-claim.md
@@ -9,6 +9,10 @@
Set the Employee ID, date and the list of expenses that are to be claimed and
“Submit” the record.
+### Set Account for Employee
+Set employee's expense account on the employee form, system books an expense amount of an employee under this account.
+<img class="screenshot" alt="Expense Claim" src="{{docs_base_url}}/assets/img/human-resources/employee_account.png">
+
### Approving Expenses
Approver for the Expense Claim is selected by an Employee himself. Users to whom `Expense Approver` role is assigned will shown in the Expense Claim Approver field.
@@ -18,11 +22,25 @@
Expense Claim Approver can update the “Sanctioned Amounts” against Claimed Amount of an Employee. If submitting, Approval Status should be submitted to Approved or Rejected. If Approved, then Expense Claim gets submitted. If rejected, then Expen
Comments can be added in the Comments section explaining why the claim was approved or rejected.
-### Booking the Expense and Reimbursement
+### Booking the Expense
-The approved Expense Claim must then be converted into a Journal Entry and a
-payment must be made. Note: This amount should not be clubbed with Salary
-because the amount will then be taxable to the Employee.
+On submission of Expense Claim, system books an expense against the expense account and the employee account
+<img class="screenshot" alt="Expense Claim" src="{{docs_base_url}}/assets/img/human-resources/expense_claim_book.png">
+
+User can view unpaid expense claim using report "Unclaimed Expense Claims"
+<img class="screenshot" alt="Expense Claim" src="{{docs_base_url}}/assets/img/human-resources/unclaimed_expense_claims.png">
+
+### Payment for Expense Claim
+
+To make payment against the expense claim, user has to click on Make > Bank Entry
+#### Expense Claim
+<img class="screenshot" alt="Expense Claim" src="{{docs_base_url}}/assets/img/human-resources/payment.png">
+
+#### Payment Entry
+<img class="screenshot" alt="Expense Claim" src="{{docs_base_url}}/assets/img/human-resources/payment_entry.png">
+
+
+Note: This amount should not be clubbed with Salary because the amount will then be taxable to the Employee.
### Linking with Task & Project
diff --git a/erpnext/docs/user/manual/en/human-resources/index.txt b/erpnext/docs/user/manual/en/human-resources/index.txt
index f91edfa..673efdb 100644
--- a/erpnext/docs/user/manual/en/human-resources/index.txt
+++ b/erpnext/docs/user/manual/en/human-resources/index.txt
@@ -15,4 +15,5 @@
human-resource-setup
daily-work-summary
fleet-management
+employee-loan-management
articles
diff --git a/erpnext/docs/user/manual/en/setting-up/company-setup.md b/erpnext/docs/user/manual/en/setting-up/company-setup.md
index e73aa25..1a07b86 100644
--- a/erpnext/docs/user/manual/en/setting-up/company-setup.md
+++ b/erpnext/docs/user/manual/en/setting-up/company-setup.md
@@ -3,8 +3,8 @@
depending on the nature of your business activity. If you have more than one
companies, create the setup under the Company Setup page.
-After clicking on Setup, go to Masters and click on Company.
+After clicking on Accounts and click on Company.
-> Setup > Masters > Company > New Company
+> Accounts > Company > New Company
{next}
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/docs/user/manual/en/setting-up/feedback/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/docs/user/manual/en/setting-up/feedback/__init__.py
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/index.md b/erpnext/docs/user/manual/en/setting-up/feedback/index.md
new file mode 100644
index 0000000..bb2efaf
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/index.md
@@ -0,0 +1,7 @@
+# Feedback
+
+Customer/User Feedback for a Product or Services can be useful for business as it can be used to make decisions for improvements either in products or services.
+
+### Topics
+
+{index}
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/index.txt b/erpnext/docs/user/manual/en/setting-up/feedback/index.txt
new file mode 100644
index 0000000..08160cc
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/index.txt
@@ -0,0 +1,4 @@
+setting-up-feedback
+submit-feedback
+resend-feedback-request
+manual-feedback-request
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md b/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md
new file mode 100644
index 0000000..4afaee1
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/manual-feedback-request.md
@@ -0,0 +1,17 @@
+# Manual Feedback Request
+
+We can also send the feedback request to Customer/User without configuring the
+Feedback Trigger.
+
+To request a feedback manually go to respective document e.g. Sales Order, Issue etc.
+and click on Ask a Feedback option in Menu.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/manual-feedback-request-option.png">
+
+Then, user can enter the feedback request details like email id, message and send the
+feedback request mail.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/manual-feedback-request.png">
+
+Note. If Feedback Trigger is already configured for the document then system will fetch
+Feedback Request details (email id, message)
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/resend-feedback-request.md b/erpnext/docs/user/manual/en/setting-up/feedback/resend-feedback-request.md
new file mode 100644
index 0000000..0dbb3b7
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/resend-feedback-request.md
@@ -0,0 +1,16 @@
+# Resend Feedback Request
+
+We can also Resend the Feedback Request to the Customer/User.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/timeline-rating-and-feedback.png">
+
+To resend the Feedback Request we will need to navigate the Communication by clicking the `Details` link on Timeline Feedback.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/resend-feedback-request-button.png">
+
+On Resend Button click a dialog with the Feedback Request message will appear user can either send the
+Feedback Request with same message or he/she can make the changes in the Feedback Request message.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/resend-feedback-request-custom-message.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/setting-up-feedback.md b/erpnext/docs/user/manual/en/setting-up/feedback/setting-up-feedback.md
new file mode 100644
index 0000000..373d703
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/setting-up-feedback.md
@@ -0,0 +1,53 @@
+# Feedback Trigger
+
+You can set up the Feedback Trigger for various documents to get the Feedback from the user.
+
+For this, you will need to setup the Feedback Trigger,
+
+> Setup > Email > Feedback Trigger
+
+### Setting Up Feedback Trigger
+
+To Setup an Feedback:
+
+1. Select which Document Type you want to send feedback request mail.
+2. Select the Email Field, This field will be used to get the recipients email id.
+3. Set the Subject for feedback request mail.
+4. Set the conditions, if all the conditions are met only then the feedback request mail will be sent.
+5. Compose the message.
+
+### Setting a Subject
+You can retrieve the data for a particular field by using `doc.[field_name]`. To use it in your subject/message, you have to surround it with `{% raw %}{{ }}{% endraw %}`. These are called [Jinja](http://jinja.pocoo.org/) tags. So, for example, to get the name of a document, you use `{% raw %}{{ doc.name }}{% endraw %}`. The below example sends an feedback request whenever Issue is Closed with the Subject, "ISS-##### Issue is Resolved"
+
+<img class="screenshot" alt="Setting Subject" src="{{docs_base_url}}/assets/img/setup/feedback/feedback-trigger-subject.png">
+
+### Setting Conditions
+
+Feedback Trigger allows you to set conditions according to the field data in your documents. The feedback request email will be sent on document save only if the all conditions are true For example if you want to trigger the feedback request mail to a customer if an Issue is has been saved as "Closed" as it's status, you put `doc.status == "Closed"` in the conditions textbox. You can also set more complex conditions by combining them.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/feedback-trigger-condition.png">
+
+### Setting a Message
+
+You can use both Jinja Tags (`{% raw %}{{ doc.[field_name] }}{% endraw %}`) and HTML tags in the message textbox.
+
+ {% raw %}<h3>Your Support Ticket is Resolved</h3>
+
+ <p>Issue {{ doc.name }} Is resolved. Please check and confirm the same.</p>
+ <p> Your Feedback is important for us. Please give us your Feedback for {{ doc.name }}</p>
+ <p> Please visit the following url for feedback.</p>
+
+ {{ feedback_url }}
+ {% endraw %}
+
+---
+
+### Example
+
+1. Setting up Feedback Trigger
+ <img class="screenshot" alt="Defining Criteria" src="{{docs_base_url}}/assets/img/setup/feedback/setting-up-feedback-trigger.png">
+
+1. Setting the Recipients and Message
+ <img class="screenshot" alt="Set Message" src="{{docs_base_url}}/assets/img/setup/feedback/setting-up-feedback-trigger-message.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/setting-up/feedback/submit-feedback.md b/erpnext/docs/user/manual/en/setting-up/feedback/submit-feedback.md
new file mode 100644
index 0000000..9069f37
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/feedback/submit-feedback.md
@@ -0,0 +1,19 @@
+# Submit Feedback
+
+Once feedback request mail is sent the user/customer. He/She can visit the URL to submit the feedback
+as well as rating for the document.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/submit-feedback.png">
+
+Once Feedback is submitted the feedback details message and ratings will be recorded and will be shown on Document sidebar and timeline. Also once the Feedback is successfully submitted by the user the link shared to the user will be expired and can not be used to submit the Feedback again.
+
+On Document sidebar the latest feedback ratings will displayed.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/sidebar-ratings.png">
+
+Also, The Feedback details such as Feedback message and ratings will be shown in the Document's Timeline along
+with Comment, Email.
+
+<img class="screenshot" alt="Setting Condition" src="{{docs_base_url}}/assets/img/setup/feedback/timeline-rating-and-feedback.png">
+
+{next}
\ No newline at end of file
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/hooks.py b/erpnext/hooks.py
index 8443cdf..a38ebd2 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -44,7 +44,7 @@
fixtures = ["Web Form"]
-website_generators = ["Item Group", "Item", "Sales Partner", "Job Opening", "Student Admission"]
+website_generators = ["Item Group", "Item", "BOM", "Sales Partner", "Job Opening", "Student Admission"]
website_context = {
"favicon": "/assets/erpnext/images/favicon.png",
@@ -96,6 +96,7 @@
},
{"from_route": "/jobs", "to_route": "Job Opening"},
{"from_route": "/admissions", "to_route": "Student Admission"},
+ {"from_route": "/boms", "to_route": "BOM"}
]
portal_menu_items = [
@@ -107,7 +108,6 @@
{"title": _("Shipments"), "route": "/shipments", "reference_doctype": "Delivery Note", "role":"Customer"},
{"title": _("Issues"), "route": "/issues", "reference_doctype": "Issue", "role":"Customer"},
{"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"},
- {"title": _("Announcements"), "route": "/announcement", "reference_doctype": "Announcement"},
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"}
]
@@ -122,18 +122,7 @@
"Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
"Supplier Quotation": "erpnext.controllers.website_list_for_contact.has_website_permission",
"Delivery Note": "erpnext.controllers.website_list_for_contact.has_website_permission",
- "Issue": "erpnext.support.doctype.issue.issue.has_website_permission",
- "Discussion": "erpnext.schools.web_form.discussion.discussion.has_website_permission"
-}
-
-permission_query_conditions = {
- "Contact": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_contact",
- "Address": "erpnext.utilities.address_and_contact.get_permission_query_conditions_for_address"
-}
-
-has_permission = {
- "Contact": "erpnext.utilities.address_and_contact.has_permission",
- "Address": "erpnext.utilities.address_and_contact.has_permission"
+ "Issue": "erpnext.support.doctype.issue.issue.has_website_permission"
}
dump_report_map = "erpnext.startup.report_data_map.data_map"
@@ -153,19 +142,12 @@
"after_insert": "frappe.email.doctype.contact.contact.update_contact",
"validate": "erpnext.hr.doctype.employee.employee.validate_employee_role",
"on_update": "erpnext.hr.doctype.employee.employee.update_user_permissions",
- "on_update": "erpnext.utilities.address_and_contact.set_default_role"
+ "on_update": "frappe.geo.address_and_contact.set_default_role"
},
("Sales Taxes and Charges Template", 'Price List'): {
"on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
},
- # bubble transaction notification on master
- ('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice',
- 'Supplier Quotation', 'Purchase Order', 'Purchase Receipt',
- 'Purchase Invoice', 'Project', 'Issue'): {
- 'on_change': 'erpnext.accounts.party_status.notify_status'
- },
-
"Website Settings": {
"validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
},
@@ -183,6 +165,7 @@
"erpnext.stock.reorder_item.reorder_item",
"erpnext.setup.doctype.email_digest.email_digest.send",
"erpnext.support.doctype.issue.issue.auto_close_tickets",
+ "erpnext.crm.doctype.opportunity.opportunity.auto_close_opportunity",
"erpnext.controllers.accounts_controller.update_invoice_status",
"erpnext.accounts.doctype.fiscal_year.fiscal_year.auto_create_fiscal_year",
"erpnext.hr.doctype.employee.employee.send_birthday_reminders",
diff --git a/erpnext/hr/doctype/appraisal/appraisal.json b/erpnext/hr/doctype/appraisal/appraisal.json
index 0906557..5a557da 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.json
+++ b/erpnext/hr/doctype/appraisal/appraisal.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Appraisal Template",
@@ -111,7 +114,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "For Employee",
@@ -142,7 +146,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "For Employee Name",
@@ -173,6 +178,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -202,7 +208,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -233,7 +240,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Start Date",
@@ -263,7 +271,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -294,6 +303,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Goals",
@@ -323,6 +333,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Goals",
@@ -337,7 +348,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -353,6 +364,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Calculate Total Score",
@@ -382,6 +394,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Score (Out of 5)",
@@ -412,6 +425,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -439,6 +453,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -467,6 +482,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -493,7 +509,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -524,6 +541,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -551,6 +569,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -583,7 +602,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:47:32.082712",
+ "modified": "2017-02-17 16:55:49.559295",
"modified_by": "Administrator",
"module": "HR",
"name": "Appraisal",
@@ -599,7 +618,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -620,7 +638,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -641,7 +658,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -657,9 +673,11 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status, employee, employee_name",
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "employee",
"title_field": "employee_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/appraisal/appraisal.py b/erpnext/hr/doctype/appraisal/appraisal.py
index df6d770..e69dfa8 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.py
+++ b/erpnext/hr/doctype/appraisal/appraisal.py
@@ -16,6 +16,9 @@
if not self.status:
self.status = "Draft"
+ if not self.goals:
+ frappe.throw(_("Goals cannot be empty"))
+
set_employee_name(self)
self.validate_dates()
self.validate_existing_appraisal()
diff --git a/erpnext/hr/doctype/attendance/attendance.json b/erpnext/hr/doctype/attendance/attendance.json
index 9bbb3e5..d142f80 100644
--- a/erpnext/hr/doctype/attendance/attendance.json
+++ b/erpnext/hr/doctype/attendance/attendance.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -80,7 +82,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Employee",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -140,7 +144,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -172,6 +177,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Leave Type",
@@ -202,6 +208,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -229,7 +236,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Attendance Date",
@@ -258,7 +266,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -289,6 +298,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -318,7 +328,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-12 16:09:27.301839",
+ "modified": "2017-02-17 16:55:33.866723",
"modified_by": "Administrator",
"module": "HR",
"name": "Attendance",
@@ -334,7 +344,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -355,7 +364,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -376,7 +384,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -392,6 +399,7 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "employee, employee_name, attendance_date, status",
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
diff --git a/erpnext/hr/doctype/department/department.json b/erpnext/hr/doctype/department/department.json
index e19f175..2f4f20d 100644
--- a/erpnext/hr/doctype/department/department.json
+++ b/erpnext/hr/doctype/department/department.json
@@ -15,13 +15,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "department_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Department",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,7 @@
"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,
@@ -41,6 +45,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Days for which Holidays are blocked for this department.",
"fieldname": "leave_block_list",
"fieldtype": "Link",
@@ -48,7 +53,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Leave Block List",
"length": 0,
"no_copy": 0,
@@ -57,6 +64,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 +83,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-08-01 12:44:43.338689",
+ "modified": "2017-02-17 16:55:19.875594",
"modified_by": "Administrator",
"module": "HR",
"name": "Department",
@@ -125,6 +133,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/designation/designation.json b/erpnext/hr/doctype/designation/designation.json
index 1e70196..9315cfd 100644
--- a/erpnext/hr/doctype/designation/designation.json
+++ b/erpnext/hr/doctype/designation/designation.json
@@ -9,18 +9,22 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "designation_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Designation",
"length": 0,
"no_copy": 0,
@@ -30,6 +34,7 @@
"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,
@@ -40,13 +45,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -55,6 +63,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,
@@ -66,13 +75,14 @@
"hide_toolbar": 0,
"icon": "fa fa-bookmark",
"idx": 1,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-06-01 12:52:03.787578",
+ "modified": "2017-02-17 16:53:43.895882",
"modified_by": "Administrator",
"module": "HR",
"name": "Designation",
@@ -102,6 +112,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee/employee.json b/erpnext/hr/doctype/employee/employee.json
index 4efba60..80e484d 100644
--- a/erpnext/hr/doctype/employee/employee.json
+++ b/erpnext/hr/doctype/employee/employee.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee",
@@ -77,6 +79,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salutation",
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Full Name",
@@ -165,7 +170,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -195,6 +201,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "User ID",
@@ -224,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Create User",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -306,7 +316,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Number",
@@ -336,6 +347,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date of Joining",
@@ -365,7 +377,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date of Birth",
@@ -394,7 +407,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gender",
@@ -425,6 +439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employment Details",
@@ -452,7 +467,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -482,7 +498,8 @@
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employment Type",
@@ -514,6 +531,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Holiday List",
@@ -544,6 +562,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -569,7 +588,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Offer Date",
@@ -599,6 +619,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Confirmation Date",
@@ -627,7 +648,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contract End Date",
@@ -657,6 +679,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date Of Retirement",
@@ -686,6 +709,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Job Profile",
@@ -712,7 +736,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Branch",
@@ -742,7 +767,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Department",
@@ -772,7 +798,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Designation",
@@ -803,7 +830,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company Email",
@@ -834,6 +862,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notice (days)",
@@ -863,6 +892,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Information",
@@ -892,6 +922,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Mode",
@@ -922,7 +953,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Name",
@@ -953,6 +985,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank A/C No.",
@@ -982,6 +1015,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Organization Profile",
@@ -1009,6 +1043,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reports to",
@@ -1040,6 +1075,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Approvers",
@@ -1068,6 +1104,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Details",
@@ -1096,6 +1133,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Prefered Contact Email",
@@ -1125,6 +1163,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Prefered Email",
@@ -1154,6 +1193,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cell Number",
@@ -1181,6 +1221,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Personal Email",
@@ -1209,6 +1250,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unsubscribed",
@@ -1236,6 +1278,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Emergency Contact",
@@ -1263,6 +1306,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Relation",
@@ -1290,6 +1334,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Emergency Phone",
@@ -1317,6 +1362,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1344,6 +1390,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Permanent Address Is",
@@ -1372,6 +1419,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Permanent Address",
@@ -1399,6 +1447,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Current Address Is",
@@ -1427,6 +1476,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Current Address",
@@ -1454,6 +1504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1482,6 +1533,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bio",
@@ -1509,6 +1561,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Personal Details",
@@ -1536,6 +1589,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Passport Number",
@@ -1563,6 +1617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date of Issue",
@@ -1590,6 +1645,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valid Upto",
@@ -1617,6 +1673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Place of Issue",
@@ -1644,6 +1701,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1671,6 +1729,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Marital Status",
@@ -1699,6 +1758,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Blood Group",
@@ -1728,6 +1788,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Family Background",
@@ -1756,6 +1817,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Health Details",
@@ -1783,6 +1845,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Educational Qualification",
@@ -1810,6 +1873,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Education",
@@ -1838,6 +1902,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Previous Work Experience",
@@ -1866,6 +1931,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "External Work History",
@@ -1894,6 +1960,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "History In Company",
@@ -1922,6 +1989,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Internal Work History",
@@ -1950,6 +2018,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exit",
@@ -1978,6 +2047,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resignation Letter Date",
@@ -2006,7 +2076,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Relieving Date",
@@ -2036,6 +2107,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reason for Leaving",
@@ -2065,6 +2137,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Encashed?",
@@ -2095,6 +2168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Encashment Date",
@@ -2124,6 +2198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exit Interview Details",
@@ -2154,6 +2229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Held On",
@@ -2183,6 +2259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reason for Resignation",
@@ -2213,6 +2290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "New Workplace",
@@ -2242,6 +2320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Feedback",
@@ -2273,7 +2352,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-19 17:24:22.941738",
+ "modified": "2017-02-17 16:56:25.571268",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee",
@@ -2289,7 +2368,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2310,7 +2388,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2332,7 +2409,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2348,8 +2424,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "employee_name",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/discussion/__init__.py b/erpnext/hr/doctype/employee_loan/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/discussion/__init__.py
rename to erpnext/hr/doctype/employee_loan/__init__.py
diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.js b/erpnext/hr/doctype/employee_loan/employee_loan.js
new file mode 100644
index 0000000..cb9216f
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan/employee_loan.js
@@ -0,0 +1,98 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Employee Loan', {
+ onload: function(frm) {
+ frm.set_query("employee_loan_application", function() {
+ return {
+ "filters": {
+ "employee": frm.doc.employee,
+ "docstatus": 1,
+ "status": "Approved"
+ }
+ };
+ });
+
+ frm.set_query("interest_income_account", function() {
+ return {
+ "filters": {
+ "company": frm.doc.company,
+ "root_type": "Income",
+ "is_group": 0
+ }
+ };
+ });
+
+ $.each(["payment_account", "employee_loan_account"], function(i, field) {
+ frm.set_query(field, function() {
+ return {
+ "filters": {
+ "company": frm.doc.company,
+ "root_type": "Asset",
+ "is_group": 0
+ }
+ };
+ });
+ })
+ },
+
+ mode_of_payment: function(frm){
+ frappe.call({
+ method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
+ args: {
+ "mode_of_payment": frm.doc.mode_of_payment,
+ "company": frm.doc.company
+ },
+ callback: function(r, rt) {
+ if(r.message) {
+ frm.set_value("payment_account", r.message.account);
+ }
+ }
+ });
+ },
+
+ refresh: function(frm) {
+ frm.trigger("toggle_fields");
+
+ if(frm.doc.docstatus==1) {
+ frm.add_custom_button(__('Ledger'), function() {
+ frappe.route_options = {
+ "voucher_no": frm.doc.name,
+ "from_date": frm.doc.posting_date,
+ "to_date": frm.doc.posting_date,
+ "company": frm.doc.company,
+ group_by_voucher: 0
+ };
+ frappe.set_route("query-report", "General Ledger");
+ }, "fa fa-table");
+ }
+ },
+
+ employee_loan_application: function(frm) {
+ return frm.call({
+ method: "erpnext.hr.doctype.employee_loan.employee_loan.get_employee_loan_application",
+ args: {
+ "employee_loan_application": frm.doc.employee_loan_application
+ },
+ callback: function(r){
+ if(!r.exc && r.message) {
+ frm.set_value("loan_type", r.message.loan_type);
+ frm.set_value("loan_amount", r.message.loan_amount);
+ frm.set_value("repayment_method", r.message.repayment_method);
+ frm.set_value("monthly_repayment_amount", r.message.repayment_amount);
+ frm.set_value("repayment_periods", r.message.repayment_periods);
+ frm.set_value("rate_of_interest", r.message.rate_of_interest);
+ }
+ }
+ })
+ },
+
+ repayment_method: function(frm) {
+ frm.trigger("toggle_fields")
+ },
+
+ toggle_fields: function(frm) {
+ frm.toggle_enable("monthly_repayment_amount", frm.doc.repayment_method=="Repay Fixed Amount per Period")
+ frm.toggle_enable("repayment_periods", frm.doc.repayment_method=="Repay Over Number of Periods")
+ }
+});
diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.json b/erpnext/hr/doctype/employee_loan/employee_loan.json
new file mode 100644
index 0000000..c052dc0
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan/employee_loan.json
@@ -0,0 +1,951 @@
+{
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 0,
+ "autoname": "ELN.####",
+ "beta": 0,
+ "creation": "2016-12-02 10:11:49.673604",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Document",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "employee",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employee",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Employee",
+ "permlevel": 0,
+ "precision": "",
+ "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": "employee_name",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employee Name",
+ "length": 0,
+ "no_copy": 0,
+ "options": "employee.employee_name",
+ "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": "employee_loan_application",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employee Loan Application",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Employee Loan Application",
+ "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": "loan_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Loan Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Loan Type",
+ "permlevel": 0,
+ "precision": "",
+ "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": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
+ "default": "",
+ "fieldname": "posting_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Posting Date",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "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": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 1,
+ "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": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Loan Unpaid\nLoan Paid\nEMI in progress\nLoan Repaid",
+ "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": "repay_from_salary",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repay from Salary",
+ "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": "section_break_8",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan 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": "loan_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan Amount",
+ "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": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "",
+ "fieldname": "rate_of_interest",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Rate of Interest (%) / Year",
+ "length": 0,
+ "no_copy": 0,
+ "options": "loan_type.rate_of_interest",
+ "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,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "disbursement_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Disbursement Date",
+ "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": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_11",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
+ "default": "Repay Over Number of Periods",
+ "fieldname": "repayment_method",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Method",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nRepay Fixed Amount per Period\nRepay Over Number of Periods",
+ "permlevel": 0,
+ "precision": "",
+ "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,
+ "default": "",
+ "depends_on": "",
+ "fieldname": "repayment_periods",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Period in Months",
+ "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,
+ "default": "",
+ "depends_on": "",
+ "fieldname": "monthly_repayment_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Monthly Repayment Amount",
+ "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": "account_info",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Account Info",
+ "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": "mode_of_payment",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Mode of Payment",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Mode of Payment",
+ "permlevel": 0,
+ "precision": "",
+ "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": "payment_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Payment Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "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": "column_break_9",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "employee_loan_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employee Loan Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "permlevel": 0,
+ "precision": "",
+ "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": "interest_income_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Interest Income Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "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_15",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Schedule",
+ "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": "repayment_schedule",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Schedule",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Repayment Schedule",
+ "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_17",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Totals",
+ "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,
+ "default": "0",
+ "fieldname": "total_payment",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Payment",
+ "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": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_19",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
+ "default": "0",
+ "fieldname": "total_interest_payable",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Interest Payable",
+ "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": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Employee Loan",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2017-02-22 04:27:13.174800",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Employee Loan",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "posting_date",
+ "show_name_in_global_search": 0,
+ "sort_field": "creation",
+ "sort_order": "DESC",
+ "track_changes": 1,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.py b/erpnext/hr/doctype/employee_loan/employee_loan.py
new file mode 100644
index 0000000..568596e
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan/employee_loan.py
@@ -0,0 +1,127 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe, math
+import erpnext
+from frappe import _
+from frappe.utils import flt, rounded, add_months, nowdate
+from erpnext.controllers.accounts_controller import AccountsController
+from erpnext.accounts.general_ledger import make_gl_entries
+
+class EmployeeLoan(AccountsController):
+ def validate(self):
+ check_repayment_method(self.repayment_method, self.loan_amount, self.monthly_repayment_amount, self.repayment_periods)
+ if not self.company:
+ self.company = erpnext.get_default_company()
+ if not self.posting_date:
+ self.posting_date = nowdate()
+ if self.loan_type and not self.rate_of_interest:
+ self.rate_of_interest = frappe.db.get_value("Loan Type", self.loan_type, "rate_of_interest")
+ if self.repayment_method == "Repay Over Number of Periods":
+ self.monthly_repayment_amount = get_monthly_repayment_amount(self.repayment_method, self.loan_amount, self.rate_of_interest, self.repayment_periods)
+
+ self.make_repayment_schedule()
+ self.set_repayment_period()
+ self.calculate_totals()
+
+ def on_submit(self):
+ self.make_gl_entries()
+
+ def on_cancel(self):
+ self.make_gl_entries()
+
+ def make_gl_entries(self):
+ gl_entries = []
+ # Gl entries for employee loan account
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": self.employee_loan_account,
+ "party_type": "Employee",
+ "party": self.employee,
+ "debit": self.loan_amount,
+ "debit_in_account_currency": self.loan_amount
+ })
+ )
+ # Gl entries for payment account
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": self.payment_account,
+ "credit": self.loan_amount,
+ "credit_in_account_currency": self.loan_amount
+ })
+ )
+ make_gl_entries(gl_entries, cancel=(self.docstatus == 2))
+
+ def make_repayment_schedule(self):
+ self.repayment_schedule = []
+ payment_date = self.disbursement_date
+ balance_amount = self.loan_amount
+
+ while(balance_amount > 0):
+ interest_amount = rounded(balance_amount * flt(self.rate_of_interest) / (12*100))
+ principal_amount = self.monthly_repayment_amount - interest_amount
+ balance_amount = rounded(balance_amount + interest_amount - self.monthly_repayment_amount)
+
+ if balance_amount < 0:
+ principal_amount += balance_amount
+ balance_amount = 0.0
+
+ total_payment = principal_amount + interest_amount
+
+ self.append("repayment_schedule", {
+ "payment_date": payment_date,
+ "principal_amount": principal_amount,
+ "interest_amount": interest_amount,
+ "total_payment": total_payment,
+ "balance_loan_amount": balance_amount
+ })
+
+ next_payment_date = add_months(payment_date, 1)
+ payment_date = next_payment_date
+
+ def set_repayment_period(self):
+ if self.repayment_method == "Repay Fixed Amount per Period":
+ repayment_periods = len(self.repayment_schedule)
+
+ self.repayment_periods = repayment_periods
+
+ def calculate_totals(self):
+ self.total_payment = 0
+ self.total_interest_payable = 0
+ for data in self.repayment_schedule:
+ self.total_payment += data.total_payment
+ self.total_interest_payable +=data.interest_amount
+
+ def update_status(self):
+ if self.disbursement_date:
+ self.status = "Loan Paid"
+ if len(self.repayment_schedule)>0:
+ self.status = "repayment in progress"
+
+def check_repayment_method(repayment_method, loan_amount, monthly_repayment_amount, repayment_periods):
+ if repayment_method == "Repay Over Number of Periods" and not repayment_periods:
+ frappe.throw(_("Please enter Repayment Periods"))
+
+ if repayment_method == "Repay Fixed Amount per Period":
+ if not monthly_repayment_amount:
+ frappe.throw(_("Please enter repayment Amount"))
+ if monthly_repayment_amount > loan_amount:
+ frappe.throw(_("Monthly Repayment Amount cannot be greater than Loan Amount"))
+
+def get_monthly_repayment_amount(repayment_method, loan_amount, rate_of_interest, repayment_periods):
+ if rate_of_interest:
+ monthly_interest_rate = flt(rate_of_interest) / (12 *100)
+ monthly_repayment_amount = math.ceil((loan_amount * monthly_interest_rate *
+ (1 + monthly_interest_rate)**repayment_periods) \
+ / ((1 + monthly_interest_rate)**repayment_periods - 1))
+ else:
+ monthly_repayment_amount = math.ceil(flt(loan_amount) / repayment_periods)
+ return monthly_repayment_amount
+
+@frappe.whitelist()
+def get_employee_loan_application(employee_loan_application):
+ employee_loan = frappe.get_doc("Employee Loan Application", employee_loan_application)
+ if employee_loan:
+ return employee_loan
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_loan/test_employee_loan.py b/erpnext/hr/doctype/employee_loan/test_employee_loan.py
new file mode 100644
index 0000000..c1c6ba2
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan/test_employee_loan.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import erpnext
+import unittest
+from frappe.utils import nowdate
+from erpnext.hr.doctype.salary_structure.test_salary_structure import make_employee
+
+class TestEmployeeLoan(unittest.TestCase):
+ def setUp(self):
+ create_loan_type("Personal Loan", 500000, 8.4)
+ self.employee = make_employee("robert_loan@loan.com")
+ create_employee_loan(self.employee, "Personal Loan", 280000, "Repay Over Number of Periods", 20)
+
+ def test_employee_loan(self):
+ employee_loan = frappe.get_doc("Employee Loan", {"employee":self.employee})
+ self.assertEquals(employee_loan.monthly_repayment_amount, 15052)
+ self.assertEquals(employee_loan.total_interest_payable, 21034)
+ self.assertEquals(employee_loan.total_payment, 301034)
+
+ schedule = employee_loan.repayment_schedule
+
+ self.assertEquals(len(schedule), 20)
+
+ for idx, principal_amount, interest_amount, balance_loan_amount in [[3, 13369, 1683, 227079], [19, 14941, 105, 0], [17, 14740, 312, 29785]]:
+ self.assertEquals(schedule[idx].principal_amount, principal_amount)
+ self.assertEquals(schedule[idx].interest_amount, interest_amount)
+ self.assertEquals(schedule[idx].balance_loan_amount, balance_loan_amount)
+
+ employee_loan.repayment_method = "Repay Fixed Amount per Period"
+ employee_loan.monthly_repayment_amount = 14000
+ employee_loan.save()
+
+ self.assertEquals(len(employee_loan.repayment_schedule), 22)
+ self.assertEquals(employee_loan.total_interest_payable, 22712)
+ self.assertEquals(employee_loan.total_payment, 302712)
+
+
+def create_loan_type(loan_name, maximum_loan_amount, rate_of_interest):
+ if not frappe.db.get_value("Loan Type", loan_name):
+ frappe.get_doc({
+ "doctype": "Loan Type",
+ "loan_name": loan_name,
+ "maximum_loan_amount": maximum_loan_amount,
+ "rate_of_interest": rate_of_interest
+ }).insert()
+
+def create_employee_loan(employee, loan_type, loan_amount, repayment_method, repayment_periods):
+ if not frappe.db.get_value("Employee Loan", {"employee":employee}):
+ employee_loan = frappe.new_doc("Employee Loan")
+ employee_loan.update({
+ "employee": employee,
+ "loan_type": loan_type,
+ "loan_amount": loan_amount,
+ "repayment_method": repayment_method,
+ "repayment_periods": repayment_periods,
+ "disbursement_date": nowdate(),
+ "mode_of_payment": frappe.db.get_value('Mode of Payment', {'type': 'Cash'}, 'name'),
+ "payment_account": frappe.db.get_value('Account', {'account_type': 'Cash', 'company': erpnext.get_default_company(),'is_group':0}, "name"),
+ "employee_loan_account": frappe.db.get_value('Account', {'account_type': 'Cash', 'company': erpnext.get_default_company(),'is_group':0}, "name")
+ })
+ employee_loan.insert()
+ return employee_loan
+ else:
+ return frappe.get_doc("Employee Loan", {"employee":employee})
\ No newline at end of file
diff --git a/erpnext/schools/doctype/discussion/__init__.py b/erpnext/hr/doctype/employee_loan_application/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/discussion/__init__.py
copy to erpnext/hr/doctype/employee_loan_application/__init__.py
diff --git a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js
new file mode 100644
index 0000000..6958bea
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.js
@@ -0,0 +1,16 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Employee Loan Application', {
+ refresh: function(frm) {
+ frm.trigger("toggle_fields")
+ },
+ repayment_method: function(frm) {
+ frm.trigger("toggle_fields")
+ },
+
+ toggle_fields: function(frm) {
+ frm.toggle_enable("repayment_amount", frm.doc.repayment_method=="Repay Fixed Amount per Period")
+ frm.toggle_enable("repayment_periods", frm.doc.repayment_method=="Repay Over Number of Periods")
+ }
+});
diff --git a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json
new file mode 100644
index 0000000..f6a9c02
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.json
@@ -0,0 +1,701 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "ELA/.#####",
+ "beta": 0,
+ "creation": "2016-12-02 12:35:56.046811",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "default": "Today",
+ "fieldname": "posting_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Posting Date",
+ "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": "employee",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employee",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Employee",
+ "permlevel": 0,
+ "precision": "",
+ "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": "employee_name",
+ "fieldtype": "Read Only",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 1,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employee Name",
+ "length": 0,
+ "no_copy": 0,
+ "options": "employee.employee_name",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Open\nApproved\nRejected",
+ "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": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "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": "section_break_4",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan Info",
+ "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": "loan_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Loan Type",
+ "permlevel": 0,
+ "precision": "",
+ "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": "loan_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan Amount",
+ "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": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "required_by_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Required by Date",
+ "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_7",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "description",
+ "fieldtype": "Small Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Reason",
+ "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": "repayment_info",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Info",
+ "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": "repayment_method",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Method",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nRepay Fixed Amount per Period\nRepay Over Number of Periods",
+ "permlevel": 0,
+ "precision": "",
+ "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": "rate_of_interest",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Rate of Interest",
+ "length": 0,
+ "no_copy": 0,
+ "options": "loan_type.rate_of_interest",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": "total_payable_interest",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Payable Interest",
+ "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": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_11",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
+ "depends_on": "",
+ "fieldname": "repayment_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Monthly Repayment Amount",
+ "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,
+ "depends_on": "",
+ "fieldname": "repayment_periods",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Repayment Period in Months",
+ "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": "total_payable_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Payable Amount",
+ "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": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Amended From",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Employee Loan Application",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 1,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2017-02-22 04:27:36.144540",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Employee Loan Application",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 1,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Employee",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 1,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "employee, employee_name, loan_type, loan_amount",
+ "show_name_in_global_search": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "timeline_field": "employee",
+ "title_field": "employee_name",
+ "track_changes": 1,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py
new file mode 100644
index 0000000..15dbd4e
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan_application/employee_loan_application.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe, math
+from frappe import _
+from frappe.utils import flt
+from frappe.model.document import Document
+
+from erpnext.hr.doctype.employee_loan.employee_loan import get_monthly_repayment_amount, check_repayment_method
+
+class EmployeeLoanApplication(Document):
+ def validate(self):
+ check_repayment_method(self.repayment_method, self.loan_amount, self.repayment_amount, self.repayment_periods)
+ self.validate_loan_amount()
+ self.get_repayment_details()
+
+ def validate_loan_amount(self):
+ maximum_loan_limit = frappe.db.get_value('Loan Type', self.loan_type, 'maximum_loan_amount')
+ if self.loan_amount > maximum_loan_limit:
+ frappe.throw(_("Loan Amount cannot exceed Maximum Loan Amount of {0}").format(maximum_loan_limit))
+
+ def get_repayment_details(self):
+ if self.repayment_method == "Repay Over Number of Periods":
+ self.repayment_amount = get_monthly_repayment_amount(self.repayment_method, self.loan_amount, self.rate_of_interest, self.repayment_periods)
+
+ if self.repayment_method == "Repay Fixed Amount per Period":
+ monthly_interest_rate = flt(self.rate_of_interest) / (12 *100)
+ self.repayment_periods = math.ceil((math.log(self.repayment_amount) - math.log(self.repayment_amount - \
+ (self.loan_amount*monthly_interest_rate)))/(math.log(1+monthly_interest_rate)))
+
+ self.total_payable_amount = self.repayment_amount * self.repayment_periods
+ self.total_payable_interest = self.total_payable_amount - self.loan_amount
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_loan_application/test_employee_loan_application.py b/erpnext/hr/doctype/employee_loan_application/test_employee_loan_application.py
new file mode 100644
index 0000000..1d157d6
--- /dev/null
+++ b/erpnext/hr/doctype/employee_loan_application/test_employee_loan_application.py
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+from erpnext.hr.doctype.salary_structure.test_salary_structure import make_employee
+
+class TestEmployeeLoanApplication(unittest.TestCase):
+ def setUp(self):
+ self.create_loan_type()
+ self.employee = make_employee("kate_loan@loan.com")
+ self.create_loan_application()
+
+ def create_loan_type(self):
+ if not frappe.db.get_value("Loan Type", "Home Loan"):
+ frappe.get_doc({
+ "doctype": "Loan Type",
+ "loan_name": "Home Loan",
+ "maximum_loan_amount": 500000,
+ "rate_of_interest": 9.2
+ }).insert()
+
+ def create_loan_application(self):
+ if not frappe.db.get_value("Employee Loan Application", {"employee":self.employee}, "name"):
+ loan_application = frappe.new_doc("Employee Loan Application")
+ loan_application.update({
+ "employee": self.employee,
+ "loan_type": "Home Loan",
+ "rate_of_interest": 9.2,
+ "loan_amount": 250000,
+ "repayment_method": "Repay Over Number of Periods",
+ "repayment_periods": 24
+ })
+ loan_application.insert()
+
+
+ def test_loan_totals(self):
+ loan_application = frappe.get_doc("Employee Loan Application", {"employee":self.employee})
+ self.assertEquals(loan_application.repayment_amount, 11445)
+ self.assertEquals(loan_application.total_payable_interest, 24680)
+ self.assertEquals(loan_application.total_payable_amount, 274680)
+
+ loan_application.repayment_method = "Repay Fixed Amount per Period"
+ loan_application.repayment_amount = 15000
+ loan_application.save()
+
+ self.assertEquals(loan_application.repayment_periods, 18)
+ self.assertEquals(loan_application.total_payable_interest, 20000)
+ self.assertEquals(loan_application.total_payable_amount, 270000)
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employment_type/employment_type.json b/erpnext/hr/doctype/employment_type/employment_type.json
index 6963be2..da84ce4 100644
--- a/erpnext/hr/doctype/employment_type/employment_type.json
+++ b/erpnext/hr/doctype/employment_type/employment_type.json
@@ -15,13 +15,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "employee_type_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Employment Type",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,7 @@
"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,
@@ -49,7 +53,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-22 05:34:43.238512",
+ "modified": "2017-02-17 16:51:15.218646",
"modified_by": "Administrator",
"module": "HR",
"name": "Employment Type",
@@ -99,6 +103,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index 8b3c451..7d19051 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -158,6 +158,21 @@
}
}
+frappe.ui.form.on("Expense Claim", {
+ refresh: function(frm) {
+ if(frm.doc.docstatus == 1) {
+ frm.add_custom_button(__('Accounting Ledger'), function() {
+ frappe.route_options = {
+ voucher_no: frm.doc.name,
+ company: frm.doc.company,
+ group_by_voucher: false
+ };
+ frappe.set_route("query-report", "General Ledger");
+ }, __("View"));
+ }
+ }
+})
+
frappe.ui.form.on("Expense Claim Detail", {
claim_amount: function(frm, cdt, cdn) {
var child = locals[cdt][cdn];
@@ -176,6 +191,47 @@
}
})
+frappe.ui.form.on("Expense Claim",{
+ setup: function(frm) {
+ frm.trigger("set_query_for_cost_center")
+ frm.trigger("set_query_for_payable_account")
+ frm.add_fetch("company", "cost_center", "cost_center");
+ frm.add_fetch("company", "default_payable_account", "payable_account");
+ },
+
+ refresh: function(frm) {
+ frm.trigger("toggle_fields")
+ },
+
+ set_query_for_cost_center: function(frm) {
+ frm.fields_dict["cost_center"].get_query = function() {
+ return {
+ filters: {
+ "company": frm.doc.company
+ }
+ }
+ }
+ },
+
+ set_query_for_payable_account: function(frm) {
+ frm.fields_dict["payable_account"].get_query = function() {
+ return {
+ filters: {
+ "root_type": "Liability",
+ "account_type": "Payable"
+ }
+ }
+ }
+ },
+
+ is_paid: function(frm) {
+ frm.trigger("toggle_fields")
+ },
+
+ toggle_fields: function(frm) {
+ frm.toggle_reqd("mode_of_payment", frm.doc.is_paid)
+ }
+});
frappe.ui.form.on("Expense Claim", "employee_name", function(frm) {
erpnext.expense_claim.set_title(frm);
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.json b/erpnext/hr/doctype/expense_claim/expense_claim.json
index 67132bf..052284d 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.json
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -46,6 +47,35 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "is_paid",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Paid",
+ "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,
"default": "Draft",
"depends_on": "eval:!doc.__islocal",
"fieldname": "approval_status",
@@ -53,9 +83,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 1,
+ "in_standard_filter": 0,
"label": "Approval Status",
"length": 0,
"no_copy": 1,
@@ -85,8 +116,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
- "in_standard_filter": 1,
+ "in_standard_filter": 0,
"label": "Approver",
"length": 0,
"no_copy": 0,
@@ -116,6 +148,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -144,6 +177,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Claimed Amount",
@@ -175,7 +209,8 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Sanctioned Amount",
"length": 0,
@@ -206,6 +241,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -234,6 +270,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expenses",
@@ -264,6 +301,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -291,7 +329,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -320,9 +359,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
- "in_standard_filter": 1,
+ "in_standard_filter": 0,
"label": "From Employee",
"length": 0,
"no_copy": 0,
@@ -350,7 +390,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -375,42 +416,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "company",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "in_standard_filter": 1,
- "label": "Company",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "company",
- "oldfieldtype": "Link",
- "options": "Company",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 1,
- "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": "vehicle_log",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Vehicle Log",
@@ -434,96 +446,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "cb1",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "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": "total_amount_reimbursed",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Total Amount Reimbursed",
- "length": 0,
- "no_copy": 1,
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "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": "remark",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Remark",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "remark",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "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": "project",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -553,6 +482,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Task",
@@ -572,6 +502,93 @@
"unique": 0
},
{
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "cb1",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "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": "total_amount_reimbursed",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Total Amount Reimbursed",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": "remark",
+ "fieldtype": "Small Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Remark",
+ "length": 0,
+ "no_copy": 1,
+ "oldfieldname": "remark",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "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": 1,
"bold": 0,
"collapsible": 0,
@@ -583,6 +600,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -611,9 +629,10 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Employees Email Address",
+ "label": "Employees Email Id",
"length": 0,
"no_copy": 0,
"oldfieldname": "email_id",
@@ -634,12 +653,253 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "accounting_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Accounting 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": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "company",
+ "oldfieldtype": "Link",
+ "options": "Company",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 1,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "is_paid",
+ "fieldname": "mode_of_payment",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Mode of Payment",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Mode of Payment",
+ "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_24",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
+ "depends_on": "",
+ "fieldname": "payable_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Payable Account",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Account",
+ "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": "cost_center",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Employees Email Address",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Cost Center",
+ "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": "more_details",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "More 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,
+ "default": "Draft",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Status",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Draft\nPaid\nUnpaid\nSubmitted\nCancelled",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -663,7 +923,7 @@
],
"hide_heading": 0,
"hide_toolbar": 0,
- "icon": "fa fa-money",
+ "icon": "icon-money",
"idx": 1,
"image_view": 0,
"in_create": 0,
@@ -673,10 +933,11 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:52:48.548201",
+ "modified": "2017-02-17 16:52:25.682739",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim",
+ "name_case": "Title Case",
"owner": "harshada@webnotestech.com",
"permissions": [
{
@@ -689,7 +950,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -710,7 +970,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -732,7 +991,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -754,7 +1012,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -771,9 +1028,11 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "approval_status,employee,employee_name",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "employee",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.py b/erpnext/hr/doctype/expense_claim/expense_claim.py
index efdee97..957753a 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.py
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.py
@@ -4,13 +4,17 @@
from __future__ import unicode_literals
import frappe
from frappe import _
-from frappe.utils import get_fullname, flt
+from frappe.utils import get_fullname, flt, cstr
from frappe.model.document import Document
from erpnext.hr.utils import set_employee_name
+from erpnext.accounts.party import get_party_account
+from erpnext.accounts.general_ledger import make_gl_entries
+from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
+from erpnext.controllers.accounts_controller import AccountsController
class InvalidExpenseApproverError(frappe.ValidationError): pass
-class ExpenseClaim(Document):
+class ExpenseClaim(AccountsController):
def get_feed(self):
return _("{0}: From {0} for {1}").format(self.approval_status,
self.employee_name, self.total_claimed_amount)
@@ -21,16 +25,53 @@
self.calculate_total_amount()
set_employee_name(self)
self.set_expense_account()
+ self.set_payable_account()
+ self.set_cost_center()
+ self.set_status()
if self.task and not self.project:
self.project = frappe.db.get_value("Task", self.task, "project")
+ def set_status(self):
+ self.status = {
+ "0": "Draft",
+ "1": "Submitted",
+ "2": "Cancelled"
+ }[cstr(self.docstatus or 0)]
+
+ if self.total_sanctioned_amount == self.total_amount_reimbursed and self.docstatus == 1:
+ self.status = "Paid"
+ elif self.docstatus == 1:
+ self.status = "Unpaid"
+
+ def set_payable_account(self):
+ if not self.payable_account and not self.is_paid:
+ self.payable_account = frappe.db.get_value("Company", self.company, "default_payable_account")
+
+ def set_cost_center(self):
+ if not self.cost_center:
+ self.cost_center = frappe.db.get_value('Company', self.company, 'cost_center')
+
def on_submit(self):
if self.approval_status=="Draft":
frappe.throw(_("""Approval Status must be 'Approved' or 'Rejected'"""))
+
self.update_task_and_project()
+ self.make_gl_entries()
+
+ if self.is_paid:
+ update_reimbursed_amount(self)
+
+ self.set_status()
def on_cancel(self):
self.update_task_and_project()
+ if self.payable_account:
+ self.make_gl_entries(cancel=True)
+
+ if self.is_paid:
+ update_reimbursed_amount(self)
+
+ self.set_status()
def update_task_and_project(self):
if self.task:
@@ -38,6 +79,79 @@
elif self.project:
frappe.get_doc("Project", self.project).update_project()
+ def make_gl_entries(self, cancel = False):
+ if flt(self.total_sanctioned_amount) > 0:
+ gl_entries = self.get_gl_entries()
+ make_gl_entries(gl_entries, cancel)
+
+ def get_gl_entries(self):
+ gl_entry = []
+ self.validate_account_details()
+
+ # payable entry
+ gl_entry.append(
+ self.get_gl_dict({
+ "account": self.payable_account,
+ "credit": self.total_sanctioned_amount,
+ "credit_in_account_currency": self.total_sanctioned_amount,
+ "against": ",".join([d.default_account for d in self.expenses]),
+ "party_type": "Employee",
+ "party": self.employee,
+ "against_voucher_type": self.doctype,
+ "against_voucher": self.name
+ })
+ )
+
+ # expense entries
+ for data in self.expenses:
+ gl_entry.append(
+ self.get_gl_dict({
+ "account": data.default_account,
+ "debit": data.sanctioned_amount,
+ "debit_in_account_currency": data.sanctioned_amount,
+ "against": self.employee,
+ "cost_center": self.cost_center
+ })
+ )
+
+ if self.is_paid:
+ # payment entry
+ payment_account = get_bank_cash_account(self.mode_of_payment, self.company).get("account")
+ gl_entry.append(
+ self.get_gl_dict({
+ "account": payment_account,
+ "credit": self.total_sanctioned_amount,
+ "credit_in_account_currency": self.total_sanctioned_amount,
+ "against": self.employee
+ })
+ )
+
+ gl_entry.append(
+ self.get_gl_dict({
+ "account": self.payable_account,
+ "party_type": "Employee",
+ "party": self.employee,
+ "against": payment_account,
+ "debit": self.total_sanctioned_amount,
+ "debit_in_account_currency": self.total_sanctioned_amount,
+ "against_voucher": self.name,
+ "against_voucher_type": self.doctype,
+ })
+ )
+
+ return gl_entry
+
+ def validate_account_details(self):
+ if not self.cost_center:
+ frappe.throw(_("Cost center is required to book an expense claim"))
+
+ if not self.payable_account:
+ frappe.throw(_("Please set default payable account in the employee {0}").format(self.employee))
+
+ if self.is_paid:
+ if not self.mode_of_payment:
+ frappe.throw(_("Mode of payment is required to make a payment").format(self.employee))
+
def calculate_total_amount(self):
self.total_claimed_amount = 0
self.total_sanctioned_amount = 0
@@ -64,7 +178,18 @@
for expense in self.expenses:
if not expense.default_account:
expense.default_account = get_expense_claim_account(expense.expense_type, self.company)["account"]
-
+
+def update_reimbursed_amount(doc):
+ amt = frappe.db.sql("""select ifnull(sum(debit_in_account_currency), 0) as amt
+ from `tabGL Entry` where against_voucher_type = 'Expense Claim' and against_voucher = %s
+ and party = %s """, (doc.name, doc.employee) ,as_dict=1)[0].amt
+
+ doc.total_amount_reimbursed = amt
+ frappe.db.set_value("Expense Claim", doc.name , "total_amount_reimbursed", amt)
+
+ doc.set_status()
+ frappe.db.set_value("Expense Claim", doc.name , "status", doc.status)
+
@frappe.whitelist()
def get_expense_approver(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""
@@ -80,23 +205,26 @@
expense_claim = frappe.get_doc("Expense Claim", docname)
default_bank_cash_account = get_default_bank_cash_account(expense_claim.company, "Bank")
+ if not default_bank_cash_account:
+ default_bank_cash_account = get_default_bank_cash_account(expense_claim.company, "Cash")
je = frappe.new_doc("Journal Entry")
je.voucher_type = 'Bank Entry'
je.company = expense_claim.company
je.remark = 'Payment against Expense Claim: ' + docname;
- for expense in expense_claim.expenses:
- je.append("accounts", {
- "account": expense.default_account,
- "debit_in_account_currency": expense.sanctioned_amount,
- "reference_type": "Expense Claim",
- "reference_name": expense_claim.name
- })
+ je.append("accounts", {
+ "account": expense_claim.payable_account,
+ "debit_in_account_currency": flt(expense_claim.total_sanctioned_amount - expense_claim.total_amount_reimbursed),
+ "reference_type": "Expense Claim",
+ "party_type": "Employee",
+ "party": expense_claim.employee,
+ "reference_name": expense_claim.name
+ })
je.append("accounts", {
"account": default_bank_cash_account.account,
- "credit_in_account_currency": expense_claim.total_sanctioned_amount,
+ "credit_in_account_currency": flt(expense_claim.total_sanctioned_amount - expense_claim.total_amount_reimbursed),
"reference_type": "Expense Claim",
"reference_name": expense_claim.name,
"balance": default_bank_cash_account.balance,
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim_list.js b/erpnext/hr/doctype/expense_claim/expense_claim_list.js
index 54073ed..7cff8e2 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim_list.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim_list.js
@@ -2,7 +2,10 @@
add_fields: ["approval_status", "total_claimed_amount", "docstatus"],
filters:[["approval_status","!=", "Rejected"]],
get_indicator: function(doc) {
- return [__(doc.approval_status), frappe.utils.guess_colour(doc.approval_status),
- "approval_status,=," + doc.approval_status];
+ if(doc.status == "Paid") {
+ return [__("Paid"), "green", "status,=,'Paid'"];
+ } else {
+ return [__("Unpaid"), "orange"];
+ }
}
};
diff --git a/erpnext/hr/doctype/expense_claim/test_expense_claim.py b/erpnext/hr/doctype/expense_claim/test_expense_claim.py
index 59d686e..20df7be 100644
--- a/erpnext/hr/doctype/expense_claim/test_expense_claim.py
+++ b/erpnext/hr/doctype/expense_claim/test_expense_claim.py
@@ -4,6 +4,8 @@
import frappe
import unittest
+from frappe.utils import random_string, nowdate
+from erpnext.hr.doctype.expense_claim.expense_claim import make_bank_entry
test_records = frappe.get_test_records('Expense Claim')
@@ -11,8 +13,6 @@
def test_total_expense_claim_for_project(self):
frappe.db.sql("""delete from `tabTask` where project = "_Test Project 1" """)
frappe.db.sql("""delete from `tabProject` where name = "_Test Project 1" """)
- frappe.db.sql("""delete from `tabExpense Claim`""")
- frappe.db.sql("""delete from `tabExpense Claim Detail`""")
frappe.get_doc({
"project_name": "_Test Project 1",
@@ -22,15 +22,17 @@
}).save()
task_name = frappe.db.get_value("Task", {"project": "_Test Project 1"})
+ payable_account = get_payable_account("Wind Power LLC")
expense_claim = frappe.get_doc({
"doctype": "Expense Claim",
"employee": "_T-Employee-0001",
+ "payable_account": payable_account,
"approval_status": "Approved",
"project": "_Test Project 1",
"task": task_name,
"expenses":
- [{ "expense_type": "Food", "default_account": "Entertainment Expenses - _TC", "claim_amount": 300, "sanctioned_amount": 200 }]
+ [{ "expense_type": "Travel", "default_account": "Travel Expenses - WP", "claim_amount": 300, "sanctioned_amount": 200 }]
})
expense_claim.submit()
@@ -44,7 +46,7 @@
"project": "_Test Project 1",
"task": task_name,
"expenses":
- [{ "expense_type": "Food", "default_account": "Entertainment Expenses - _TC", "claim_amount": 600, "sanctioned_amount": 500 }]
+ [{ "expense_type": "Travel", "default_account": "Travel Expenses - WP", "claim_amount": 600, "sanctioned_amount": 500 }]
})
expense_claim2.submit()
@@ -52,6 +54,64 @@
self.assertEqual(frappe.db.get_value("Project", "_Test Project 1", "total_expense_claim"), 700)
expense_claim2.cancel()
+ frappe.delete_doc("Expenses Claim", expense_claim2.name)
self.assertEqual(frappe.db.get_value("Task", task_name, "total_expense_claim"), 200)
self.assertEqual(frappe.db.get_value("Project", "_Test Project 1", "total_expense_claim"), 200)
+
+ def test_expense_claim_status(self):
+ payable_account = get_payable_account("Wind Power LLC")
+ expense_claim = frappe.get_doc({
+ "doctype": "Expense Claim",
+ "employee": "_T-Employee-0001",
+ "payable_account": payable_account,
+ "approval_status": "Approved",
+ "expenses":
+ [{ "expense_type": "Travel", "default_account": "Travel Expenses - WP", "claim_amount": 300, "sanctioned_amount": 200 }]
+ })
+ expense_claim.submit()
+
+ je_dict = make_bank_entry(expense_claim.name)
+ je = frappe.get_doc(je_dict)
+ je.posting_date = nowdate()
+ je.cheque_no = random_string(5)
+ je.cheque_date = nowdate()
+ je.submit()
+
+ expense_claim = frappe.get_doc("Expense Claim", expense_claim.name)
+ self.assertEqual(expense_claim.status, "Paid")
+
+ je.cancel()
+ expense_claim = frappe.get_doc("Expense Claim", expense_claim.name)
+ self.assertEqual(expense_claim.status, "Unpaid")
+
+ def test_expense_claim_gl_entry(self):
+ payable_account = get_payable_account("Wind Power LLC")
+ expense_claim = frappe.get_doc({
+ "doctype": "Expense Claim",
+ "employee": "_T-Employee-0001",
+ "payable_account": payable_account,
+ "approval_status": "Approved",
+ "expenses":
+ [{ "expense_type": "Travel", "default_account": "Travel Expenses - WP", "claim_amount": 300, "sanctioned_amount": 200 }]
+ })
+ expense_claim.submit()
+
+ gl_entries = frappe.db.sql("""select account, debit, credit
+ from `tabGL Entry` where voucher_type='Expense Claim' and voucher_no=%s
+ order by account asc""", expense_claim.name, as_dict=1)
+
+ self.assertTrue(gl_entries)
+
+ expected_values = dict((d[0], d) for d in [
+ [payable_account, 0.0, 200.0],
+ ["Travel Expenses - WP", 200.0, 0.0]
+ ])
+
+ for gle in gl_entries:
+ self.assertEquals(expected_values[gle.account][0], gle.account)
+ self.assertEquals(expected_values[gle.account][1], gle.debit)
+ self.assertEquals(expected_values[gle.account][2], gle.credit)
+
+def get_payable_account(company):
+ return frappe.db.get_value('Company', company, 'default_payable_account')
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.json b/erpnext/hr/doctype/job_applicant/job_applicant.json
index 3675e5b..2a97f28 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.json
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.json
@@ -24,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicant Name",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Email Address",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -134,6 +138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Job Opening",
@@ -162,6 +167,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -189,6 +195,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cover Letter",
@@ -217,6 +224,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resume Attachment",
@@ -246,7 +254,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:29:24.405606",
+ "modified": "2017-02-17 16:51:55.976529",
"modified_by": "Administrator",
"module": "HR",
"name": "Job Applicant",
@@ -262,7 +270,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -278,7 +285,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "applicant_name",
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
"title_field": "applicant_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.json b/erpnext/hr/doctype/leave_allocation/leave_allocation.json
index e984bfc..f2ed766 100644
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -78,7 +80,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Employee",
@@ -108,7 +111,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -163,6 +168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -219,7 +226,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Leave Type",
@@ -250,6 +258,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -278,6 +287,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -306,6 +316,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -333,6 +344,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "New Leaves Allocated",
@@ -361,6 +373,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Add unused leaves from previous allocations",
@@ -389,6 +402,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Unused leaves",
@@ -416,6 +430,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Leaves Allocated",
@@ -443,6 +458,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -474,7 +490,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:26:00.812083",
+ "modified": "2017-02-17 16:51:05.744921",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Allocation",
@@ -490,7 +506,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -511,7 +526,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -527,8 +541,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "employee,employee_name,leave_type,total_leaves_allocated",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "employee",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json
index 0f63ec3..3939739 100644
--- a/erpnext/hr/doctype/leave_application/leave_application.json
+++ b/erpnext/hr/doctype/leave_application/leave_application.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -53,6 +54,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -107,7 +110,8 @@
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Leave Type",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Balance Before Application",
@@ -163,6 +168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -190,6 +196,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "From Date",
@@ -217,6 +224,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "To Date",
@@ -244,6 +252,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Half Day",
@@ -271,6 +280,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Leave Days",
@@ -298,6 +308,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -326,6 +337,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reason",
@@ -353,6 +365,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -379,7 +392,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Employee",
@@ -407,7 +421,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -435,6 +450,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -463,6 +479,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Leave Approver",
@@ -491,6 +508,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Approver Name",
@@ -519,6 +537,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -547,6 +566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -575,6 +595,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Follow via Email",
@@ -602,6 +623,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -628,6 +650,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -656,6 +679,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -684,6 +708,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -713,7 +738,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 3,
- "modified": "2016-12-15 14:48:14.552415",
+ "modified": "2017-02-17 17:09:38.828496",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Application",
@@ -729,7 +754,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -751,7 +775,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -772,7 +795,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -793,7 +815,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -815,7 +836,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -837,7 +857,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -858,7 +877,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -874,9 +892,11 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "employee,employee_name,leave_type,from_date,to_date,total_leave_days",
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "employee",
"title_field": "employee_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index 5b565fa..84c14c9 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -25,7 +25,7 @@
def validate(self):
if not getattr(self, "__islocal", None) and frappe.db.exists(self.doctype, self.name):
- self.previous_doc = frappe.db.get_value(self.doctype, self.name, "*", as_dict=True)
+ self.previous_doc = frappe.get_value(self.doctype, self.name, "leave_approver", as_dict=True)
else:
self.previous_doc = None
@@ -46,14 +46,10 @@
self.status == "Open" and self.previous_doc.leave_approver != self.leave_approver):
# notify leave approver about creation
self.notify_leave_approver()
- elif self.previous_doc and \
- self.previous_doc.status == "Open" and self.status == "Rejected":
- # notify employee about rejection
- self.notify_employee(self.status)
def on_submit(self):
- if self.status != "Approved":
- frappe.throw(_("Only Leave Applications with status 'Approved' can be submitted"))
+ if self.status == "Open":
+ frappe.throw(_("Only Leave Applications with status 'Approved' and 'Rejected' can be submitted"))
self.validate_back_dated_application()
@@ -234,13 +230,18 @@
else:
name = self.name
- return (_("Leave Application") + ": %s - %s") % (name, _(status))
+ message = "Leave Application: {name}".format(name=name)+"<br>"
+ message += "Leave Type: {leave_type}".format(leave_type=self.leave_type)+"<br>"
+ message += "From Date: {from_date}".format(from_date=self.from_date)+"<br>"
+ message += "To Date: {to_date}".format(to_date=self.to_date)+"<br>"
+ message += "Status: {status}".format(status=_(status))
+ return message
self.notify({
# for post in messages
"message": _get_message(url=True),
"message_to": employee.user_id,
- "subject": _get_message(),
+ "subject": (_("Leave Application") + ": %s - %s") % (self.name, _(status))
})
def notify_leave_approver(self):
@@ -252,8 +253,12 @@
if url:
name = get_link_to_form(self.doctype, self.name)
employee_name = get_link_to_form("Employee", self.employee, label=employee_name)
-
- return (_("New Leave Application") + ": %s - " + _("Employee") + ": %s") % (name, employee_name)
+ message = (_("Leave Application") + ": %s") % (name)+"<br>"
+ message += (_("Employee") + ": %s") % (employee_name)+"<br>"
+ message += (_("Leave Type") + ": %s") % (self.leave_type)+"<br>"
+ message += (_("From Date") + ": %s") % (self.from_date)+"<br>"
+ message += (_("To Date") + ": %s") % (self.to_date)
+ return message
self.notify({
# for post in messages
@@ -261,7 +266,7 @@
"message_to": self.leave_approver,
# for email
- "subject": _get_message()
+ "subject": (_("New Leave Application") + ": %s - " + _("Employee") + ": %s") % (self.name, cstr(employee.employee_name))
})
def notify(self, args):
diff --git a/erpnext/schools/doctype/topic/__init__.py b/erpnext/hr/doctype/loan_type/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/topic/__init__.py
rename to erpnext/hr/doctype/loan_type/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/hr/doctype/loan_type/loan_type.js
similarity index 77%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
copy to erpnext/hr/doctype/loan_type/loan_type.js
index 5e0269b..72f5775 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/hr/doctype/loan_type/loan_type.js
@@ -1,8 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Loan Type', {
refresh: function(frm) {
-
}
});
diff --git a/erpnext/hr/doctype/loan_type/loan_type.json b/erpnext/hr/doctype/loan_type/loan_type.json
new file mode 100644
index 0000000..f9441ea
--- /dev/null
+++ b/erpnext/hr/doctype/loan_type/loan_type.json
@@ -0,0 +1,230 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "field:loan_name",
+ "beta": 0,
+ "creation": "2016-12-02 10:41:40.732843",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "loan_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan Name",
+ "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": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "maximum_loan_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Maximum Loan Amount",
+ "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": "rate_of_interest",
+ "fieldtype": "Percent",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Rate of Interest (%) Yearly",
+ "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": 1,
+ "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,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
+ "default": "",
+ "fieldname": "disabled",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Disabled",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "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": "description",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Description",
+ "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,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2016-12-29 15:54:17.716285",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Loan Type",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "is_custom": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/hr/doctype/loan_type/loan_type.py
similarity index 86%
rename from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
rename to erpnext/hr/doctype/loan_type/loan_type.py
index 85c1b32..2714e20 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/hr/doctype/loan_type/loan_type.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class LoanType(Document):
pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/hr/doctype/loan_type/test_loan_type.py
similarity index 62%
copy from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
copy to erpnext/hr/doctype/loan_type/test_loan_type.py
index 0182db6..078e11e 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/hr/doctype/loan_type/test_loan_type.py
@@ -6,7 +6,7 @@
import frappe
import unittest
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Loan Type')
-class TestEvaluationCriteria(unittest.TestCase):
+class TestLoanType(unittest.TestCase):
pass
diff --git a/erpnext/hr/doctype/offer_letter/offer_letter.json b/erpnext/hr/doctype/offer_letter/offer_letter.json
index b0a95c3..39352c2 100644
--- a/erpnext/hr/doctype/offer_letter/offer_letter.json
+++ b/erpnext/hr/doctype/offer_letter/offer_letter.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Job Applicant",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicant Name",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Offer Date",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Designation",
@@ -195,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -224,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Offer Letter Terms",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -307,6 +317,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Terms and Conditions",
@@ -336,6 +347,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -365,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -393,7 +406,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:55:03.924272",
+ "modified": "2017-02-17 16:52:59.334325",
"modified_by": "Administrator",
"module": "HR",
"name": "Offer Letter",
@@ -410,7 +423,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -425,8 +437,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "applicant_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.js b/erpnext/hr/doctype/process_payroll/process_payroll.js
index cfb646d..e1bea62 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.js
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.js
@@ -10,6 +10,34 @@
frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet);
},
+ setup: function(frm) {
+ frm.set_query("payment_account", function() {
+ var account_types = ["Bank", "Cash"];
+ return {
+ filters: {
+ "account_type": ["in", account_types],
+ "is_group": 0,
+ "company": frm.doc.company
+ }
+ }
+ }),
+ frm.set_query("cost_center", function() {
+ return {
+ filters: {
+ "is_group": 0,
+ company: frm.doc.company
+ }
+ }
+ }),
+ frm.set_query("project", function() {
+ return {
+ filters: {
+ company: frm.doc.company
+ }
+ }
+ })
+ },
+
refresh: function(frm) {
frm.disable_save();
},
@@ -51,16 +79,6 @@
})
}
},
- account: function(frm) {
- var account_types = ["Bank", "Cash"];
- return {
- filters: {
- "account_type": ["in", account_types],
- "is_group": 0,
- "company": frm.doc.company
- }
- }
- }
})
cur_frm.cscript.display_activity_log = function(msg) {
@@ -105,46 +123,18 @@
});
}
-cur_frm.cscript.make_bank_entry = function(doc,cdt,cdn){
+cur_frm.cscript.make_bank_entry = function(doc, cdt, cdn){
if(doc.company && doc.start_date && doc.end_date){
- return cur_frm.cscript.reference_entry(doc,cdt,cdn);
+ return frappe.call({
+ doc: cur_frm.doc,
+ method: "make_payment_entry",
+ callback: function(r) {
+ if (r.message)
+ var doc = frappe.model.sync(r.message)[0];
+ frappe.set_route("Form", doc.doctype, doc.name);
+ }
+ });
} else {
msgprint(__("Company, From Date and To Date is mandatory"));
}
-}
-
-cur_frm.cscript.reference_entry = function(doc,cdt,cdn){
- var dialog = new frappe.ui.Dialog({
- title: __("Bank Transaction Reference"),
- fields: [
- {
- "label": __("Reference Number"),
- "fieldname": "reference_number",
- "fieldtype": "Data",
- "reqd": 1
- },
- {
- "label": __("Reference Date"),
- "fieldname": "reference_date",
- "fieldtype": "Date",
- "reqd": 1,
- "default": get_today()
- }
- ]
- });
- dialog.set_primary_action(__("Make"), function() {
- args = dialog.get_values();
- if(!args) return;
- dialog.hide();
- return frappe.call({
- doc: cur_frm.doc,
- method: "make_journal_entry",
- args: {"reference_number": args.reference_number, "reference_date":args.reference_date},
- callback: function(r) {
- if (r.message)
- cur_frm.cscript.display_activity_log(r.message);
- }
- });
- });
- dialog.show();
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.json b/erpnext/hr/doctype/process_payroll/process_payroll.json
index 7d84910..2b847b3 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.json
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.json
@@ -20,7 +20,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Employees",
@@ -47,7 +46,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -75,7 +73,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Company",
@@ -104,7 +101,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -134,7 +130,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payroll Frequency",
@@ -163,7 +158,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -190,7 +184,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Branch",
@@ -218,7 +211,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Department",
@@ -246,7 +238,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Designation",
@@ -274,7 +265,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -301,7 +291,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Slip Based on Timesheet",
@@ -329,7 +318,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Payroll Period",
@@ -358,7 +346,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Start Date",
@@ -386,7 +373,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -414,7 +400,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -437,12 +422,120 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "section_break_16",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Accounts",
+ "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": "cost_center",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Cost Center",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Cost Center",
+ "permlevel": 0,
+ "precision": "",
+ "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": "column_break_18",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "project",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Project",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Project",
+ "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": "process_payroll",
"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": "Process Payroll",
@@ -470,7 +563,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -498,7 +590,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Create Salary Slip",
@@ -525,7 +616,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -553,7 +643,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Submit Salary Slip",
@@ -580,10 +669,9 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Account",
+ "label": "Payment Entry",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -609,7 +697,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Account",
@@ -640,7 +727,6 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Bank Entry",
@@ -667,7 +753,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -693,7 +778,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Activity Log",
@@ -722,7 +806,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-14 01:48:22.326326",
+ "modified": "2017-02-08 02:34:59.130475",
"modified_by": "Administrator",
"module": "HR",
"name": "Process Payroll",
@@ -738,7 +822,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -755,5 +838,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/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py
index 7bfde1c..561ddfc 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.py
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.py
@@ -140,7 +140,7 @@
Submit all salary slips based on selected criteria
"""
self.check_permission('write')
-
+ jv_name = ""
ss_list = self.get_sal_slip_list(ss_status=0)
submitted_ss = []
not_submitted_ss = []
@@ -158,10 +158,12 @@
submitted_ss.append(ss_dict)
except frappe.ValidationError:
not_submitted_ss.append(ss_dict)
+ if submitted_ss:
+ jv_name = self.make_accural_jv_entry()
- return self.create_submit_log(submitted_ss, not_submitted_ss)
+ return self.create_submit_log(submitted_ss, not_submitted_ss, jv_name)
- def create_submit_log(self, submitted_ss, not_submitted_ss):
+ def create_submit_log(self, submitted_ss, not_submitted_ss, jv_name):
log = ''
if not submitted_ss and not not_submitted_ss:
log = "No salary slip found to submit for the above selected criteria"
@@ -171,9 +173,12 @@
dict(ss_list=submitted_ss,
keys=sorted(submitted_ss[0].keys()),
title=_('Submitted Salary Slips')))
+ if jv_name:
+ log += "<b>" + _("Accural Journal Entry Submitted") + "</b>\
+ %s" % '<br>''<a href="#Form/Journal Entry/{0}">{0}</a>'.format(jv_name)
if not_submitted_ss:
- log += frappe.render_template(self.get_log_template(),
+ log += frappe.render_template("templates/includes/salary_slip_log.html",
dict(ss_list=not_submitted_ss,
keys=sorted(not_submitted_ss[0].keys()),
title=_('Not Submitted Salary Slips')))
@@ -188,17 +193,23 @@
return ['<a href="#Form/Salary Slip/{0}">{0}</a>'.format(salary_slip)]
- def get_total_salary(self):
+ def get_total_salary_and_loan_amounts(self):
"""
- Get total salary amount from submitted salary slip based on selected criteria
+ Get total loan principal, loan interest and salary amount from submitted salary slip based on selected criteria
"""
cond = self.get_filter_condition()
- tot = frappe.db.sql("""
- select sum(rounded_total) from `tabSalary Slip` t1
+ totals = frappe.db.sql("""
+ select sum(principal_amount) as total_principal_amount, sum(interest_amount) as total_interest_amount,
+ sum(total_loan_repayment) as total_loan_repayment, sum(rounded_total) as rounded_total from `tabSalary Slip` t1
where t1.docstatus = 1 and start_date >= %s and end_date <= %s %s
- """ % ('%s', '%s', cond), (self.start_date, self.end_date))
-
- return flt(tot[0][0])
+ """ % ('%s', '%s', cond), (self.start_date, self.end_date), as_dict=True)
+ return totals[0]
+
+ def get_loan_accounts(self):
+ loan_accounts = frappe.get_all("Employee Loan", fields=["employee_loan_account", "interest_income_account"],
+ filters = {"company": self.company, "docstatus":1})
+ if loan_accounts:
+ return loan_accounts[0]
def get_salary_component_account(self, salary_component):
account = frappe.db.get_value("Salary Component Account",
@@ -233,18 +244,31 @@
account = self.get_salary_component_account(s)
account_dict[account] = account_dict.get(account, 0) + a
return account_dict
+
+ def get_default_payroll_payable_account(self):
+ payroll_payable_account = frappe.db.get_value("Company",
+ {"company_name": self.company}, "default_payroll_payable_account")
+
+ if not payroll_payable_account:
+ frappe.throw(_("Please set Default Payroll Payable Account in Company {0}")
+ .format(self.company))
+
+ return payroll_payable_account
- def make_journal_entry(self, reference_number = None, reference_date = None):
+ def make_accural_jv_entry(self):
self.check_permission('write')
earnings = self.get_salary_component_total(component_type = "earnings") or {}
deductions = self.get_salary_component_total(component_type = "deductions") or {}
+ default_payroll_payable_account = self.get_default_payroll_payable_account()
+ loan_amounts = self.get_total_salary_and_loan_amounts()
+ loan_accounts = self.get_loan_accounts()
jv_name = ""
if earnings or deductions:
journal_entry = frappe.new_doc('Journal Entry')
- journal_entry.voucher_type = 'Bank Entry'
- journal_entry.user_remark = _('Payment of salary from {0} to {1}').format(self.start_date,
+ journal_entry.voucher_type = 'Journal Entry'
+ journal_entry.user_remark = _('Accural Journal Entry for salaries from {0} to {1}').format(self.start_date,
self.end_date)
journal_entry.company = self.company
journal_entry.posting_date = nowdate()
@@ -255,22 +279,36 @@
adjustment_amt = adjustment_amt+amt
account_amt_list.append({
"account": acc,
- "debit_in_account_currency": amt
+ "debit_in_account_currency": amt,
+ "cost_center": self.cost_center,
+ "project": self.project
})
for acc, amt in deductions.items():
adjustment_amt = adjustment_amt-amt
account_amt_list.append({
"account": acc,
- "credit_in_account_currency": amt
+ "credit_in_account_currency": amt,
+ "cost_center": self.cost_center,
+ "project": self.project
})
+ #employee loan
account_amt_list.append({
- "account": self.payment_account,
+ "account": loan_accounts.employee_loan_account,
+ "credit_in_account_currency": loan_amounts.total_principal_amount
+ })
+ account_amt_list.append({
+ "account": loan_accounts.interest_income_account,
+ "credit_in_account_currency": loan_amounts.total_interest_amount,
+ "cost_center": self.cost_center,
+ "project": self.project
+ })
+ adjustment_amt = adjustment_amt-(loan_amounts.total_loan_repayment)
+
+ account_amt_list.append({
+ "account": default_payroll_payable_account,
"credit_in_account_currency": adjustment_amt
})
journal_entry.set("accounts", account_amt_list)
- journal_entry.cheque_no = reference_number
- journal_entry.cheque_date = reference_date
- journal_entry.multi_currency = 1
journal_entry.save()
try:
journal_entry.submit()
@@ -278,15 +316,33 @@
self.update_salary_slip_status(jv_name = jv_name)
except Exception, e:
frappe.msgprint(e)
- return self.create_jv_log(jv_name)
+ return jv_name
+ def make_payment_entry(self):
+ self.check_permission('write')
+ total_salary_amount = self.get_total_salary_and_loan_amounts()
+ default_payroll_payable_account = self.get_default_payroll_payable_account()
- def create_jv_log(self, jv_name):
- log = "<p>" + _("No submitted Salary Slip found") + "</p>"
- if jv_name:
- log = "<b>" + _("Journal Entry Submitted") + "</b>\
- %s" % '<br>''<a href="#Form/Journal Entry/{0}">{0}</a>'.format(jv_name)
- return log
+ if total_salary_amount.rounded_total:
+ journal_entry = frappe.new_doc('Journal Entry')
+ journal_entry.voucher_type = 'Bank Entry'
+ journal_entry.user_remark = _('Payment of salary from {0} to {1}').format(self.start_date,
+ self.end_date)
+ journal_entry.company = self.company
+ journal_entry.posting_date = nowdate()
+
+ account_amt_list = []
+
+ account_amt_list.append({
+ "account": self.payment_account,
+ "credit_in_account_currency": total_salary_amount.rounded_total
+ })
+ account_amt_list.append({
+ "account": default_payroll_payable_account,
+ "debit_in_account_currency": total_salary_amount.rounded_total
+ })
+ journal_entry.set("accounts", account_amt_list)
+ return journal_entry.as_dict()
def update_salary_slip_status(self, jv_name = None):
ss_list = self.get_sal_slip_list(ss_status=1)
diff --git a/erpnext/hr/doctype/process_payroll/test_process_payroll.py b/erpnext/hr/doctype/process_payroll/test_process_payroll.py
index 2eb1c6b..6347a2a 100644
--- a/erpnext/hr/doctype/process_payroll/test_process_payroll.py
+++ b/erpnext/hr/doctype/process_payroll/test_process_payroll.py
@@ -29,7 +29,7 @@
process_payroll.create_salary_slips()
process_payroll.submit_salary_slips()
if process_payroll.get_sal_slip_list(ss_status = 1):
- r = process_payroll.make_journal_entry(reference_number=random_string(10),reference_date=nowdate())
+ r = process_payroll.make_payment_entry()
def get_salary_component_account(sal_comp):
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/hr/doctype/repayment_schedule/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/hr/doctype/repayment_schedule/__init__.py
diff --git a/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json b/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json
new file mode 100644
index 0000000..3a0dfd3
--- /dev/null
+++ b/erpnext/hr/doctype/repayment_schedule/repayment_schedule.json
@@ -0,0 +1,179 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "beta": 0,
+ "creation": "2016-12-20 15:32:25.078334",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 2,
+ "fieldname": "payment_date",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Payment Date",
+ "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": 2,
+ "fieldname": "principal_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Principal Amount",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": 2,
+ "fieldname": "interest_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Interest Amount",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": 2,
+ "fieldname": "total_payment",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Total Payment",
+ "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": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 2,
+ "fieldname": "balance_loan_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Balance Loan Amount",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 1,
+ "max_attachments": 0,
+ "modified": "2017-01-09 12:00:10.818772",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Repayment Schedule",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/hr/doctype/repayment_schedule/repayment_schedule.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/hr/doctype/repayment_schedule/repayment_schedule.py
index 85c1b32..8abee5e 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/hr/doctype/repayment_schedule/repayment_schedule.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class RepaymentSchedule(Document):
pass
diff --git a/erpnext/hr/doctype/salary_component/salary_component.js b/erpnext/hr/doctype/salary_component/salary_component.js
index 3ed566e..86203ab 100644
--- a/erpnext/hr/doctype/salary_component/salary_component.js
+++ b/erpnext/hr/doctype/salary_component/salary_component.js
@@ -2,7 +2,17 @@
// For license information, please see license.txt
frappe.ui.form.on('Salary Component', {
- refresh: function(frm) {
-
+ setup: function(frm) {
+ frm.set_query("default_account", "accounts", function(doc, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ var root_types = ["Expense", "Liability"];
+ return {
+ filters: {
+ "root_type": ["in", root_types],
+ "is_group": 0,
+ "company": d.company
+ }
+ }
+ })
}
-});
+});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_component/salary_component.py b/erpnext/hr/doctype/salary_component/salary_component.py
index 8af7311..c02d952 100644
--- a/erpnext/hr/doctype/salary_component/salary_component.py
+++ b/erpnext/hr/doctype/salary_component/salary_component.py
@@ -21,4 +21,4 @@
frappe.throw(_("Abbreviation cannot have more than 5 characters"))
if frappe.db.sql("select salary_component_abbr from `tabSalary Component` where name!=%s and salary_component_abbr=%s", (self.name, self.salary_component_abbr)):
- frappe.throw(_("Abbreviation already used for another salary component"))
\ No newline at end of file
+ frappe.throw(_("Abbreviation {0} already used for another salary component").format(self.salary_component_abbr))
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js
index 8b0dd16..afff67b 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.js
@@ -38,6 +38,7 @@
refresh: function(frm) {
frm.trigger("toggle_fields")
+ frm.trigger("toggle_reqd_fields")
salary_detail_fields = ['formula', 'abbr']
cur_frm.fields_dict['earnings'].grid.set_column_disp(salary_detail_fields,false);
cur_frm.fields_dict['deductions'].grid.set_column_disp(salary_detail_fields,false);
@@ -58,9 +59,9 @@
frm.toggle_display(['payment_days', 'total_working_days', 'leave_without_pay'],
frm.doc.payroll_frequency!="");
}
+
})
-
// Get leave details
//---------------------------------------------------------------------
cur_frm.cscript.start_date = function(doc, dt, dn){
@@ -110,6 +111,7 @@
calculate_earning_total(doc, dt, dn, true);
calculate_ded_total(doc, dt, dn, true);
calculate_net_pay(doc, dt, dn);
+ refresh_many(['amount','gross_pay', 'rounded_total', 'net_pay', 'loan_repayment']);
};
// Calculate earning total
@@ -129,7 +131,7 @@
total_earn += flt(tbl[i].amount);
}
- doc.gross_pay = total_earn + flt(doc.arrear_amount) + flt(doc.leave_encashment_amount);
+ doc.gross_pay = total_earn;
refresh_many(['amount','gross_pay']);
}
@@ -160,17 +162,6 @@
refresh_many(['net_pay', 'rounded_total']);
}
-// trigger on arrear
-// ------------------------------------------------------------------------
-cur_frm.cscript.arrear_amount = function(doc,dt,dn){
- calculate_earning_total(doc, dt, dn);
- calculate_net_pay(doc, dt, dn);
-}
-
-// trigger on encashed amount
-// ------------------------------------------------------------------------
-cur_frm.cscript.leave_encashment_amount = cur_frm.cscript.arrear_amount;
-
// validate
// ------------------------------------------------------------------------
cur_frm.cscript.validate = function(doc, dt, dn) {
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json
index e558d73..03628e8 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.json
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -78,7 +80,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Employee",
@@ -108,7 +111,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -138,7 +142,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Department",
@@ -169,7 +174,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Designation",
@@ -199,7 +205,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Branch",
@@ -230,6 +237,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -258,6 +266,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -282,16 +291,18 @@
"collapsible": 0,
"columns": 0,
"fieldname": "journal_entry",
- "fieldtype": "Data",
+ "fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Journal Entry",
"length": 0,
"no_copy": 0,
+ "options": "Journal Entry",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -314,7 +325,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -343,6 +355,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -371,6 +384,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -399,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Slip Based on Timesheet",
@@ -429,6 +444,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Start Date",
@@ -459,6 +475,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -487,6 +504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -515,6 +533,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Structure",
@@ -546,6 +565,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payroll Frequency",
@@ -576,6 +596,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Working Days",
@@ -606,6 +627,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Leave Without Pay",
@@ -636,6 +658,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Days",
@@ -666,6 +689,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -695,6 +719,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Slip Timesheet",
@@ -724,6 +749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -751,6 +777,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Working Hours",
@@ -779,11 +806,13 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Hour Rate",
"length": 0,
"no_copy": 0,
+ "options": "Company:company:default_currency",
"permlevel": 0,
"precision": "2",
"print_hide": 0,
@@ -808,6 +837,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -836,6 +866,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Name",
@@ -865,6 +896,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bank Account No.",
@@ -894,6 +926,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -921,6 +954,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -951,6 +985,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Earning & Deduction",
@@ -979,6 +1014,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Earning",
@@ -1009,6 +1045,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Earnings",
@@ -1039,6 +1076,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deduction",
@@ -1068,6 +1106,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deductions",
@@ -1098,6 +1137,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1120,72 +1160,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "arrear_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Arrear Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "arrear_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "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": "leave_encashment_amount",
- "fieldtype": "Currency",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Leave Encashment Amount",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "encashment_amount",
- "oldfieldtype": "Currency",
- "options": "Company:company:default_currency",
- "permlevel": 0,
- "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": "gross_pay",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gross Pay",
@@ -1216,6 +1197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1242,6 +1224,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Deduction",
@@ -1266,13 +1249,191 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "description": "Gross Pay + Arrear Amount +Encashment Amount - Total Deduction",
+ "depends_on": "total_loan_repayment",
+ "fieldname": "loan_repayment",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Loan repayment",
+ "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": "principal_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Principal Amount",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": "interest_amount",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Interest Amount",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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_48",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "total_loan_repayment",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Total Loan Repayment",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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": "net_pay_info",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "net pay info",
+ "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,
+ "description": "Gross Pay - Total Deduction - Loan Repayment",
"fieldname": "net_pay",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Pay",
@@ -1294,6 +1455,34 @@
},
{
"allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "column_break_53",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": 1,
"collapsible": 0,
"columns": 0,
@@ -1303,6 +1492,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total",
@@ -1325,6 +1515,34 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "section_break_55",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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,
"description": "Net Pay (in words) will be visible once you save the Salary Slip.",
"fieldname": "total_in_words",
"fieldtype": "Data",
@@ -1332,6 +1550,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total in words",
@@ -1362,7 +1581,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-14 08:26:31.400930",
+ "modified": "2017-02-22 06:11:01.882797",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Slip",
@@ -1378,7 +1597,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1400,7 +1618,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1413,7 +1630,7 @@
},
{
"amend": 0,
- "apply_user_permissions": 0,
+ "apply_user_permissions": 1,
"cancel": 0,
"create": 0,
"delete": 0,
@@ -1421,7 +1638,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1430,15 +1646,18 @@
"set_user_permissions": 0,
"share": 0,
"submit": 0,
+ "user_permission_doctypes": "[\"Employee\"]",
"write": 0
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "employee",
"title_field": "employee_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index eeec6e8..6ff6f36 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -89,8 +89,8 @@
frappe.throw(_("Name error: {0}".format(err)))
except SyntaxError as err:
frappe.throw(_("Syntax error in formula or condition: {0}".format(err)))
- except:
- frappe.throw(_("Error in formula or condition"))
+ except Exception, e:
+ frappe.throw(_("Error in formula or condition: {0}".format(e)))
raise
def get_data_for_eval(self):
@@ -99,7 +99,7 @@
for d in self._salary_structure_doc.employees:
if d.employee == self.employee:
- data.base, data.variable = d.base, d.variable
+ data.update(frappe.get_doc("Salary Structure Employee", {"employee": self.employee}).as_dict())
data.update(frappe.get_doc("Employee", self.employee).as_dict())
data.update(self.as_dict())
@@ -108,7 +108,6 @@
salary_components = frappe.get_all("Salary Component", fields=["salary_component_abbr"])
for salary_component in salary_components:
data[salary_component.salary_component_abbr] = 0
-
return data
@@ -156,11 +155,10 @@
cond = """and payroll_frequency = '%(payroll_frequency)s'""" % {"payroll_frequency": self.payroll_frequency}
st_name = frappe.db.sql("""select parent from `tabSalary Structure Employee`
- where employee=%s
+ where employee=%s and (from_date <= %s or from_date <= %s)
+ and (to_date is null or to_date >= %s or to_date >= %s)
and parent in (select name from `tabSalary Structure`
- where is_active = 'Yes'
- and (from_date <= %s or from_date <= %s)
- and (to_date is null or to_date >= %s or to_date >= %s) %s)
+ where is_active = 'Yes'%s)
"""% ('%s', '%s', '%s','%s','%s', cond),(self.employee, self.start_date, joining_date, self.end_date, relieving_date))
if st_name:
@@ -284,6 +282,7 @@
where t2.name = t1.leave_type
and t2.is_lwp = 1
and t1.docstatus = 1
+ and t1.status = 'Approved'
and t1.employee = %(employee)s
and CASE WHEN t2.include_holiday != 1 THEN %(dt)s not in ('{0}') and %(dt)s between from_date and to_date
WHEN t2.include_holiday THEN %(dt)s between from_date and to_date
@@ -324,16 +323,29 @@
disable_rounded_total = cint(frappe.db.get_value("Global Defaults", None, "disable_rounded_total"))
- self.gross_pay = flt(self.arrear_amount) + flt(self.leave_encashment_amount)
self.total_deduction = 0
+ self.gross_pay = 0
self.sum_components('earnings', 'gross_pay')
self.sum_components('deductions', 'total_deduction')
+
+ self.set_loan_repayment()
- self.net_pay = flt(self.gross_pay) - flt(self.total_deduction)
+ self.net_pay = flt(self.gross_pay) - (flt(self.total_deduction) + flt(self.total_loan_repayment))
self.rounded_total = rounded(self.net_pay,
self.precision("net_pay") if disable_rounded_total else 0)
+ def set_loan_repayment(self):
+ employee_loan = frappe.db.sql("""select sum(principal_amount) as principal_amount, sum(interest_amount) as interest_amount,
+ sum(total_payment) as total_loan_repayment from `tabRepayment Schedule`
+ where payment_date between %s and %s and parent in (select name from `tabEmployee Loan`
+ where employee = %s and repay_from_salary = 1 and docstatus = 1)""",
+ (self.start_date, self.end_date, self.employee), as_dict=True)
+ if employee_loan:
+ self.principal_amount = employee_loan[0].principal_amount
+ self.interest_amount = employee_loan[0].interest_amount
+ self.total_loan_repayment = employee_loan[0].total_loan_repayment
+
def on_submit(self):
if self.net_pay < 0:
frappe.throw(_("Net Pay cannot be less than 0"))
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index 3d119c3..ce20396 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -7,14 +7,14 @@
import erpnext
import calendar
from erpnext.accounts.utils import get_fiscal_year
-from frappe.utils import getdate, nowdate, add_days
+from frappe.utils import getdate, nowdate, add_days, add_months, flt
from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.hr.doctype.process_payroll.test_process_payroll import get_salary_component_account
from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
class TestSalarySlip(unittest.TestCase):
def setUp(self):
- make_earning_salary_component(["Basic Salary", "Allowance", "HRA"])
+ make_earning_salary_component(["Basic Salary", "Special Allowance", "HRA"])
make_deduction_salary_component(["Professional Tax", "TDS"])
for dt in ["Leave Application", "Leave Allocation", "Salary Slip"]:
@@ -24,7 +24,6 @@
frappe.db.set_value("Company", erpnext.get_default_company(), "default_holiday_list", "Salary Slip Test Holiday List")
-
def tearDown(self):
frappe.db.set_value("HR Settings", None, "include_holidays_in_total_working_days", 0)
frappe.set_user("Administrator")
@@ -40,12 +39,12 @@
self.assertEquals(ss.total_working_days, no_of_days[0])
self.assertEquals(ss.payment_days, no_of_days[0])
- self.assertEquals(ss.earnings[0].amount, 5000)
+ self.assertEquals(ss.earnings[0].amount, 25000)
self.assertEquals(ss.earnings[1].amount, 3000)
self.assertEquals(ss.deductions[0].amount, 5000)
- self.assertEquals(ss.deductions[1].amount, 2500)
- self.assertEquals(ss.gross_pay, 10500)
- self.assertEquals(ss.net_pay, 3000)
+ self.assertEquals(ss.deductions[1].amount, 5000)
+ self.assertEquals(ss.gross_pay, 40500)
+ self.assertEquals(ss.net_pay, 29918)
def test_salary_slip_with_holidays_excluded(self):
no_of_days = self.get_no_of_days()
@@ -58,13 +57,13 @@
self.assertEquals(ss.total_working_days, no_of_days[0] - no_of_days[1])
self.assertEquals(ss.payment_days, no_of_days[0] - no_of_days[1])
- self.assertEquals(ss.earnings[0].amount, 5000)
- self.assertEquals(ss.earnings[0].default_amount, 5000)
+ self.assertEquals(ss.earnings[0].amount, 25000)
+ self.assertEquals(ss.earnings[0].default_amount, 25000)
self.assertEquals(ss.earnings[1].amount, 3000)
self.assertEquals(ss.deductions[0].amount, 5000)
- self.assertEquals(ss.deductions[1].amount, 2500)
- self.assertEquals(ss.gross_pay, 10500)
- self.assertEquals(ss.net_pay, 3000)
+ self.assertEquals(ss.deductions[1].amount, 5000)
+ self.assertEquals(ss.gross_pay, 40500)
+ self.assertEquals(ss.net_pay, 29918)
def test_payment_days(self):
no_of_days = self.get_no_of_days()
@@ -130,9 +129,23 @@
ss = frappe.get_doc("Salary Slip",
self.make_employee_salary_slip("test_employee@salary.com", "Monthly"))
ss.submit()
+
email_queue = frappe.db.sql("""select name from `tabEmail Queue`""")
self.assertTrue(email_queue)
+ def test_loan_repayment_salary_slip(self):
+ from erpnext.hr.doctype.employee_loan.test_employee_loan import create_loan_type, create_employee_loan
+ employee = self.make_employee("test_employee@salary.com")
+ create_loan_type("Car Loan", 500000, 6.4)
+ employee_loan = create_employee_loan(employee, "Car Loan", 11000, "Repay Over Number of Periods", 20)
+ employee_loan.repay_from_salary = 1
+ employee_loan.submit()
+ ss = frappe.get_doc("Salary Slip",
+ self.make_employee_salary_slip("test_employee@salary.com", "Monthly"))
+ ss.submit()
+ self.assertEquals(ss.total_loan_repayment, 582)
+ self.assertEquals(ss.net_pay, (flt(ss.gross_pay) - (flt(ss.total_deduction) + flt(ss.total_loan_repayment))))
+
def test_payroll_frequency(self):
fiscal_year = get_fiscal_year(nowdate(), company="_Test Company")[0]
month = "%02d" % getdate(nowdate()).month
@@ -167,7 +180,7 @@
}).insert()
if not frappe.db.get_value("Employee", {"user_id": user}):
- frappe.get_doc({
+ employee = frappe.get_doc({
"doctype": "Employee",
"naming_series": "EMP-",
"employee_name": user,
@@ -183,6 +196,9 @@
"status": "Active",
"employment_type": "Intern"
}).insert()
+ return employee.name
+ else:
+ return frappe.get_value("Employee", {"employee_name":user}, "name")
def make_holiday_list(self):
fiscal_year = get_fiscal_year(nowdate(), company="_Test Company")
@@ -257,7 +273,6 @@
"doctype": "Salary Structure",
"name": sal_struct,
"company": erpnext.get_default_company(),
- "from_date": nowdate(),
"employees": get_employee_details(employee),
"earnings": get_earnings_component(),
"deductions": get_deductions_component(),
@@ -270,7 +285,8 @@
sal_struct.append("employees", {"employee": employee,
"employee_name": employee,
"base": 32000,
- "variable": 3200
+ "variable": 3200,
+ "from_date": add_months(nowdate(),-1)
})
sal_struct.save()
sal_struct = sal_struct.name
@@ -278,8 +294,9 @@
def get_employee_details(employee):
return [{"employee": employee,
- "base": 25000,
- "variable": 5000
+ "base": 50000,
+ "variable": 5000,
+ "from_date": add_months(nowdate(),-1)
}
]
@@ -289,14 +306,14 @@
"salary_component": 'Basic Salary',
"abbr":'BS',
"condition": 'base > 10000',
- "formula": 'base*.2',
+ "formula": 'base*.5',
"idx": 1
},
{
"salary_component": 'Basic Salary',
"abbr":'BS',
"condition": 'base < 10000',
- "formula": 'base*.1',
+ "formula": 'base*.2',
"idx": 2
},
{
@@ -306,8 +323,8 @@
"idx": 3
},
{
- "salary_component": 'Allowance',
- "abbr":'A',
+ "salary_component": 'Special Allowance',
+ "abbr":'SA',
"condition": 'H < 10000',
"formula": 'BS*.5',
"idx": 4
@@ -320,13 +337,13 @@
"salary_component": 'Professional Tax',
"abbr":'PT',
"condition": 'base > 10000',
- "formula": 'base*.2',
+ "formula": 'base*.1',
"idx": 1
},
{
"salary_component": 'TDS',
"abbr":'T',
- "formula": 'base*.5',
+ "formula": 'base*.1',
"idx": 2
},
{
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json
index ca59ded..4145fcb 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.json
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -48,7 +49,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -77,6 +79,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -100,43 +103,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "default": "Monthly",
- "depends_on": "eval:(!doc.salary_slip_based_on_timesheet)",
- "fieldname": "payroll_frequency",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Payroll Frequency",
- "length": 0,
- "no_copy": 0,
- "options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily",
- "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_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -164,7 +137,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Is Active",
@@ -189,6 +163,38 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "default": "Monthly",
+ "depends_on": "eval:(!doc.salary_slip_based_on_timesheet)",
+ "fieldname": "payroll_frequency",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Payroll Frequency",
+ "length": 0,
+ "no_copy": 0,
+ "options": "\nMonthly\nFortnightly\nBimonthly\nWeekly\nDaily",
+ "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,
"default": "No",
"fieldname": "is_default",
"fieldtype": "Select",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Default",
@@ -219,70 +226,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "from_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "From Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "from_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "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": "to_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "To Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "to_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "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": "employee_break",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -311,6 +261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employees",
@@ -340,6 +291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -369,6 +321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Slip Based on Timesheet",
@@ -397,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -426,6 +380,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Component",
@@ -456,11 +411,13 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Hour Rate",
"length": 0,
"no_copy": 0,
+ "options": "Company:company:default_currency",
"permlevel": 0,
"precision": "2",
"print_hide": 0,
@@ -486,6 +443,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -516,6 +474,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Earning",
@@ -547,6 +506,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Earnings",
@@ -577,6 +537,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deduction",
@@ -607,6 +568,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Deductions",
@@ -638,6 +600,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -665,6 +628,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -692,6 +656,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Earning",
@@ -722,6 +687,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Deduction",
@@ -752,6 +718,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Pay",
@@ -780,6 +747,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Account",
@@ -808,6 +776,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mode of Payment",
@@ -837,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -864,6 +834,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payment Account",
@@ -894,7 +865,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-11 02:02:10.848614",
+ "modified": "2017-02-22 06:09:55.491748",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure",
@@ -910,7 +881,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -928,10 +898,9 @@
"create": 1,
"delete": 1,
"email": 1,
- "export": 0,
+ "export": 1,
"if_owner": 0,
- "import": 0,
- "is_custom": 0,
+ "import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -946,9 +915,11 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "",
"title_field": "",
+ "track_changes": 0,
"track_seen": 0
-}
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py
index 13622c3..22697f0 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.py
@@ -4,8 +4,7 @@
from __future__ import unicode_literals
import frappe
-from frappe.utils import cstr, flt, getdate, cint
-from frappe.model.naming import make_autoname
+from frappe.utils import flt, cint, getdate
from frappe import _
from frappe.model.mapper import get_mapped_doc
from frappe.model.document import Document
@@ -15,9 +14,9 @@
def validate(self):
self.validate_amount()
- self.validate_joining_date()
for e in self.get('employees'):
set_employee_name(e)
+ self.validate_joining_date()
def get_ss_values(self,employee):
basic_info = frappe.db.sql("""select bank_name, bank_ac_no
@@ -33,15 +32,21 @@
def validate_joining_date(self):
for e in self.get('employees'):
joining_date = getdate(frappe.db.get_value("Employee", e.employee, "date_of_joining"))
- if getdate(self.from_date) < joining_date:
- frappe.throw(_("From Date in Salary Structure cannot be lesser than Employee Joining Date."))
-
+ if e.from_date and getdate(e.from_date) < joining_date:
+ frappe.throw(_("From Date {0} for Employee {1} cannot be before employee's joining Date {2}")
+ .format(e.from_date, e.employee, joining_date))
@frappe.whitelist()
def make_salary_slip(source_name, target_doc = None, employee = None, as_print = False, print_format = None):
def postprocess(source, target):
if employee:
+ employee_details = frappe.db.get_value("Employee", employee,
+ ["employee_name", "branch", "designation", "department"], as_dict=1)
target.employee = employee
+ target.employee_name = employee_details.employee_name
+ target.branch = employee_details.branch
+ target.designation = employee_details.designation
+ target.department = employee_details.department
target.run_method('process_salary_structure')
doc = get_mapped_doc("Salary Structure", source_name, {
diff --git a/erpnext/hr/doctype/salary_structure/test_salary_structure.py b/erpnext/hr/doctype/salary_structure/test_salary_structure.py
index fe88d9a..7270ab7 100644
--- a/erpnext/hr/doctype/salary_structure/test_salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/test_salary_structure.py
@@ -6,7 +6,7 @@
import unittest
import erpnext
from frappe.utils.make_random import get_random
-from frappe.utils import nowdate, add_days, add_years, getdate
+from frappe.utils import nowdate, add_days, add_years, getdate, add_months
from erpnext.hr.doctype.salary_structure.salary_structure import make_salary_slip
from erpnext.hr.doctype.salary_slip.test_salary_slip \
import make_earning_salary_component, make_deduction_salary_component
@@ -17,10 +17,10 @@
def setUp(self):
self.make_holiday_list()
frappe.db.set_value("Company", erpnext.get_default_company(), "default_holiday_list", "Salary Structure Test Holiday List")
- make_earning_salary_component(["Basic Salary", "Allowance", "HRA"])
+ make_earning_salary_component(["Basic Salary", "Special Allowance", "HRA"])
make_deduction_salary_component(["Professional Tax", "TDS"])
- self.make_employee("test_employee@salary.com")
- self.make_employee("test_employee_2@salary.com")
+ make_employee("test_employee@salary.com")
+ make_employee("test_employee_2@salary.com")
def make_holiday_list(self):
if not frappe.db.get_value("Holiday List", "Salary Structure Test Holiday List"):
@@ -33,37 +33,6 @@
}).insert()
holiday_list.get_weekly_off_dates()
holiday_list.save()
-
- def make_employee(self, user):
- if not frappe.db.get_value("User", user):
- frappe.get_doc({
- "doctype": "User",
- "email": user,
- "first_name": user,
- "new_password": "password",
- "user_roles": [{"doctype": "UserRole", "role": "Employee"}]
- }).insert()
-
-
- if not frappe.db.get_value("Employee", {"user_id": user}):
- emp = frappe.get_doc({
- "doctype": "Employee",
- "naming_series": "EMP-",
- "employee_name": user,
- "company": erpnext.get_default_company(),
- "user_id": user,
- "date_of_birth": "1990-05-08",
- "date_of_joining": "2013-01-01",
- "relieving_date": "",
- "department": frappe.get_all("Department", fields="name")[0].name,
- "gender": "Female",
- "company_email": user,
- "status": "Active",
- "employment_type": "Intern"
- }).insert()
- return emp.name
- else:
- return frappe.get_value("Employee", {"employee_name":user}, "name")
def test_amount_totals(self):
sal_slip = frappe.get_value("Salary Slip", {"employee_name":"test_employee@salary.com"})
@@ -76,6 +45,36 @@
self.assertEquals(sal_slip.get("total_deduction"), 7500)
self.assertEquals(sal_slip.get("net_pay"), 7500)
+def make_employee(user):
+ if not frappe.db.get_value("User", user):
+ frappe.get_doc({
+ "doctype": "User",
+ "email": user,
+ "first_name": user,
+ "new_password": "password",
+ "user_roles": [{"doctype": "UserRole", "role": "Employee"}]
+ }).insert()
+
+
+ if not frappe.db.get_value("Employee", {"user_id": user}):
+ emp = frappe.get_doc({
+ "doctype": "Employee",
+ "naming_series": "EMP-",
+ "employee_name": user,
+ "company": erpnext.get_default_company(),
+ "user_id": user,
+ "date_of_birth": "1990-05-08",
+ "date_of_joining": "2013-01-01",
+ "relieving_date": "",
+ "department": frappe.get_all("Department", fields="name")[0].name,
+ "gender": "Female",
+ "company_email": user,
+ "status": "Active",
+ "employment_type": "Intern"
+ }).insert()
+ return emp.name
+ else:
+ return frappe.get_value("Employee", {"employee_name":user}, "name")
def make_salary_slip_from_salary_structure(employee):
sal_struct = make_salary_structure('Salary Structure Sample')
@@ -94,7 +93,6 @@
"doctype": "Salary Structure",
"name": sal_struct,
"company": erpnext.get_default_company(),
- "from_date": nowdate(),
"employees": get_employee_details(),
"earnings": get_earnings_component(),
"deductions": get_deductions_component(),
@@ -108,11 +106,13 @@
return [{"employee": frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"),
"base": 25000,
"variable": 5000,
+ "from_date": add_months(nowdate(),-1),
"idx": 1
},
{"employee": frappe.get_value("Employee", {"employee_name":"test_employee_2@salary.com"}, "name"),
"base": 15000,
"variable": 100,
+ "from_date": add_months(nowdate(),-1),
"idx": 2
}
]
@@ -140,8 +140,8 @@
"idx": 3
},
{
- "salary_component": 'Allowance',
- "abbr":'A',
+ "salary_component": 'Special Allowance',
+ "abbr":'SA',
"condition": 'H < 10000',
"formula": 'BS*.5',
"idx": 4
diff --git a/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json b/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json
index aae33e3..0e238d3 100644
--- a/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json
+++ b/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json
@@ -10,18 +10,22 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "employee",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Employee",
"length": 0,
"no_copy": 0,
@@ -31,6 +35,7 @@
"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,
@@ -41,21 +46,26 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "employee_name",
- "fieldtype": "Data",
+ "fieldtype": "Read Only",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
+ "options": "employee.employee_name",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -66,14 +76,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "base",
- "fieldtype": "Currency",
+ "columns": 0,
+ "fieldname": "from_date",
+ "fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
- "label": "Base",
+ "in_standard_filter": 0,
+ "label": "From Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -81,6 +93,7 @@
"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,
@@ -91,14 +104,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "variable",
- "fieldtype": "Currency",
+ "columns": 0,
+ "fieldname": "to_date",
+ "fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 1,
- "label": "Variable",
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "To Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -106,6 +121,67 @@
"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": "base",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Base",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "permlevel": 0,
+ "precision": "",
+ "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": "variable",
+ "fieldtype": "Currency",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Variable",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company:company:default_currency",
+ "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,
@@ -123,7 +199,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-08-11 12:18:14.526977",
+ "modified": "2017-02-23 17:08:44.518424",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure Employee",
@@ -133,7 +209,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
-}
\ No newline at end of file
+}
diff --git a/erpnext/hr/doctype/training_event/training_event.json b/erpnext/hr/doctype/training_event/training_event.json
index 610ec05..1f79d23 100644
--- a/erpnext/hr/doctype/training_event/training_event.json
+++ b/erpnext/hr/doctype/training_event/training_event.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Event Name",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Event Status",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -106,6 +109,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Type",
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -162,6 +167,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Trainer Name",
@@ -190,6 +196,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Trainer Email",
@@ -219,6 +226,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -246,6 +254,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -275,6 +284,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Number",
@@ -303,6 +313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -330,6 +341,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Course",
@@ -359,6 +371,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Location",
@@ -387,6 +400,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -414,6 +428,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Start Time",
@@ -442,6 +457,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Time",
@@ -470,6 +486,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -497,6 +514,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Introduction",
@@ -525,6 +543,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Attendees",
@@ -554,6 +573,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Send Email",
@@ -582,6 +602,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employees",
@@ -611,6 +632,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -639,7 +661,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:49:36.135608",
+ "modified": "2017-02-17 16:51:35.141403",
"modified_by": "Administrator",
"module": "HR",
"name": "Training Event",
@@ -656,7 +678,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -672,8 +693,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "event_name",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "event_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/training_feedback/training_feedback.json b/erpnext/hr/doctype/training_feedback/training_feedback.json
index e45c694..ece6ed1 100644
--- a/erpnext/hr/doctype/training_feedback/training_feedback.json
+++ b/erpnext/hr/doctype/training_feedback/training_feedback.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Employee",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Course",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Training Event",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Event Name",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Trainer Name",
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -248,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Feedback",
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -304,7 +314,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:49:55.261774",
+ "modified": "2017-02-17 17:09:26.052837",
"modified_by": "Administrator",
"module": "HR",
"name": "Training Feedback",
@@ -321,7 +331,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -342,7 +351,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -357,8 +365,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "employee_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/vehicle_log/vehicle_log.json b/erpnext/hr/doctype/vehicle_log/vehicle_log.json
index a2cfa27..3610da4 100644
--- a/erpnext/hr/doctype/vehicle_log/vehicle_log.json
+++ b/erpnext/hr/doctype/vehicle_log/vehicle_log.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -78,7 +80,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "License Plate",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Employee",
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -191,6 +197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Model",
@@ -219,6 +226,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make",
@@ -247,6 +255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Odometer Reading",
@@ -275,6 +284,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -303,6 +313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Odometer",
@@ -331,6 +342,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Refuelling Details",
@@ -359,6 +371,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fuel Qty",
@@ -387,6 +400,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fuel Price",
@@ -415,6 +429,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -442,6 +457,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -471,6 +487,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Invoice Ref",
@@ -499,6 +516,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Service_Details",
@@ -527,6 +545,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Service Detail",
@@ -556,6 +575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -584,6 +604,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Make Expense Claim",
@@ -612,6 +633,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -640,7 +662,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-09 11:10:21.208266",
+ "modified": "2017-02-17 16:53:17.975663",
"modified_by": "Administrator",
"module": "HR",
"name": "Vehicle Log",
@@ -657,7 +679,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -672,6 +693,7 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "",
diff --git a/erpnext/schools/doctype/topic/__init__.py b/erpnext/hr/page/team_updates/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/topic/__init__.py
copy to erpnext/hr/page/team_updates/__init__.py
diff --git a/erpnext/hr/page/team_updates/team_update_row.html b/erpnext/hr/page/team_updates/team_update_row.html
new file mode 100644
index 0000000..e3adcb8
--- /dev/null
+++ b/erpnext/hr/page/team_updates/team_update_row.html
@@ -0,0 +1,15 @@
+<div class="row activity-row" data-creation="{%= creation.split(" ")[0] + " 00:00:00" %}">
+ <div class="col-xs-3 text-right activity-date"><span class="{%= date_class %}">
+ {%= date_sep || "" %}</span></div>
+ <div class="col-xs-9 activity-message"
+ title="{%= by %} / {%= dateutil.str_to_user(creation) %}">
+ <div class="row">
+ <div class="col-xs-2 col-sm-1">
+ {{ avatar }}
+ </div>
+ <div class="col-xs-10 col-sm-11 small content">
+ {{ content }}
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/erpnext/hr/page/team_updates/team_updates.css b/erpnext/hr/page/team_updates/team_updates.css
new file mode 100644
index 0000000..d37e782
--- /dev/null
+++ b/erpnext/hr/page/team_updates/team_updates.css
@@ -0,0 +1,57 @@
+.date-indicator {
+ background:none;
+ font-size:12px;
+ vertical-align:middle;
+ font-weight:bold;
+ color:#6c7680;
+}
+.date-indicator::after {
+ margin:0 -4px 0 12px;
+ content:'';
+ display:inline-block;
+ height:8px;
+ width:8px;
+ border-radius:8px;
+ background: #d1d8dd;
+}
+
+.date-indicator.blue {
+ color: #5e64ff;
+}
+
+.date-indicator.blue::after {
+ background: #5e64ff;
+}
+
+.activity-row {
+}
+
+.activity-message {
+ border-left: 1px solid #d1d8dd;
+}
+
+.activity-message .row {
+ padding: 15px;
+ margin-right: 0px;
+ border-bottom: 1px solid #d1d8dd;
+}
+
+.activity-row:last-child .activity-message .row {
+ border-bottom: none;
+}
+
+.activity-row .content {
+ padding-left: 0px;
+ padding-right: 30px;
+}
+
+.activity-date {
+ padding: 15px;
+ padding-right: 0px;
+ z-index: 1;
+}
+
+.for-more {
+ border-top: 1px solid #d1d8dd;
+ padding: 10px;
+}
diff --git a/erpnext/hr/page/team_updates/team_updates.js b/erpnext/hr/page/team_updates/team_updates.js
new file mode 100644
index 0000000..e701b5f
--- /dev/null
+++ b/erpnext/hr/page/team_updates/team_updates.js
@@ -0,0 +1,79 @@
+frappe.pages['team-updates'].on_page_load = function(wrapper) {
+ var page = frappe.ui.make_app_page({
+ parent: wrapper,
+ title: __('Team Updates'),
+ single_column: true
+ });
+
+ frappe.team_updates.make(page);
+ frappe.team_updates.run();
+
+ if(frappe.model.can_read('Daily Work Summary Settings')) {
+ page.add_menu_item(__('Daily Work Summary Settings'), function() {
+ frappe.set_route('Form', 'Daily Work Summary Settings');
+ });
+ }
+}
+
+frappe.team_updates = {
+ start: 0,
+ make: function(page) {
+ var me = frappe.team_updates;
+ me.page = page;
+ me.body = $('<div></div>').appendTo(me.page.main);
+ me.more = $('<div class="for-more"><button class="btn btn-sm btn-default btn-more">'
+ + __("More") + '</button></div>').appendTo(me.page.main)
+ .find('.btn-more').on('click', function() {
+ me.start += 40;
+ me.run();
+ });
+ },
+ run: function() {
+ var me = frappe.team_updates;
+ frappe.call({
+ method: 'erpnext.hr.page.team_updates.team_updates.get_data',
+ args: {
+ start: me.start
+ },
+ callback: function(r) {
+ if(r.message) {
+ r.message.forEach(function(d) {
+ me.add_row(d);
+ });
+ } else {
+ frappe.show_alert({message:__('No more updates'), indicator:'darkgrey'});
+ me.more.parent().addClass('hidden');
+ }
+ }
+ });
+ },
+ add_row: function(data) {
+ var me = frappe.team_updates;
+
+ data.by = frappe.user.full_name(data.sender);
+ data.avatar = frappe.avatar(data.sender);
+ data.when = comment_when(data.creation);
+
+ var date = dateutil.str_to_obj(data.creation);
+ var last = me.last_feed_date;
+
+ if((last && dateutil.obj_to_str(last) != dateutil.obj_to_str(date)) || (!last)) {
+ var diff = dateutil.get_day_diff(dateutil.get_today(), dateutil.obj_to_str(date));
+ if(diff < 1) {
+ pdate = 'Today';
+ } else if(diff < 2) {
+ pdate = 'Yesterday';
+ } else {
+ pdate = dateutil.global_date_format(date);
+ }
+ data.date_sep = pdate;
+ data.date_class = pdate=='Today' ? "date-indicator blue" : "date-indicator";
+ } else {
+ data.date_sep = null;
+ data.date_class = "";
+ }
+ me.last_feed_date = date;
+
+ $(frappe.render_template('team_update_row', data)).appendTo(me.body)
+ }
+}
\ No newline at end of file
diff --git a/erpnext/hr/page/team_updates/team_updates.json b/erpnext/hr/page/team_updates/team_updates.json
new file mode 100644
index 0000000..167c67f
--- /dev/null
+++ b/erpnext/hr/page/team_updates/team_updates.json
@@ -0,0 +1,25 @@
+{
+ "content": null,
+ "creation": "2017-01-31 11:02:31.614045",
+ "docstatus": 0,
+ "doctype": "Page",
+ "idx": 0,
+ "modified": "2017-01-31 11:25:01.983200",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "team-updates",
+ "owner": "Administrator",
+ "page_name": "team-updates",
+ "roles": [
+ {
+ "role": "Employee"
+ },
+ {
+ "role": "System Manager"
+ }
+ ],
+ "script": null,
+ "standard": "Yes",
+ "style": null,
+ "title": "Team Updates"
+}
\ No newline at end of file
diff --git a/erpnext/hr/page/team_updates/team_updates.py b/erpnext/hr/page/team_updates/team_updates.py
new file mode 100644
index 0000000..5b90f6f
--- /dev/null
+++ b/erpnext/hr/page/team_updates/team_updates.py
@@ -0,0 +1,21 @@
+from __future__ import unicode_literals
+
+import frappe
+from email_reply_parser import EmailReplyParser
+from markdown2 import markdown
+
+@frappe.whitelist()
+def get_data(start=0):
+ #frappe.only_for('Employee', 'System Manager')
+ data = frappe.get_all('Communication',
+ fields=('content', 'text_content', 'sender', 'creation'),
+ filters=dict(reference_doctype='Daily Work Summary'),
+ order_by='creation desc', limit=40, start=start)
+
+ for d in data:
+ d.sender_name = frappe.db.get_value("Employee", {"user_id": d.sender},
+ "employee_name") or d.sender
+ if d.text_content:
+ d.content = markdown(EmailReplyParser.parse_reply(d.text_content))
+
+ return data
\ No newline at end of file
diff --git a/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json b/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json
index 0c38d45..cb4003a 100644
--- a/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json
+++ b/erpnext/hr/print_format/salary_slip_standard/salary_slip_standard.json
@@ -6,7 +6,7 @@
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
- "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"HTML\", \"options\": \" <h3 style=\\\"text-align: right;\\\"><span style=\\\"line-height: 1.42857;\\\">{{doc.name}}</span></h3>\\n<div>\\n <hr style=\\\"text-align: center;\\\">\\n</div> \"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"employee\"}, {\"print_hide\": 0, \"fieldname\": \"company\"}, {\"print_hide\": 0, \"fieldname\": \"employee_name\"}, {\"print_hide\": 0, \"fieldname\": \"department\"}, {\"print_hide\": 0, \"fieldname\": \"designation\"}, {\"print_hide\": 0, \"fieldname\": \"branch\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"start_date\"}, {\"print_hide\": 0, \"fieldname\": \"end_date\"}, {\"print_hide\": 0, \"fieldname\": \"total_working_days\"}, {\"print_hide\": 0, \"fieldname\": \"leave_without_pay\"}, {\"print_hide\": 0, \"fieldname\": \"payment_days\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"earnings\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"deductions\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"arrear_amount\"}, {\"print_hide\": 0, \"fieldname\": \"leave_encashment_amount\"}, {\"print_hide\": 0, \"fieldname\": \"gross_pay\"}, {\"print_hide\": 0, \"fieldname\": \"total_deduction\"}, {\"print_hide\": 0, \"fieldname\": \"net_pay\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\"}, {\"print_hide\": 0, \"fieldname\": \"total_in_words\"}]",
+ "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"HTML\", \"options\": \" <h3 style=\\\"text-align: right;\\\"><span style=\\\"line-height: 1.42857;\\\">{{doc.name}}</span></h3>\\n<div>\\n <hr style=\\\"text-align: center;\\\">\\n</div> \"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"employee\"}, {\"print_hide\": 0, \"fieldname\": \"company\"}, {\"print_hide\": 0, \"fieldname\": \"employee_name\"}, {\"print_hide\": 0, \"fieldname\": \"department\"}, {\"print_hide\": 0, \"fieldname\": \"designation\"}, {\"print_hide\": 0, \"fieldname\": \"branch\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"start_date\"}, {\"print_hide\": 0, \"fieldname\": \"end_date\"}, {\"print_hide\": 0, \"fieldname\": \"total_working_days\"}, {\"print_hide\": 0, \"fieldname\": \"leave_without_pay\"}, {\"print_hide\": 0, \"fieldname\": \"payment_days\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"earnings\"}, {\"fieldtype\": \"Column Break\"}, {\"visible_columns\": [{\"print_hide\": 0, \"fieldname\": \"salary_component\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"amount\", \"print_width\": \"\"}, {\"print_hide\": 0, \"fieldname\": \"depends_on_lwp\", \"print_width\": \"\"}], \"print_hide\": 0, \"fieldname\": \"deductions\"}, {\"fieldtype\": \"Section Break\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldtype\": \"Column Break\"}, {\"print_hide\": 0, \"fieldname\": \"gross_pay\"}, {\"print_hide\": 0, \"fieldname\": \"total_deduction\"}, {\"print_hide\": 0, \"fieldname\": \"net_pay\"}, {\"print_hide\": 0, \"fieldname\": \"rounded_total\"}, {\"print_hide\": 0, \"fieldname\": \"total_in_words\"}]",
"idx": 0,
"modified": "2016-08-22 00:21:42.600548",
"modified_by": "Administrator",
diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
index 7f1c442..8105e1a 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py
@@ -30,28 +30,31 @@
return columns
def get_data(filters, leave_types):
-
+ user = frappe.session.user
allocation_records_based_on_to_date = get_leave_allocation_records(filters.to_date)
active_employees = frappe.get_all("Employee",
filters = { "status": "Active", "company": filters.company},
- fields = ["name", "employee_name", "department"])
+ fields = ["name", "employee_name", "department", "user_id"])
data = []
for employee in active_employees:
- row = [employee.name, employee.employee_name, employee.department]
+ leave_approvers = [l.leave_approver for l in frappe.db.sql("""select leave_approver from `tabEmployee Leave Approver` where parent = %s""",
+ (employee.name),as_dict=True)]
+ if (len(leave_approvers) and user in leave_approvers) or (user in ["Administrator", employee.user_id]) or ("HR Manager" in frappe.get_roles(user)):
+ row = [employee.name, employee.employee_name, employee.department]
- for leave_type in leave_types:
- # leaves taken
- leaves_taken = get_approved_leaves_for_period(employee.name, leave_type,
- filters.from_date, filters.to_date)
+ for leave_type in leave_types:
+ # leaves taken
+ leaves_taken = get_approved_leaves_for_period(employee.name, leave_type,
+ filters.from_date, filters.to_date)
- # closing balance
- closing = get_leave_balance_on(employee.name, leave_type, filters.to_date,
- allocation_records_based_on_to_date.get(employee.name, frappe._dict()))
+ # closing balance
+ closing = get_leave_balance_on(employee.name, leave_type, filters.to_date,
+ allocation_records_based_on_to_date.get(employee.name, frappe._dict()))
- row += [leaves_taken, closing]
+ row += [leaves_taken, closing]
- data.append(row)
+ data.append(row)
return data
\ No newline at end of file
diff --git a/erpnext/hr/report/salary_register/salary_register.py b/erpnext/hr/report/salary_register/salary_register.py
index 1e36b92..88f6f47 100644
--- a/erpnext/hr/report/salary_register/salary_register.py
+++ b/erpnext/hr/report/salary_register/salary_register.py
@@ -22,7 +22,7 @@
for e in earning_types:
row.append(ss_earning_map.get(ss.name, {}).get(e))
- row += [ss.arrear_amount, ss.leave_encashment_amount, ss.gross_pay]
+ row += [ss.gross_pay]
for d in ded_types:
row.append(ss_ded_map.get(ss.name, {}).get(d))
@@ -50,8 +50,7 @@
salary_components[_(component.type)].append(component.salary_component)
columns = columns + [(e + ":Currency:120") for e in salary_components[_("Earning")]] + \
- [ _("Arrear Amount") + ":Currency:120", _("Leave Encashment Amount") + ":Currency:150",
- _("Gross Pay") + ":Currency:120"] + [(d + ":Currency:120") for d in salary_components[_("Deduction")]] + \
+ [_("Gross Pay") + ":Currency:120"] + [(d + ":Currency:120") for d in salary_components[_("Deduction")]] + \
[_("Total Deduction") + ":Currency:120", _("Net Pay") + ":Currency:120"]
return columns, salary_components[_("Earning")], salary_components[_("Deduction")]
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json
index 60ddf63..a1bcf15 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json
+++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -79,7 +81,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -137,7 +141,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -167,7 +172,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -226,6 +233,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -256,6 +264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Schedule",
@@ -285,6 +294,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Generate Schedule",
@@ -313,6 +323,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Schedules",
@@ -343,6 +354,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Info",
@@ -370,7 +382,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -401,6 +414,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -430,6 +444,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -458,6 +473,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -485,6 +501,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -512,6 +529,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -539,6 +557,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -567,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -595,7 +615,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -628,6 +649,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -655,7 +677,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -686,6 +709,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -715,7 +739,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:54:23.335854",
+ "modified": "2017-02-17 17:07:02.336621",
"modified_by": "Administrator",
"module": "Maintenance",
"name": "Maintenance Schedule",
@@ -731,7 +755,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -747,7 +770,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,customer,customer_name",
+ "show_name_in_global_search": 0,
"sort_order": "DESC",
"timeline_field": "customer",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
index 93c706a..0a74436 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
+++ b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.json
@@ -10,18 +10,22 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -32,6 +36,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -42,13 +47,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -58,6 +66,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -68,13 +77,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "scheduled_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Scheduled Date",
"length": 0,
"no_copy": 0,
@@ -84,6 +96,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -94,13 +107,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "actual_date",
"fieldtype": "Date",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Date",
"length": 0,
"no_copy": 1,
@@ -110,6 +126,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -120,13 +137,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "sales_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Sales Person",
"length": 0,
"no_copy": 0,
@@ -137,6 +157,7 @@
"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,
@@ -147,13 +168,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "serial_no",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 0,
@@ -164,6 +188,7 @@
"print_hide_if_no_value": 0,
"print_width": "160px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -182,7 +207,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:02.171375",
+ "modified": "2017-02-17 17:05:44.644663",
"modified_by": "Administrator",
"module": "Maintenance",
"name": "Maintenance Schedule Detail",
@@ -191,5 +216,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json
index 1e68fab..c6aac14 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json
+++ b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json
@@ -22,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -52,7 +54,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -80,7 +84,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -110,7 +116,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -135,8 +143,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Start Date",
"length": 0,
"no_copy": 0,
@@ -163,8 +173,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "End Date",
"length": 0,
"no_copy": 0,
@@ -192,7 +204,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Periodicity",
"length": 0,
"no_copy": 0,
@@ -221,7 +235,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "No of Visits",
"length": 0,
"no_copy": 0,
@@ -248,8 +264,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Person",
"length": 0,
"no_copy": 0,
@@ -278,7 +296,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
@@ -304,7 +324,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 0,
@@ -331,8 +353,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Order",
"length": 0,
"no_copy": 1,
@@ -363,7 +387,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-01-11 12:02:38.449129",
+ "modified": "2017-02-17 17:06:21.448695",
"modified_by": "Administrator",
"module": "Maintenance",
"name": "Maintenance Schedule Item",
@@ -372,5 +396,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json
index 6efd6fd..c840600 100644
--- a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json
+++ b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -106,7 +109,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -191,6 +197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -218,6 +225,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -245,6 +253,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -272,6 +281,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -301,6 +311,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maintenance Date",
@@ -330,6 +341,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maintenance Time",
@@ -359,6 +371,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -388,6 +401,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Completion Status",
@@ -418,6 +432,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -444,7 +459,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Maintenance Type",
@@ -475,6 +491,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -503,6 +520,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purposes",
@@ -533,6 +551,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -562,6 +581,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Feedback",
@@ -591,6 +611,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -618,6 +639,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -648,6 +670,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -678,7 +701,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -710,6 +734,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Info",
@@ -738,6 +763,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -766,6 +792,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -794,6 +821,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -821,6 +849,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -850,6 +879,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -879,7 +909,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:13:23.358364",
+ "modified": "2017-02-17 17:08:30.893833",
"modified_by": "Administrator",
"module": "Maintenance",
"name": "Maintenance Visit",
@@ -895,7 +925,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -911,9 +940,11 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,maintenance_type,customer,customer_name,mntc_date,company",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "customer_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
index c59c469..e55f562 100644
--- a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
+++ b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.json
@@ -10,18 +10,22 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -32,6 +36,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,
@@ -42,13 +47,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -58,6 +66,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -68,13 +77,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "serial_no",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 0,
@@ -84,6 +96,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,
@@ -94,13 +107,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -111,6 +127,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -122,13 +139,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "work_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -136,6 +156,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,
@@ -146,13 +167,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "service_person",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Sales Person",
"length": 0,
"no_copy": 0,
@@ -163,6 +187,7 @@
"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,
@@ -173,13 +198,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "work_done",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Work Done",
"length": 0,
"no_copy": 0,
@@ -189,6 +217,7 @@
"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,
@@ -199,13 +228,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_doctype",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Document Type",
"length": 0,
"no_copy": 1,
@@ -217,6 +249,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -228,13 +261,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_docname",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Document No",
"length": 0,
"no_copy": 1,
@@ -246,6 +282,7 @@
"print_hide_if_no_value": 0,
"print_width": "160px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -257,13 +294,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_detail_docname",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Document Detail No",
"length": 0,
"no_copy": 1,
@@ -274,6 +314,7 @@
"print_hide_if_no_value": 0,
"print_width": "160px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -292,7 +333,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:02.369271",
+ "modified": "2017-02-17 17:06:11.910266",
"modified_by": "Administrator",
"module": "Maintenance",
"name": "Maintenance Visit Purpose",
@@ -301,5 +342,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json
index c2c9b64..9fa2a81 100644
--- a/erpnext/manufacturing/doctype/bom/bom.json
+++ b/erpnext/manufacturing/doctype/bom/bom.json
@@ -21,7 +21,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -82,6 +84,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Is Active",
@@ -168,6 +173,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Is Default",
@@ -195,9 +201,10 @@
"fieldname": "with_operations",
"fieldtype": "Check",
"hidden": 0,
- "ignore_user_permissions": 0,
+ "ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "With Operations",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate Of Materials Based On",
@@ -254,6 +262,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -282,6 +291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -310,6 +320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -323,7 +334,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 0,
+ "reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -339,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -366,6 +378,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Conversion Rate",
@@ -378,7 +391,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 0,
+ "reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operations",
@@ -424,6 +438,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operations",
@@ -454,6 +469,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Materials",
@@ -482,6 +498,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -512,6 +529,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Scrap",
@@ -540,6 +558,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Scrap Items",
@@ -569,6 +588,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Costing",
@@ -597,6 +617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operating Cost",
@@ -625,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Material Cost",
@@ -653,6 +675,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Scrap Material Cost",
@@ -682,6 +705,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -708,6 +732,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operating Cost (Company Currency)",
@@ -737,6 +762,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Material Cost(Company Currency)",
@@ -766,6 +792,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Scrap Material Cost(Company Currency)",
@@ -795,6 +822,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -822,6 +850,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Cost",
@@ -850,6 +879,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -877,6 +907,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Cost(Company Currency)",
@@ -906,6 +937,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -932,7 +964,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -963,6 +996,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -976,7 +1010,7 @@
"read_only": 0,
"remember_last_selected_value": 1,
"report_hide": 0,
- "reqd": 0,
+ "reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -992,6 +1026,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1020,6 +1055,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1046,6 +1082,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item UOM",
@@ -1074,6 +1111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1101,6 +1139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Description",
@@ -1128,6 +1167,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1155,6 +1195,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -1183,6 +1224,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -1213,6 +1255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Materials Required (Exploded)",
@@ -1240,6 +1283,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exploded_items",
@@ -1258,6 +1302,276 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "website_section",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Website",
+ "length": 0,
+ "no_copy": 0,
+ "options": "",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "",
+ "fieldname": "show_in_website",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Show in Website",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "route",
+ "fieldtype": "Small Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Route",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "show_in_website",
+ "description": "Item Image (if not slideshow)",
+ "fieldname": "website_image",
+ "fieldtype": "Attach Image",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Image",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "thumbnail",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Thumbnail",
+ "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": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 1,
+ "collapsible_depends_on": "website_items",
+ "columns": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "sb_web_spec",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Website Specifications",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "web_long_description",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Website Description",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "show_in_website",
+ "fieldname": "show_items",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Show Items",
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "depends_on": "eval:(doc.show_in_website && doc.with_operations)",
+ "fieldname": "show_operations",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Show Operations",
+ "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,
@@ -1271,8 +1585,8 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-21 17:06:49.349654",
- "modified_by": "rohit@erpnext.com",
+ "modified": "2017-02-21 13:10:27.394012",
+ "modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",
"owner": "Administrator",
@@ -1287,7 +1601,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1308,7 +1621,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1329,7 +1641,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1345,7 +1656,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index f4fed6e..abb2817 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -6,7 +6,7 @@
from frappe.utils import cint, cstr, flt
from frappe import _
from erpnext.setup.utils import get_exchange_rate
-from frappe.model.document import Document
+from frappe.website.website_generator import WebsiteGenerator
from operator import itemgetter
@@ -14,7 +14,13 @@
"items": "templates/form_grid/item_grid.html"
}
-class BOM(Document):
+class BOM(WebsiteGenerator):
+ website = frappe._dict(
+ # page_title_field = "item_name",
+ condition_field = "show_in_website",
+ template = "templates/generators/bom.html"
+ )
+
def autoname(self):
names = frappe.db.sql_list("""select name from `tabBOM` where item=%s""", self.item)
@@ -34,6 +40,8 @@
self.name = 'BOM-' + self.item + ('-%.3i' % idx)
def validate(self):
+ # if not self.route:
+ self.route = frappe.scrub(self.name).replace('_', '-')
self.clear_operations()
self.validate_main_item()
self.validate_currency()
@@ -47,6 +55,9 @@
self.validate_operations()
self.calculate_cost()
+ def get_context(self, context):
+ context.parents = [{'name': 'boms', 'title': _('All BOMs') }]
+
def on_update(self):
self.check_recursion()
self.update_exploded_items()
@@ -321,9 +332,9 @@
if d.bom_no:
d.rate = self.get_bom_unitcost(d.bom_no)
- d.base_rate = d.rate * self.conversion_rate
+ d.base_rate = flt(d.rate) * flt(self.conversion_rate)
d.amount = flt(d.rate, self.precision("rate", d)) * flt(d.qty, self.precision("qty", d))
- d.base_amount = d.amount * self.conversion_rate
+ d.base_amount = d.amount * flt(self.conversion_rate)
d.qty_consumed_per_unit = flt(d.qty, self.precision("qty", d)) / flt(self.quantity, self.precision("quantity"))
total_rm_cost += d.amount
base_total_rm_cost += d.base_amount
@@ -428,6 +439,10 @@
if not d.description:
d.description = frappe.db.get_value('Operation', d.operation, 'description')
+def get_list_context(context):
+ context.title = _("Bill of Materials")
+ # context.introduction = _('Boms')
+
def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_items=0):
item_dict = {}
@@ -500,10 +515,15 @@
@frappe.whitelist()
def get_children():
if frappe.form_dict.parent:
- return frappe.db.sql("""select item_code,
- bom_no as value, qty,
- if(ifnull(bom_no, "")!="", 1, 0) as expandable
- from `tabBOM Item`
- where parent=%s
- order by idx
+ return frappe.db.sql("""select
+ bom_item.item_code,
+ bom_item.bom_no as value,
+ bom_item.qty,
+ if(ifnull(bom_item.bom_no, "")!="", 1, 0) as expandable,
+ item.image,
+ item.description
+ from `tabBOM Item` bom_item, tabItem item
+ where bom_item.parent=%s
+ and bom_item.item_code = item.name
+ order by bom_item.idx
""", frappe.form_dict.parent, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom/bom_item_preview.html b/erpnext/manufacturing/doctype/bom/bom_item_preview.html
new file mode 100644
index 0000000..9db19a0
--- /dev/null
+++ b/erpnext/manufacturing/doctype/bom/bom_item_preview.html
@@ -0,0 +1,21 @@
+<div style="padding: 15px;">
+ {% if data.image %}
+ <img class="responsive" src={{ data.image }}>
+ <hr style="margin: 15px -15px;">
+ {% endif %}
+ <h4>
+ {{ __("Description") }}
+ </h4>
+ <div style="padding-top: 10px;">
+ {{ data.description }}
+ </div>
+ <hr style="margin: 15px -15px;">
+ <p>
+ {% if data.value %}
+ <a style="margin-right: 7px; margin-bottom: 7px" class="btn btn-default btn-xs" href="#Form/BOM/{{ data.value }}">
+ {{ __("Open BOM {0}", [data.value.bold()]) }}</a>
+ {% endif %}
+ <a class="btn btn-default btn-xs" href="#Form/Item/{{ data.item_code }}">
+ {{ __("Open Item {0}", [data.item_code.bold()]) }}</a>
+ </p>
+</div>
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom/bom_tree.js b/erpnext/manufacturing/doctype/bom/bom_tree.js
index f6a205f..09fe037 100644
--- a/erpnext/manufacturing/doctype/bom/bom_tree.js
+++ b/erpnext/manufacturing/doctype/bom/bom_tree.js
@@ -20,14 +20,14 @@
}
},
toolbar: [
- {toggle_btn: true},
+ { toggle_btn: true },
{
label:__("Edit"),
condition: function(node) {
return node.expandable;
},
click: function(node) {
-
+
frappe.set_route("Form", "BOM", node.data.value);
}
}
@@ -40,5 +40,6 @@
},
condition: 'frappe.boot.user.can_create.indexOf("BOM") !== -1'
}
- ]
+ ],
+ view_template: 'bom_item_preview'
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
index eca19b4..f075840 100644
--- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
+++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.json
@@ -10,18 +10,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -32,6 +36,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -42,13 +47,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "cb",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -56,6 +64,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,
@@ -66,13 +75,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -81,6 +93,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -91,13 +104,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_3",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -105,6 +121,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,
@@ -115,13 +132,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -132,6 +152,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -143,13 +164,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -157,6 +181,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,
@@ -167,13 +192,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "image",
"fieldtype": "Attach",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -182,6 +210,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -192,13 +221,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "image_view",
"fieldtype": "Image",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -208,6 +240,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,
@@ -218,13 +251,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_4",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -232,6 +268,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,
@@ -242,13 +279,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty",
"length": 0,
"no_copy": 0,
@@ -258,6 +298,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -268,13 +309,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rate",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -285,6 +329,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -295,13 +340,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty_consumed_per_unit",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty Consumed Per Unit",
"length": 0,
"no_copy": 0,
@@ -309,6 +357,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -319,13 +368,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_8",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -333,6 +385,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,
@@ -343,13 +396,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
@@ -360,6 +416,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -370,13 +427,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -387,6 +447,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -404,7 +465,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:27:58.370415",
+ "modified": "2017-02-17 17:27:43.757983",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Explosion Item",
@@ -413,5 +474,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json
index 50f1c6c..b846bc6 100644
--- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.json
+++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.json
@@ -21,8 +21,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Operation",
"length": 0,
"no_copy": 0,
@@ -33,6 +33,7 @@
"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,
@@ -49,8 +50,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Workstation",
"length": 0,
"no_copy": 0,
@@ -61,6 +62,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,
@@ -77,8 +79,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -88,6 +90,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,
@@ -104,14 +107,15 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -128,8 +132,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Hour Rate",
"length": 0,
"no_copy": 0,
@@ -140,6 +144,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,
@@ -157,8 +162,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Operation Time ",
"length": 0,
"no_copy": 0,
@@ -169,6 +174,7 @@
"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,
@@ -185,8 +191,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Operating Cost",
"length": 0,
"no_copy": 0,
@@ -197,6 +203,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -213,8 +220,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Base Hour Rate(Company Currency)",
"length": 0,
"no_copy": 0,
@@ -224,6 +231,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -241,8 +249,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Operating Cost(Company Currency)",
"length": 0,
"no_copy": 0,
@@ -252,6 +260,34 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "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": "image",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Image",
+ "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,
@@ -269,7 +305,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-10-21 18:38:14.700637",
+ "modified": "2017-02-10 07:12:41.255544",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM Operation",
@@ -278,5 +314,6 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/manufacturing/doctype/bom_website_item/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/manufacturing/doctype/bom_website_item/__init__.py
diff --git a/erpnext/schools/doctype/topic/topic.json b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.json
similarity index 66%
rename from erpnext/schools/doctype/topic/topic.json
rename to erpnext/manufacturing/doctype/bom_website_item/bom_website_item.json
index 0a69f88..7df728b 100644
--- a/erpnext/schools/doctype/topic/topic.json
+++ b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.json
@@ -1,15 +1,14 @@
{
"allow_copy": 0,
"allow_import": 0,
- "allow_rename": 1,
- "autoname": "Topic.####",
+ "allow_rename": 0,
"beta": 0,
- "creation": "2016-06-28 07:06:38.749398",
+ "creation": "2017-02-10 05:36:19.757356",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 0,
+ "document_type": "",
+ "editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
@@ -17,18 +16,17 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "course",
+ "fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Course",
+ "in_standard_filter": 0,
+ "label": "Item Code",
"length": 0,
"no_copy": 0,
- "options": "Course",
+ "options": "Item",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -36,7 +34,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 1,
"set_only_once": 0,
"unique": 0
@@ -45,46 +43,18 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "columns": 0,
- "fieldname": "topic_name",
+ "columns": 3,
+ "fieldname": "item_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": "Topic Name",
- "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": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "introduction",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Introduction",
+ "label": "Item Name",
"length": 0,
"no_copy": 0,
+ "options": "Workstation",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -92,7 +62,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -102,15 +72,14 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "content",
+ "fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Content",
+ "label": "Item Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -120,7 +89,61 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 2,
+ "fieldname": "qty",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Qty",
+ "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": "website_image",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Image",
+ "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
@@ -134,42 +157,20 @@
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
- "istable": 0,
+ "istable": 1,
"max_attachments": 0,
- "modified": "2016-11-07 05:29:20.531725",
+ "modified": "2017-02-12 12:48:56.949861",
"modified_by": "Administrator",
- "module": "Schools",
- "name": "Topic",
+ "module": "Manufacturing",
+ "name": "BOM Website Item",
"name_case": "",
"owner": "Administrator",
- "permissions": [
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Academics User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- }
- ],
+ "permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "title_field": "course",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py
index 85c1b32..4088a7f 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class BOMWebsiteItem(Document):
pass
diff --git a/erpnext/schools/doctype/discussion/__init__.py b/erpnext/manufacturing/doctype/bom_website_operation/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/discussion/__init__.py
copy to erpnext/manufacturing/doctype/bom_website_operation/__init__.py
diff --git a/erpnext/schools/doctype/topic/topic.json b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.json
similarity index 65%
copy from erpnext/schools/doctype/topic/topic.json
copy to erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.json
index 0a69f88..8f28dd7 100644
--- a/erpnext/schools/doctype/topic/topic.json
+++ b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.json
@@ -1,15 +1,14 @@
{
"allow_copy": 0,
"allow_import": 0,
- "allow_rename": 1,
- "autoname": "Topic.####",
+ "allow_rename": 0,
"beta": 0,
- "creation": "2016-06-28 07:06:38.749398",
+ "creation": "2017-02-10 05:27:16.031403",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 0,
+ "document_type": "",
+ "editable_grid": 1,
"engine": "InnoDB",
"fields": [
{
@@ -17,18 +16,17 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "course",
+ "fieldname": "operation",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Course",
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Operation",
"length": 0,
"no_copy": 0,
- "options": "Course",
+ "options": "Operation",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -37,7 +35,7 @@
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
- "search_index": 1,
+ "search_index": 0,
"set_only_once": 0,
"unique": 0
},
@@ -46,43 +44,96 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "topic_name",
+ "fieldname": "workstation",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Workstation",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Workstation",
+ "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": "time_in_mins",
+ "fieldtype": "Float",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Operation Time",
+ "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": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "website_image",
+ "fieldtype": "Attach",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Image",
+ "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": "thumbnail",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Topic Name",
- "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": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "introduction",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Introduction",
+ "label": "Thumbnail",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -92,35 +143,7 @@
"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": "content",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Content",
- "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": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -134,42 +157,20 @@
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
- "istable": 0,
+ "istable": 1,
"max_attachments": 0,
- "modified": "2016-11-07 05:29:20.531725",
+ "modified": "2017-02-12 16:32:44.316447",
"modified_by": "Administrator",
- "module": "Schools",
- "name": "Topic",
+ "module": "Manufacturing",
+ "name": "BOM Website Operation",
"name_case": "",
"owner": "Administrator",
- "permissions": [
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Academics User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- }
- ],
+ "permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "title_field": "course",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py
index 85c1b32..bcc5dda 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class BOMWebsiteOperation(Document):
pass
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json
index 04a3a93..f9b99ab 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.json
+++ b/erpnext/manufacturing/doctype/production_order/production_order.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -80,7 +82,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -110,7 +113,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item To Manufacture",
@@ -143,6 +147,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "BOM No",
@@ -175,6 +180,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Use Multi-Level BOM",
@@ -202,6 +208,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -231,6 +238,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order",
@@ -260,6 +268,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Qty To Manufacture",
@@ -292,6 +301,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Material Transferred for Manufacturing",
@@ -323,6 +333,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Manufactured Qty",
@@ -352,6 +363,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouses",
@@ -381,6 +393,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source Warehouse (for reserving Items)",
@@ -410,6 +423,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Work-in-Progress Warehouse",
@@ -438,6 +452,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -466,6 +481,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Target Warehouse",
@@ -494,6 +510,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Scrap Warehouse",
@@ -523,6 +540,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Time",
@@ -553,6 +571,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Delivery Date",
@@ -581,6 +600,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Planned Start Date",
@@ -609,6 +629,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Planned End Date",
@@ -637,6 +658,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -664,6 +686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Start Date",
@@ -692,6 +715,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual End Date",
@@ -721,6 +745,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operations",
@@ -751,6 +776,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operations",
@@ -781,6 +807,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operation Cost",
@@ -810,6 +837,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Planned Operating Cost",
@@ -839,6 +867,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Operating Cost",
@@ -868,6 +897,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Operating Cost",
@@ -897,6 +927,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -924,6 +955,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Operating Cost",
@@ -953,6 +985,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -981,6 +1014,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Description",
@@ -1009,6 +1043,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock UOM",
@@ -1039,6 +1074,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -1069,6 +1105,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1095,7 +1132,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1127,6 +1165,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Material Request",
@@ -1156,6 +1195,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Material Request Item",
@@ -1184,6 +1224,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1214,6 +1255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Required Items",
@@ -1244,7 +1286,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-12 05:32:52.523006",
+ "modified": "2017-02-17 17:26:47.310275",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
@@ -1260,7 +1302,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1281,7 +1322,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1296,6 +1336,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
"title_field": "production_item",
"track_changes": 0,
diff --git a/erpnext/manufacturing/doctype/production_order/production_order_calendar.js b/erpnext/manufacturing/doctype/production_order/production_order_calendar.js
index 2832494..47cac28 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order_calendar.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order_calendar.js
@@ -7,7 +7,10 @@
"end": "planned_end_date",
"id": "name",
"title": "name",
- "allDay": "allDay"
+ "allDay": "allDay",
+ "progress": function(data) {
+ return flt(data.produced_qty) / data.qty * 100;
+ }
},
gantt: true,
get_css_class: function(data) {
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index db5b66c..4692118 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -249,7 +249,7 @@
"wip_warehouse" : "",
"fg_warehouse" : d.warehouse,
"status" : "Draft",
- "project" : frappe.db.get_value("Sales Order", d.sales_order, "project")
+ "project" : frappe.db.get_value("Sales Order", d.sales_order, "project")
}
""" Club similar BOM and item for processing in case of Sales Orders """
@@ -345,53 +345,53 @@
def get_subitems(self,bom_wise_item_details, bom, parent_qty, include_sublevel, only_raw, supply_subs,non_stock_item=0):
items = frappe.db.sql("""
- SELECT
- bom_item.item_code,
+ SELECT
+ bom_item.item_code,
default_material_request_type,
ifnull(%(parent_qty)s * sum(bom_item.qty/ifnull(bom.quantity, 1)), 0) as qty,
- item.is_sub_contracted_item as is_sub_contracted,
+ item.is_sub_contracted_item as is_sub_contracted,
item.default_bom as default_bom,
- bom_item.description as description,
- bom_item.stock_uom as stock_uom,
- item.min_order_qty as min_order_qty
+ bom_item.description as description,
+ bom_item.stock_uom as stock_uom,
+ item.min_order_qty as min_order_qty
FROM
- `tabBOM Item` bom_item,
- `tabBOM` bom,
+ `tabBOM Item` bom_item,
+ `tabBOM` bom,
tabItem item
where
- bom.name = bom_item.parent
- and bom.name = %(bom)s
+ bom.name = bom_item.parent
+ and bom.name = %(bom)s
and bom_item.docstatus < 2
and bom_item.item_code = item.name
""" + ("and item.is_stock_item = 1", "")[non_stock_item] + """
group by bom_item.item_code""", {"bom": bom, "parent_qty": parent_qty}, as_dict=1)
-
+
for d in items:
- if ((d.default_material_request_type == "Purchase"
- and not (d.is_sub_contracted and only_raw and include_sublevel))
+ if ((d.default_material_request_type == "Purchase"
+ and not (d.is_sub_contracted and only_raw and include_sublevel))
or (d.default_material_request_type == "Manufacture" and not only_raw)):
if d.item_code in bom_wise_item_details:
bom_wise_item_details[d.item_code].qty = bom_wise_item_details[d.item_code].qty + d.qty
else:
bom_wise_item_details[d.item_code] = d
-
+
if include_sublevel:
- if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs)
+ if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs)
or (d.default_material_request_type == "Manufacture")):
-
+
my_qty = 0
projected_qty = self.get_item_projected_qty(d.item_code)
-
+
if self.create_material_requests_for_all_required_qty:
my_qty = d.qty
elif (bom_wise_item_details[d.item_code].qty - d.qty) < projected_qty:
my_qty = bom_wise_item_details[d.item_code].qty - projected_qty
else:
my_qty = d.qty
-
+
if my_qty > 0:
- self.get_subitems(bom_wise_item_details,
+ self.get_subitems(bom_wise_item_details,
d.default_bom, my_qty, include_sublevel, only_raw, supply_subs)
return bom_wise_item_details
@@ -408,12 +408,12 @@
item_list.append([item, self.item_dict[item][0][1], self.item_dict[item][0][2], total_qty])
item_qty = frappe.db.sql("""select warehouse, indented_qty, ordered_qty, actual_qty
from `tabBin` where item_code = %s""", item, as_dict=1)
-
+
i_qty, o_qty, a_qty = 0, 0, 0
for w in item_qty:
i_qty, o_qty, a_qty = i_qty + flt(w.indented_qty), o_qty + \
flt(w.ordered_qty), a_qty + flt(w.actual_qty)
-
+
item_list.append(['', '', '', '', w.warehouse, flt(w.indented_qty),
flt(w.ordered_qty), flt(w.actual_qty)])
if item_qty:
@@ -485,15 +485,15 @@
def get_item_projected_qty(self,item):
item_projected_qty = frappe.db.sql("""
select ifnull(sum(projected_qty),0) as qty
- from `tabBin`
+ from `tabBin`
where item_code = %(item_code)s and warehouse=%(warehouse)s
""", {
- "item_code": item,
+ "item_code": item,
"warehouse": self.purchase_request_for_warehouse
}, as_dict=1)
return item_projected_qty[0].qty
-
+
def get_projected_qty(self):
items = self.item_dict.keys()
item_projected_qty = frappe.db.sql("""select item_code, sum(projected_qty)
diff --git a/erpnext/manufacturing/doctype/workstation/workstation.json b/erpnext/manufacturing/doctype/workstation/workstation.json
index 9f72e5c..38188be 100644
--- a/erpnext/manufacturing/doctype/workstation/workstation.json
+++ b/erpnext/manufacturing/doctype/workstation/workstation.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Workstation Name",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Description",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Holiday List",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Operating Costs",
@@ -195,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Electricity Cost",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Consumable Cost",
@@ -254,6 +262,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -282,6 +291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rent Cost",
@@ -312,6 +322,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Wages",
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Hour Rate",
@@ -371,6 +383,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Working Hours",
@@ -399,6 +412,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Working Hours",
@@ -429,7 +443,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-13 05:04:54.668633",
+ "modified": "2017-02-17 17:26:57.238167",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Workstation",
@@ -445,7 +459,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -460,6 +473,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/manufacturing/page/production_analytics/__init__.py b/erpnext/manufacturing/page/production_analytics/__init__.py
new file mode 100644
index 0000000..baffc48
--- /dev/null
+++ b/erpnext/manufacturing/page/production_analytics/__init__.py
@@ -0,0 +1 @@
+from __future__ import unicode_literals
diff --git a/erpnext/manufacturing/page/production_analytics/production_analytics.js b/erpnext/manufacturing/page/production_analytics/production_analytics.js
new file mode 100644
index 0000000..cac4b3a
--- /dev/null
+++ b/erpnext/manufacturing/page/production_analytics/production_analytics.js
@@ -0,0 +1,158 @@
+// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+// License: GNU General Public License v3. See license.txt
+
+frappe.pages['production-analytics'].on_page_load = function(wrapper) {
+ frappe.ui.make_app_page({
+ parent: wrapper,
+ title: __('Production Analytics'),
+ single_column: true
+ });
+
+ new erpnext.ProductionAnalytics(wrapper);
+
+
+ frappe.breadcrumbs.add("Manufacturing");
+}
+
+erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
+ init: function(wrapper) {
+ this._super({
+ title: __("Production Analytics"),
+ page: wrapper,
+ parent: $(wrapper).find('.layout-main'),
+ page: wrapper.page,
+ doctypes: ["Item", "Company", "Fiscal Year", "Production Order"]
+ });
+
+ },
+ setup_columns: function() {
+
+ var std_columns = [
+ {id: "_check", name: __("Plot"), field: "_check", width: 30,
+ formatter: this.check_formatter},
+ {id: "name", name: __("Status"), field: "name", width: 100},
+ ];
+
+ this.make_date_range_columns();
+ this.columns = std_columns.concat(this.columns);
+ },
+ filters: [
+ {fieldtype:"Select", label: __("Company"), link:"Company", fieldname: "company",
+ default_value: __("Select Company...")},
+ {fieldtype:"Date", label: __("From Date"), fieldname: "from_date"},
+ {fieldtype:"Date", label: __("To Date"), fieldname: "to_date"},
+ {fieldtype:"Select", label: __("Range"), fieldname: "range",
+ options:[{label: __("Daily"), value: "Daily"}, {label: __("Weekly"), value: "Weekly"},
+ {label: __("Monthly"), value: "Monthly"}, {label: __("Quarterly"), value: "Quarterly"},
+ {label: __("Yearly"), value: "Yearly"}]}
+ ],
+ setup_filters: function() {
+ var me = this;
+ this._super();
+
+ this.trigger_refresh_on_change(["company"]);
+ this.trigger_refresh_on_change(["range"]);
+
+ this.show_zero_check()
+ this.setup_chart_check();
+
+ },
+ init_filter_values: function() {
+ this._super();
+ this.filter_inputs.range.val('Monthly');
+ },
+ setup_chart: function() {
+ var me = this;
+
+ var chart_data = this.get_chart_data ? this.get_chart_data() : null;
+
+ this.chart = new frappe.ui.Chart({
+ wrapper: this.chart_area,
+ data: chart_data
+ });
+ },
+ set_default_values: function() {
+ var values = {
+ from_date: dateutil.str_to_user(dateutil.add_months(dateutil.now_datetime(),-12) ),
+ to_date: dateutil.str_to_user(dateutil.add_months(dateutil.now_datetime(),1))
+ }
+
+ var me = this;
+ $.each(values, function(i, v) {
+ if(me.filter_inputs[i] && !me.filter_inputs[i].val())
+ me.filter_inputs[i].val(v);
+ })
+ },
+
+ prepare_data: function() {
+ // add Opening, Closing, Totals rows
+ // if filtered by account and / or voucher
+ var me = this;
+ var all_open_orders = {name:"All Production Orders", "id": "all-open-pos",
+ checked:true};
+ var not_started = {name:"Not Started", "id":"not-started-pos",
+ checked:true};
+ var overdue = {name:"Overdue (Not Started)", "id":"overdue-pos",
+ checked:true};
+ var pending = {name:"Pending", "id":"pending-pos",
+ checked:true};
+ var completed = {name:"Completed", "id":"completed-pos",
+ checked:true};
+
+ $.each(frappe.report_dump.data["Production Order"], function(i, d) {
+ var dateobj = dateutil.str_to_obj(d.creation);
+ var date = dateutil.str_to_user(d.creation.split(" ")[0]);
+
+ $.each(me.columns, function(i,col) {
+ if (i > 1){
+ var start_period = dateutil.user_to_obj(dateutil.str_to_user(col.id));
+ var end_period = dateutil.user_to_obj(dateutil.str_to_user(col.name));
+ var astart_date = dateutil.user_to_obj(dateutil.str_to_user(d.actual_start_date));
+ var planned_start_date = dateutil.user_to_obj(dateutil.str_to_user(d.planned_start_date));
+ var aend_date = dateutil.user_to_obj(dateutil.str_to_user(d.actual_end_date));
+ var modified = dateutil.user_to_obj(dateutil.str_to_user(d.modified));
+
+ if (dateobj <= start_period || dateobj <= end_period) {
+ all_open_orders[col.field] = flt(all_open_orders[col.field]) + 1;
+
+ if(d.status=="Completed") {
+ if(aend_date < start_period || modified < start_period) {
+ completed[col.field] = flt(completed[col.field]) + 1;
+ }
+ else if (astart_date < start_period) {
+ pending[col.field] = flt(pending[col.field]) + 1;
+ }
+ else if (planned_start_date < start_period) {
+ overdue[col.field] = flt(overdue[col.field]) + 1;
+ } else {
+ not_started[col.field] = flt(not_started[col.field]) + 1;
+ }
+ }else if(d.status == "In Process")
+ {
+ if (astart_date < start_period || modified < start_period){
+ pending[col.field] = flt(pending[col.field]) + 1;
+ }else if (planned_start_date < start_period) {
+ overdue[col.field] = flt(overdue[col.field]) + 1;
+ }else{
+ not_started[col.field] = flt(not_started[col.field]) + 1;
+ }
+ }else if(d.status == "Not Started") {
+ if (planned_start_date < start_period){
+ overdue[col.field] = flt(overdue[col.field]) + 1;
+ }else{
+ not_started[col.field] = flt(not_started[col.field]) + 1;
+ }
+ }
+ }
+ }
+ });
+ });
+ if(me.columns.length < 30){
+ this.chart_area.toggle(true);
+ }else {
+ this.chart_area.toggle(false);
+ }
+ this.data = [all_open_orders, not_started, overdue, pending, completed];
+
+ }
+});
diff --git a/erpnext/manufacturing/page/production_analytics/production_analytics.json b/erpnext/manufacturing/page/production_analytics/production_analytics.json
new file mode 100644
index 0000000..cd73bc8
--- /dev/null
+++ b/erpnext/manufacturing/page/production_analytics/production_analytics.json
@@ -0,0 +1,26 @@
+{
+ "content": null,
+ "creation": "2012-09-21 20:15:16",
+ "docstatus": 0,
+ "doctype": "Page",
+ "icon": "fa fa-bar-chart",
+ "idx": 1,
+ "modified": "2017-02-20 17:33:05.913097",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "production-analytics",
+ "owner": "Administrator",
+ "page_name": "production-analytics",
+ "roles": [
+ {
+ "role": "Analytics"
+ },
+ {
+ "role": "Manufacturing Manager"
+ }
+ ],
+ "script": null,
+ "standard": "Yes",
+ "style": null,
+ "title": "Production Analytics"
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/manufacturing/report/bom_stock_report/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/manufacturing/report/bom_stock_report/__init__.py
diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js
new file mode 100644
index 0000000..8aed965
--- /dev/null
+++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.js
@@ -0,0 +1,17 @@
+frappe.query_reports["BOM Stock Report"] = {
+ "filters": [
+ {
+ "fieldname":"bom",
+ "label": __("BOM"),
+ "fieldtype": "Link",
+ "options": "BOM",
+ "reqd": 1
+ },{
+ "fieldname":"warehouse",
+ "label": __("Warehouse"),
+ "fieldtype": "Link",
+ "options": "Warehouse",
+ "reqd": 1
+ }
+ ]
+}
diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json
new file mode 100644
index 0000000..64d0ebb
--- /dev/null
+++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.json
@@ -0,0 +1,20 @@
+{
+ "add_total_row": 0,
+ "apply_user_permissions": 1,
+ "creation": "2017-01-10 14:00:50.387244",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "letter_head": "Standard",
+ "modified": "2017-02-09 23:19:32.050905",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "BOM Stock Report",
+ "owner": "Administrator",
+ "query": "SELECT \n\tbom_item.item_code as \"Item:Link/Item:200\",\n\tbom_item.description as \"Description:Data:300\",\n\tbom_item.qty as \"Required Qty:Float:100\",\n\tledger.actual_qty as \"In Stock Qty:Float:100\",\n\tFLOOR(ledger.actual_qty /bom_item.qty) as \"Enough Parts to Build:Int:100\"\nFROM\n\t`tabBOM Item` AS bom_item \n\tLEFT JOIN `tabBin` AS ledger\t\n\t\tON bom_item.item_code = ledger.item_code \n\t\tAND ledger.warehouse = %(warehouse)s\nWHERE\n\tbom_item.parent=%(bom)s\n\nGROUP BY bom_item.item_code",
+ "ref_doctype": "BOM",
+ "report_name": "BOM Stock Report",
+ "report_type": "Query Report"
+}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/manufacturing/report/production_order_stock_report/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/manufacturing/report/production_order_stock_report/__init__.py
diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.js b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.js
new file mode 100644
index 0000000..917af5d
--- /dev/null
+++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.js
@@ -0,0 +1,14 @@
+// Copyright (c) 2016, Velometro Mobility Inc and contributors
+// For license information, please see license.txt
+
+frappe.query_reports["Production Order Stock Report"] = {
+ "filters": [
+ {
+ "fieldname":"warehouse",
+ "label": __("Warehouse"),
+ "fieldtype": "Link",
+ "options": "Warehouse"
+
+ }
+ ]
+}
diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json
new file mode 100644
index 0000000..1b1357e
--- /dev/null
+++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.json
@@ -0,0 +1,19 @@
+{
+ "add_total_row": 0,
+ "apply_user_permissions": 1,
+ "creation": "2017-01-10 14:01:43.905861",
+ "disabled": 0,
+ "docstatus": 0,
+ "doctype": "Report",
+ "idx": 0,
+ "is_standard": "Yes",
+ "letter_head": "Standard",
+ "modified": "2017-01-10 14:01:43.905861",
+ "modified_by": "Administrator",
+ "module": "Manufacturing",
+ "name": "Production Order Stock Report",
+ "owner": "Administrator",
+ "ref_doctype": "Production Order",
+ "report_name": "Production Order Stock Report",
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py
new file mode 100644
index 0000000..6d586dd
--- /dev/null
+++ b/erpnext/manufacturing/report/production_order_stock_report/production_order_stock_report.py
@@ -0,0 +1,133 @@
+# Copyright (c) 2017, Velometro Mobility Inc and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+from frappe.utils import cint
+import frappe
+
+def execute(filters=None):
+ prod_list = get_production_orders()
+ data = get_item_list(prod_list, filters)
+ columns = get_columns()
+ return columns, data
+
+def get_item_list(prod_list, filters):
+ out = []
+
+ #Add a row for each item/qty
+ for prod_order in prod_list:
+ prod_details = frappe.db.get_value("Production Order", prod_order.name,
+ ["bom_no", "source_warehouse", "qty", "produced_qty"], as_dict=1)
+
+ desc = frappe.db.get_value("BOM", prod_details.bom_no, "description")
+
+ item_list = frappe.db.sql("""SELECT
+ bom_item.item_code as item_code,
+ ifnull(ledger.actual_qty*bom.quantity/bom_item.qty,0) as build_qty
+ FROM
+ `tabBOM` as bom, `tabBOM Item` AS bom_item
+ LEFT JOIN `tabBin` AS ledger
+ ON bom_item.item_code = ledger.item_code
+ AND ledger.warehouse = ifnull(%(warehouse)s,%(filterhouse)s)
+ WHERE
+ bom.name = bom_item.parent
+ and bom.name = %(bom)s
+ GROUP BY
+ bom_item.item_code""",
+ {"bom": prod_details.bom_no, "warehouse": prod_details.source_warehouse,
+ "filterhouse": filters.warehouse}, as_dict=1)
+
+ stock_qty = 0
+ count = 0
+ buildable_qty = prod_details.qty
+ for item in item_list:
+ count = count + 1
+ if item.build_qty >= (prod_details.qty - prod_details.produced_qty):
+ stock_qty = stock_qty + 1
+ elif buildable_qty >= item.build_qty:
+ buildable_qty = item.build_qty
+
+ if count == stock_qty:
+ build = "Y"
+ else:
+ build = "N"
+
+ row = frappe._dict({
+ "production_order": prod_order.name,
+ "status": prod_order.status,
+ "req_items": cint(count),
+ "instock": stock_qty,
+ "description": desc,
+ "bom_no": prod_details.bom_no,
+ "qty": prod_details.qty,
+ "buildable_qty": buildable_qty,
+ "ready_to_build": build
+ })
+
+ out.append(row)
+
+ return out
+
+def get_production_orders():
+
+ out = frappe.get_all("Production Order", filters={"docstatus": 1, "status": ( "!=","Completed")}, fields=["name","status"], order_by='name')
+ return out
+
+def get_columns():
+ columns = [{
+ "fieldname": "production_order",
+ "label": "Production Order",
+ "fieldtype": "Link",
+ "options": "Production Order",
+ "width": 110
+ }, {
+ "fieldname": "bom_no",
+ "label": "BOM",
+ "fieldtype": "Link",
+ "options": "BOM",
+ "width": 120
+ }, {
+ "fieldname": "description",
+ "label": "Description",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 230
+ }, {
+ "fieldname": "qty",
+ "label": "Qty to Build",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 110
+ }, {
+ "fieldname": "status",
+ "label": "Status",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 100
+ }, {
+ "fieldname": "req_items",
+ "label": "# Req'd Items",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 105
+ }, {
+ "fieldname": "instock",
+ "label": "# In Stock",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 105
+ }, {
+ "fieldname": "buildable_qty",
+ "label": "Buildable Qty",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 100
+ }, {
+ "fieldname": "ready_to_build",
+ "label": "Build All?",
+ "fieldtype": "Data",
+ "options": "",
+ "width": 90
+ }]
+
+ return columns
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 9e37081..4341057 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -367,3 +367,13 @@
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
+erpnext.patches.v7_2.rename_evaluation_criteria
+erpnext.patches.v7_2.update_party_type
+erpnext.patches.v7_2.setup_auto_close_settings
+erpnext.patches.v7_2.empty_supplied_items_for_non_subcontracted
+erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component
+erpnext.patches.v7_2.rename_att_date_attendance
+erpnext.patches.v7_2.update_attendance_docstatus
+erpnext.patches.v7_2.move_dates_from_salary_structure_to_employee
diff --git a/erpnext/patches/v7_0/set_portal_settings.py b/erpnext/patches/v7_0/set_portal_settings.py
index f7ee205..54a17dc 100644
--- a/erpnext/patches/v7_0/set_portal_settings.py
+++ b/erpnext/patches/v7_0/set_portal_settings.py
@@ -8,7 +8,7 @@
def execute():
frappe.reload_doctype('Role')
- for dt in ("assessment", "announcement", "course", "fees"):
+ for dt in ("assessment", "course", "fees"):
frappe.reload_doc("schools", "doctype", dt)
frappe.reload_doc('website', 'doctype', 'portal_menu_item')
diff --git a/erpnext/patches/v7_0/update_party_status.py b/erpnext/patches/v7_0/update_party_status.py
index 208b476..f3733db 100644
--- a/erpnext/patches/v7_0/update_party_status.py
+++ b/erpnext/patches/v7_0/update_party_status.py
@@ -1,8 +1,7 @@
import frappe
-from erpnext.accounts.party_status import status_depends_on, default_status
-from frappe.desk.notifications import get_filters_for
def execute():
+ return
for party_type in ('Customer', 'Supplier'):
frappe.reload_doctype(party_type)
diff --git a/erpnext/patches/v7_2/__init__.py b/erpnext/patches/v7_2/__init__.py
index e69de29..baffc48 100644
--- a/erpnext/patches/v7_2/__init__.py
+++ b/erpnext/patches/v7_2/__init__.py
@@ -0,0 +1 @@
+from __future__ import unicode_literals
diff --git a/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
new file mode 100644
index 0000000..0e5dab3
--- /dev/null
+++ b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py
@@ -0,0 +1,32 @@
+import frappe
+
+def execute():
+ frappe.reload_doctype('Salary Slip', 'Salary Component')
+ salary_components = ['Arrear', 'Leave Encashment']
+ for salary_component in salary_components:
+ if not frappe.db.exists('Salary Component', salary_component):
+ sal_comp = frappe.get_doc({
+ "doctype": "Salary Component",
+ "salary_component": salary_component,
+ "type": "Earning"
+ }).insert()
+
+ salary_slips = frappe.db.sql("""select name, arrear_amount, leave_encashment_amount from `tabSalary Slip`
+ where docstatus !=2 and (arrear_amount > 0 or leave_encashment_amount > 0)""", as_dict=True)
+
+ for salary_slip in salary_slips:
+ doc = frappe.get_doc('Salary Slip', salary_slip.name)
+
+ if salary_slip.get("arrear_amount") > 0:
+ r = doc.append('earnings', {
+ 'salary_component': 'Arrear',
+ 'amount': salary_slip.arrear_amount
+ })
+ r.db_update()
+
+ if salary_slip.get("leave_encashment_amount") > 0:
+ r = doc.append('earnings', {
+ 'salary_component': 'Leave Encashment',
+ 'amount': salary_slip.leave_encashment_amount
+ })
+ r.db_update()
\ No newline at end of file
diff --git a/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py b/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py
new file mode 100644
index 0000000..ec6f8af
--- /dev/null
+++ b/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py
@@ -0,0 +1,14 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ for doctype in ["Purchase Order", "Purchase Invoice", "Purchase Receipt"]:
+ child_table = 'Purchase Receipt Item Supplied' if doctype != 'Purchase Order' else 'Purchase Order Item Supplied'
+ for data in frappe.db.sql(""" select distinct `tab{doctype}`.name from `tab{doctype}` , `tab{child_table}`
+ where `tab{doctype}`.name = `tab{child_table}`.parent and `tab{doctype}`.docstatus != 2
+ and `tab{doctype}`.is_subcontracted = 'No' """.format(doctype = doctype, child_table = child_table), as_dict=1):
+ frappe.db.sql(""" delete from `tab{child_table}`
+ where parent = %s and parenttype = %s""".format(child_table= child_table), (data.name, doctype))
\ No newline at end of file
diff --git a/erpnext/patches/v7_2/move_dates_from_salary_structure_to_employee.py b/erpnext/patches/v7_2/move_dates_from_salary_structure_to_employee.py
new file mode 100644
index 0000000..98e076e
--- /dev/null
+++ b/erpnext/patches/v7_2/move_dates_from_salary_structure_to_employee.py
@@ -0,0 +1,9 @@
+import frappe
+
+def execute():
+ frappe.reload_doc('hr', 'doctype', 'salary_structure_employee')
+ salary_structures = frappe.db.sql("""select name, to_date, from_date from `tabSalary Structure`""", as_dict=True)
+
+ for salary_structure in salary_structures:
+ frappe.db.sql(""" update `tabSalary Structure Employee` set from_date = %s, to_date = %s
+ where parent = %s """, (salary_structure.from_date, salary_structure.to_date or 'null', salary_structure.name))
\ No newline at end of file
diff --git a/erpnext/patches/v7_2/rename_att_date_attendance.py b/erpnext/patches/v7_2/rename_att_date_attendance.py
new file mode 100644
index 0000000..f7caf70
--- /dev/null
+++ b/erpnext/patches/v7_2/rename_att_date_attendance.py
@@ -0,0 +1,14 @@
+import frappe
+from frappe.model.utils.rename_field import update_reports, update_users_report_view_settings, update_property_setters
+
+def execute():
+ if "att_date" not in frappe.db.get_table_columns("Attendance"):
+ return
+ frappe.reload_doc("hr", "doctype", "attendance")
+ frappe.db.sql("""update `tabAttendance`
+ set attendance_date = att_date
+ where attendance_date is null or attendance_date = '' or attendance_date = '0000-00-00'""")
+
+ update_reports("Attendance", "att_date", "attendance_date")
+ update_users_report_view_settings("Attendance", "att_date", "attendance_date")
+ update_property_setters("Attendance", "att_date", "attendance_date")
diff --git a/erpnext/patches/v7_2/rename_evaluation_criteria.py b/erpnext/patches/v7_2/rename_evaluation_criteria.py
new file mode 100644
index 0000000..a45604f
--- /dev/null
+++ b/erpnext/patches/v7_2/rename_evaluation_criteria.py
@@ -0,0 +1,29 @@
+import frappe
+from frappe.model.utils.rename_field import rename_field
+
+def execute():
+ frappe.rename_doc("DocType", "Evaluation Criteria", "Assessment Criteria", force=True)
+ frappe.reload_doc("schools", "doctype", "assessment_criteria")
+ if 'evaluation_criteria' in frappe.db.get_table_columns('Assessment Criteria'):
+ rename_field("Assessment Criteria", "evaluation_criteria", "assessment_criteria")
+
+ frappe.rename_doc("DocType", "Assessment Evaluation Criteria", "Assessment Plan Criteria", force=True)
+ frappe.reload_doc("schools", "doctype", "assessment_plan_criteria")
+ if 'evaluation_criteria' in frappe.db.get_table_columns('Assessment Plan'):
+ rename_field("Assessment Plan Criteria", "evaluation_criteria", "assessment_criteria")
+
+ frappe.reload_doc("schools", "doctype", "assessment_plan")
+ rename_field("Assessment Plan", "evaluation_criterias", "assessment_criteria")
+
+ frappe.reload_doc("schools", "doctype", "assessment_result_detail")
+ if 'evaluation_criteria' in frappe.db.get_table_columns('Assessment Result Detail'):
+ rename_field("Assessment Result Detail", "evaluation_criteria", "assessment_criteria")
+
+ frappe.rename_doc("DocType", "Course Evaluation Criteria", "Course Assessment Criteria", force=True)
+ frappe.reload_doc("schools", "doctype", "course_assessment_criteria")
+ if 'evaluation_criteria' in frappe.db.get_table_columns('Course Assessment Criteria'):
+ rename_field("Course Assessment Criteria", "evaluation_criteria", "assessment_criteria")
+
+ frappe.reload_doc("schools", "doctype", "course")
+ if 'evaluation_criteria' in frappe.db.get_table_columns('Course'):
+ rename_field("Course", "evaluation_criterias", "assessment_criteria")
diff --git a/erpnext/patches/v7_2/setup_auto_close_settings.py b/erpnext/patches/v7_2/setup_auto_close_settings.py
new file mode 100644
index 0000000..4eef2b9
--- /dev/null
+++ b/erpnext/patches/v7_2/setup_auto_close_settings.py
@@ -0,0 +1,18 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ # update the selling settings and set the close_opportunity_after_days
+ frappe.reload_doc("selling", "doctype", "selling_settings")
+ frappe.db.set_value("Selling Settings", "Selling Settings", "close_opportunity_after_days", 15)
+
+ # Auto close Replied opportunity
+ frappe.db.sql("""update `tabOpportunity` set status='Closed' where status='Replied'
+ and date_sub(curdate(), interval 15 Day)>modified""")
+
+ # create Support Settings doctype and update close_issue_after_days
+ frappe.reload_doc("support", "doctype", "support_settings")
+ frappe.db.set_value("Support Settings", "Support Settings", "close_issue_after_days", 7)
\ No newline at end of file
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 2ea9f6e..9c00902 100644
--- a/erpnext/patches/v7_2/update_assessment_modules.py
+++ b/erpnext/patches/v7_2/update_assessment_modules.py
@@ -17,10 +17,11 @@
frappe.reload_doc("schools", "doctype", "assessment_result")
frappe.reload_doc("schools", "doctype", "assessment_result_detail")
- frappe.reload_doc("schools", "doctype", "evaluation_criteria")
+ frappe.reload_doc("schools", "doctype", "assessment_criteria")
- for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"]):
+ for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]):
+ print assessment
for stud_result in frappe.db.sql("select * from `tabAssessment Result` where parent= %s", assessment.name, as_dict=True):
if stud_result.result:
assessment_result = frappe.new_doc("Assessment Result")
@@ -30,6 +31,7 @@
assessment_result.grading_scale = assessment.grading_scale
assessment_result.total_score = stud_result.result
assessment_result.flags.ignore_validate = True
+ assessment_result.flags.ignore_mandatory = True
assessment_result.save()
frappe.db.sql("""delete from `tabAssessment Result` where parent != '' or parent is not null""")
\ No newline at end of file
diff --git a/erpnext/patches/v7_2/update_attendance_docstatus.py b/erpnext/patches/v7_2/update_attendance_docstatus.py
new file mode 100644
index 0000000..6fbab01
--- /dev/null
+++ b/erpnext/patches/v7_2/update_attendance_docstatus.py
@@ -0,0 +1,10 @@
+import frappe
+
+def execute():
+ frappe.reload_doctype('Student Attendance')
+ # frappe.reload_doc("schools", "doctype", "student_attendance")
+ frappe.db.sql('''
+ update `tabStudent Attendance` set
+ docstatus=0
+ where
+ docstatus=1''')
\ No newline at end of file
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/patches/v7_2/update_party_type.py b/erpnext/patches/v7_2/update_party_type.py
new file mode 100644
index 0000000..147f5a3
--- /dev/null
+++ b/erpnext/patches/v7_2/update_party_type.py
@@ -0,0 +1,16 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ frappe.reload_doc('setup', 'doctype', 'party_type')
+ make_party_type()
+
+def make_party_type():
+ for party_type in ["Customer", "Supplier", "Employee"]:
+ if not frappe.db.get_value("Party Type", party_type):
+ doc = frappe.new_doc("Party Type")
+ doc.party_type = party_type
+ doc.save(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json
index 38ebbcb..dbdffdf 100644
--- a/erpnext/projects/doctype/project/project.json
+++ b/erpnext/projects/doctype/project/project.json
@@ -24,7 +24,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
@@ -51,8 +53,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Status",
"length": 0,
"no_copy": 1,
@@ -81,7 +85,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Project Type",
"length": 0,
"no_copy": 0,
@@ -110,7 +116,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Is Active",
"length": 0,
"no_copy": 0,
@@ -140,7 +148,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "% Complete Method",
"length": 0,
"no_copy": 0,
@@ -168,7 +178,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -194,7 +206,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Priority",
"length": 0,
"no_copy": 0,
@@ -222,8 +236,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Expected Start Date",
"length": 0,
"no_copy": 0,
@@ -251,7 +267,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Expected End Date",
"length": 0,
"no_copy": 0,
@@ -279,7 +297,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "% Completed",
"length": 0,
"no_copy": 1,
@@ -305,7 +325,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Customer Details",
"length": 0,
"no_copy": 0,
@@ -332,8 +354,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
@@ -362,7 +386,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -388,7 +414,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Order",
"length": 0,
"no_copy": 0,
@@ -416,7 +444,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Users",
"length": 0,
"no_copy": 0,
@@ -444,7 +474,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Users",
"length": 0,
"no_copy": 0,
@@ -472,7 +504,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Tasks",
"length": 0,
"no_copy": 0,
@@ -500,7 +534,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Tasks",
"length": 0,
"no_copy": 0,
@@ -528,7 +564,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
@@ -556,7 +594,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
@@ -584,7 +624,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Start and End Dates",
"length": 0,
"no_copy": 0,
@@ -611,7 +653,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Start Date",
"length": 0,
"no_copy": 0,
@@ -638,7 +682,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Time (in Hours)",
"length": 0,
"no_copy": 0,
@@ -665,7 +711,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -691,7 +739,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual End Date",
"length": 0,
"no_copy": 0,
@@ -719,7 +769,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Costing and Billing",
"length": 0,
"no_copy": 0,
@@ -747,7 +799,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Estimated Cost",
"length": 0,
"no_copy": 0,
@@ -777,7 +831,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Total Costing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
@@ -805,7 +861,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Total Expense Claim (via Expense Claims)",
"length": 0,
"no_copy": 0,
@@ -832,7 +890,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
@@ -859,7 +919,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Cost Center",
"length": 0,
"no_copy": 0,
@@ -886,7 +948,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -913,7 +977,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Total Billing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
@@ -940,7 +1006,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Total Purchase Cost (via Purchase Invoice)",
"length": 0,
"no_copy": 0,
@@ -967,7 +1035,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Margin",
"length": 0,
"no_copy": 0,
@@ -995,7 +1065,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Gross Margin",
"length": 0,
"no_copy": 0,
@@ -1024,7 +1096,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -1050,7 +1124,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Gross Margin %",
"length": 0,
"no_copy": 0,
@@ -1080,7 +1156,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 4,
- "modified": "2017-01-10 16:33:54.691885",
+ "modified": "2017-02-17 17:24:04.146872",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project",
@@ -1096,7 +1172,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1117,7 +1192,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1138,7 +1212,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1154,7 +1227,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "customer, status, priority, is_active",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
"timeline_field": "customer",
+ "track_changes": 0,
"track_seen": 1
}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 37fcc11..b5ef4bf 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -119,6 +119,8 @@
def update_percent_complete(self):
total = frappe.db.sql("""select count(name) from tabTask where project=%s""", self.name)[0][0]
+ if not total and self.percent_complete:
+ self.percent_complete = 0
if (self.percent_complete_method == "Task Completion" and total > 0) or (not self.percent_complete_method and total > 0):
completed = frappe.db.sql("""select count(name) from tabTask where
project=%s and status in ('Closed', 'Cancelled')""", self.name)[0][0]
diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json
index 9cd2aa8..6c8c14d 100644
--- a/erpnext/projects/doctype/task/task.json
+++ b/erpnext/projects/doctype/task/task.json
@@ -1,7 +1,7 @@
{
"allow_copy": 0,
"allow_import": 1,
- "allow_rename": 0,
+ "allow_rename": 1,
"autoname": "TASK.#####",
"beta": 0,
"creation": "2013-01-29 19:25:50",
@@ -21,7 +21,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subject",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Project",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -139,7 +143,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Priority",
@@ -170,6 +175,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Start Date",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected Time (in hours)",
@@ -257,6 +265,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Weight",
@@ -285,6 +294,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -311,7 +321,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expected End Date",
@@ -341,6 +352,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Progress",
@@ -369,6 +381,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -397,6 +410,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Details",
@@ -428,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depends On",
@@ -456,6 +471,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "depends_on",
@@ -485,6 +501,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "depends_on_tasks",
@@ -514,6 +531,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -544,6 +562,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Start Date (via Time Sheet)",
@@ -575,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Time (in hours)",
@@ -604,6 +624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -631,6 +652,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual End Date (via Time Sheet)",
@@ -660,6 +682,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -687,6 +710,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Costing Amount (via Time Sheet)",
@@ -717,6 +741,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Expense Claim (via Expense Claim)",
@@ -746,6 +771,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -773,6 +799,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Billing Amount (via Time Sheet)",
@@ -801,6 +828,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -829,6 +857,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Review Date",
@@ -859,6 +888,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Closing Date",
@@ -888,6 +918,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -914,6 +945,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -944,7 +976,7 @@
"istable": 0,
"max_attachments": 5,
"menu_index": 0,
- "modified": "2016-11-07 05:12:23.294476",
+ "modified": "2017-02-17 17:24:21.786060",
"modified_by": "Administrator",
"module": "Projects",
"name": "Task",
@@ -960,7 +992,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -976,8 +1007,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "subject",
+ "show_name_in_global_search": 0,
"sort_order": "DESC",
"timeline_field": "project",
"title_field": "subject",
+ "track_changes": 0,
"track_seen": 1
}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/task/task_calendar.js b/erpnext/projects/doctype/task/task_calendar.js
index f8fc3d3..d7468a5 100644
--- a/erpnext/projects/doctype/task/task_calendar.js
+++ b/erpnext/projects/doctype/task/task_calendar.js
@@ -7,7 +7,8 @@
"end": "exp_end_date",
"id": "name",
"title": "subject",
- "allDay": "allDay"
+ "allDay": "allDay",
+ "progress": "progress"
},
gantt: true,
filters: [
diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py
index 11d0b1c..1db0610 100644
--- a/erpnext/projects/doctype/timesheet/test_timesheet.py
+++ b/erpnext/projects/doctype/timesheet/test_timesheet.py
@@ -7,7 +7,7 @@
import unittest
import datetime
from frappe.utils.make_random import get_random
-from frappe.utils import now_datetime, nowdate, add_days
+from frappe.utils import now_datetime, nowdate, add_days, add_months
from erpnext.projects.doctype.timesheet.timesheet import OverlapError
from erpnext.projects.doctype.timesheet.timesheet import make_salary_slip, make_sales_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
@@ -88,7 +88,8 @@
es = salary_structure.append('employees', {
"employee": employee,
- "base": 1200
+ "base": 1200,
+ "from_date": add_months(nowdate(),-1)
})
diff --git a/erpnext/projects/doctype/timesheet/timesheet.json b/erpnext/projects/doctype/timesheet/timesheet.json
index 8762a23..2fd544b 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.json
+++ b/erpnext/projects/doctype/timesheet/timesheet.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -82,6 +84,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Invoice",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Salary Slip",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Detail",
@@ -227,6 +234,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Employee",
@@ -257,6 +265,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee Name",
@@ -286,6 +295,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "User",
@@ -315,6 +325,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Start Date",
@@ -370,6 +382,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End Date",
@@ -400,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Production Detail",
@@ -428,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Production Order",
@@ -457,6 +472,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Time Sheets",
@@ -511,6 +528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -540,7 +558,8 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 1,
+ "in_global_search": 0,
+ "in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Working Hours",
"length": 0,
@@ -567,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Details",
@@ -595,6 +615,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Billable Hours",
@@ -623,7 +644,8 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Billed Hours",
"length": 0,
@@ -651,6 +673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Costing Amount",
@@ -679,6 +702,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -709,6 +733,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Billable Amount",
@@ -737,6 +762,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Billed Amount",
@@ -765,6 +791,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Amount Billed",
@@ -793,6 +820,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -820,6 +848,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Note",
@@ -848,6 +877,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -877,7 +907,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-23 17:35:51.194690",
+ "modified": "2017-02-17 17:23:35.196740",
"modified_by": "Administrator",
"module": "Projects",
"name": "Timesheet",
@@ -893,7 +923,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -914,7 +943,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -935,7 +963,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -956,7 +983,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -977,7 +1003,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -998,7 +1023,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1013,6 +1037,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/projects/doctype/timesheet/timesheet_calendar.js b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
index 0af1a6c..14f016a 100644
--- a/erpnext/projects/doctype/timesheet/timesheet_calendar.js
+++ b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
@@ -4,7 +4,6 @@
"end": "end_date",
"name": "parent",
"id": "name",
- "title": "name",
"allDay": "allDay",
"child_name": "name",
"title": "title"
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index 7f85de9..cfe9f63 100644
--- a/erpnext/public/css/erpnext.css
+++ b/erpnext/public/css/erpnext.css
@@ -67,7 +67,6 @@
.pos-toolbar,
.pos-bill-toolbar {
padding: 10px 0px;
- border-bottom: 1px solid #d1d8dd;
height: 51px;
}
.pos-item-toolbar .form-group {
@@ -79,6 +78,7 @@
margin-right: -1px;
}
.pos-bill {
+ border-top: 1px solid #d1d8dd;
margin-left: -15px;
margin-right: -15px;
}
@@ -171,6 +171,9 @@
.payment-toolbar {
padding-right: 30px;
}
+.list-row-head.pos-invoice-list {
+ border-top: 1px solid #d1d8dd;
+}
body[data-route="pos"] .modal-dialog {
width: 750px;
}
diff --git a/erpnext/public/css/website.css b/erpnext/public/css/website.css
index 1617ea7..4f41937 100644
--- a/erpnext/public/css/website.css
+++ b/erpnext/public/css/website.css
@@ -250,3 +250,24 @@
.product-image-wrapper {
padding-bottom: 40px;
}
+.duration-bar {
+ display: inline-block;
+ color: white;
+ background: #8FD288;
+ padding: 2px;
+}
+.duration-invisible {
+ visibility: hidden;
+}
+.duration-value {
+ float: right;
+}
+.bar-outer-text {
+ color: #8FD288;
+ background: none;
+ float: none;
+ border: none;
+}
+.bom-spec {
+ margin-bottom: 20px;
+}
\ No newline at end of file
diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js
index 16385e1..7115205 100644
--- a/erpnext/public/js/financial_statements.js
+++ b/erpnext/public/js/financial_statements.js
@@ -31,7 +31,8 @@
"account": data.account,
"company": frappe.query_report_filters_by_name.company.get_value(),
"from_date": data.from_date || data.year_start_date,
- "to_date": data.to_date || data.year_end_date
+ "to_date": data.to_date || data.year_end_date,
+ "project": $.grep(frappe.query_report.filters, function(e){ return e.df.fieldname == 'project'; })[0].$input.val()
};
frappe.set_route("query-report", "General Ledger");
},
diff --git a/erpnext/public/js/pos/pos.html b/erpnext/public/js/pos/pos.html
index 9d0ab60..44e42d7 100644
--- a/erpnext/public/js/pos/pos.html
+++ b/erpnext/public/js/pos/pos.html
@@ -1,14 +1,26 @@
<div class="pos">
<div class="row">
- <div class="col-sm-5 pos-bill-wrapper">
- <div class="pos-bill-toolbar row">
- <div class="party-area col-xs-12"></div>
+ <div class="col-sm-6 pos-bill-wrapper">
+ <div class="pos-bill-toolbar" style="display: flex;">
+ <div class="party-area" style="flex: 1;"></div>
+ <button class="btn btn-default list-customers-btn" style="margin: 0 5px 0 15px;">
+ <i class="fa fa-list"></i>
+ </button>
+ <button class="btn btn-default add-customer-btn">
+ <i class="fa fa-plus"></i>
+ </button>
+ {% if (allow_delete) { %}
+ <button class="btn btn-default btn-danger" style="margin: 0 5px 0 5px;display:none">
+ <i class="octicon octicon-trashcan"></i>
+ </button>
+ {% } %}
</div>
<div class="pos-bill">
<div class="item-cart">
<div class="row pos-bill-row pos-bill-header">
- <div class="col-xs-5"><h6>{%= __("Item") %}</h6></div>
- <div class="col-xs-4"><h6 class="text-right">{%= __("Quantity") %}</h6></div>
+ <div class="col-xs-4"><h6>{%= __("Item") %}</h6></div>
+ <div class="col-xs-3"><h6 class="text-right">{%= __("Quantity") %}</h6></div>
+ <div class="col-xs-2"><h6 class="text-right">{%= __("Discount") %}</h6></div>
<div class="col-xs-3"><h6 class="text-right">{%= __("Rate") %}</h6></div>
</div>
<div class="items"></div>
@@ -48,18 +60,27 @@
</div>
</div>
</div>
+ <div class="list-customers">
+
+ </div>
</div>
- <div class="col-sm-7 pos-items-section">
+ <div class="col-sm-6 pos-items-section">
<div class="row pos-item-area">
</div>
<span id="customer-results" style="color:#68a;"></span>
<div class="row pos-item-toolbar">
- <div class="search-area col-xs-12"></div>
+ <div class="search-item-group col-xs-5"></div>
+ <div class="search-item col-xs-7"></div>
</div>
- <div class="item-list-area">
+ <div class="item-list-area" style="auto">
<div class="app-listing item-list"></ul>
</div>
</div>
+ <div class="row">
+ <div class="text-right list-paging-area">
+ <button class="btn btn-default btn-more btn-sm" style="margin:5px 20px">{{ __("More") }}</button>
+ </div>
+ </div>
</div>
</div>
diff --git a/erpnext/public/js/pos/pos_bill_item.html b/erpnext/public/js/pos/pos_bill_item.html
index f5d1a76..1a1f1e2 100644
--- a/erpnext/public/js/pos/pos_bill_item.html
+++ b/erpnext/public/js/pos/pos_bill_item.html
@@ -1,25 +1,30 @@
<div class="row pos-bill-row pos-bill-item" data-item-code="{%= item_code %}">
- <div class="col-xs-5"><h6>{%= item_code || "" %}{%= item_name || "" %}</h6></div>
- <div class="col-xs-4">
+ <div class="col-xs-4"><h6>{%= item_code || "" %}{%= __(item_name) || "" %}</h6></div>
+ <div class="col-xs-3">
<div class="row pos-qty-row">
<div class="col-xs-2 text-center pos-qty-btn" data-action="decrease-qty"><i class="fa fa-minus text-muted" style="font-size:12px"></i></div>
<div class="col-xs-8">
<div>
- <input type="text" value="{%= qty %}" class="form-control input-sm pos-item-qty text-right">
+ <input type="tel" value="{%= qty %}" class="form-control pos-item-qty text-right">
</div>
{% if(actual_qty != null) { %}
<div style="margin-top: 5px;" class="text-muted small text-right">
- <span title="{%= __("In Stock") %}">{%= actual_qty || 0 %}<span>
+ {%= __("In Stock: ") %} <span>{%= actual_qty || 0.0 %}</span>
</div>
{% } %}
</div>
<div class="col-xs-2 text-center pos-qty-btn" data-action="increase-qty"><i class="fa fa-plus text-muted" style="font-size:12px"></i></div>
</div>
</div>
+ <div class="col-xs-2 text-right">
+ <div class="row input-sm">
+ <input type="tel" value="{%= discount_percentage %}" class="form-control text-right pos-item-discount">
+ </div>
+ </div>
<div class="col-xs-3 text-right">
<div class="text-muted" style="margin-top: 5px;">
{% if(enabled) { %}
- <input type="text" value="{%= rate %}" class="form-control input-sm pos-item-rate text-right">
+ <input type="tel" value="{%= rate %}" class="form-control input-sm pos-item-rate text-right">
{% } else { %}
<h6>{%= format_currency(rate) %}</h6>
{% } %}
diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js
index 1141f99..bf7143a 100644
--- a/erpnext/public/js/queries.js
+++ b/erpnext/public/js/queries.js
@@ -36,7 +36,7 @@
customer_filter: function(doc) {
if(!doc.customer) {
- frappe.throw(__("Please set {0}", __(frappe.meta.get_label(doc.doctype, "customer", doc.name))));
+ frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "customer", doc.name))]));
}
return { filters: { customer: doc.customer } };
@@ -45,8 +45,8 @@
contact_query: function(doc) {
if(frappe.dynamic_link) {
if(!doc[frappe.dynamic_link.fieldname]) {
- frappe.throw(__("Please set {0}", __(frappe.meta.get_label(doc.doctype,
- frappe.dynamic_link.fieldname, doc.name))));
+ frappe.throw(__("Please set {0}",
+ [__(frappe.meta.get_label(doc.doctype, frappe.dynamic_link.fieldname, doc.name))]));
}
return {
@@ -58,8 +58,8 @@
address_query: function(doc) {
if(frappe.dynamic_link) {
if(!doc[frappe.dynamic_link.fieldname]) {
- frappe.throw(__("Please set {0}", __(frappe.meta.get_label(doc.doctype,
- frappe.dynamic_link.fieldname, doc.name))));
+ frappe.throw(__("Please set {0}",
+ [__(frappe.meta.get_label(doc.doctype, frappe.dynamic_link.fieldname, doc.name))]));
}
return {
@@ -68,9 +68,16 @@
}
},
+ company_address_query: function(doc) {
+ return {
+ query: 'frappe.geo.doctype.address.address.address_query',
+ filters: { is_your_company_address: 1, link_doctype: 'Company', link_name: doc.company || '' }
+ };
+ },
+
supplier_filter: function(doc) {
if(!doc.supplier) {
- frappe.throw(__("Please set {0}", __(frappe.meta.get_label(doc.doctype, "supplier", doc.name))));
+ frappe.throw(__("Please set {0}", [__(frappe.meta.get_label(doc.doctype, "supplier", doc.name))]));
}
return { filters: { supplier: doc.supplier } };
@@ -78,8 +85,8 @@
lead_filter: function(doc) {
if(!doc.lead) {
- frappe.throw(__("Please specify a") + " " +
- __(frappe.meta.get_label(doc.doctype, "lead", doc.name)));
+ frappe.throw(__("Please specify a {0}",
+ [__(frappe.meta.get_label(doc.doctype, "lead", doc.name))]));
}
return { filters: { lead: doc.lead } };
@@ -126,3 +133,19 @@
set_query(df.options, df.fieldname);
});
}
+
+/* if item code is selected in child table
+ then list down warehouses with its quantity
+ else apply default filters.
+*/
+erpnext.queries.setup_warehouse_query = function(frm){
+ frm.set_query('warehouse', 'items', function(doc, cdt, cdn) {
+ var row = locals[cdt][cdn];
+ var filters = erpnext.queries.warehouse(frm.doc);
+ if(row.item_code){
+ $.extend(filters, {"query":"erpnext.controllers.queries.warehouse_query"});
+ filters["filters"].push(["Bin", "item_code", "=", row.item_code]);
+ }
+ return filters
+ });
+}
diff --git a/erpnext/public/js/schools/assessment_result_tool.html b/erpnext/public/js/schools/assessment_result_tool.html
index 6f9e256..3c09ccd 100644
--- a/erpnext/public/js/schools/assessment_result_tool.html
+++ b/erpnext/public/js/schools/assessment_result_tool.html
@@ -3,14 +3,14 @@
<tr>
<th style="width: 100px" rowspan="2">Student</th>
<th style="width: 200px" rowspan="2">Student Name</th>
- {% for c in criterias %}
- <th class="score" style="width: 100px">{{ c.evaluation_criteria }}</th>
+ {% for c in criteria %}
+ <th class="score" style="width: 100px">{{ c.assessment_criteria }}</th>
{% endfor %}
<th class="score" style="width: 100px">Total Marks</th>
<!--criteria-->
</tr>
<tr>
- {% for c in criterias %}
+ {% for c in criteria %}
<th class="score" style="width: 100px">{{ c.maximum_score }}</th>
{% endfor %}
<th class="score" style="width: 100px">{{max_total_score}}</th>
@@ -23,15 +23,15 @@
data-student="{{s.student}}">
<td>{{ s.student }}</td>
<td>{{ s.student_name }}</td>
- {% for c in criterias %}
+ {% for c in criteria %}
<td>
<input type="text"
data-max-score="{{c.maximum_score}}"
- data-criteria="{{c.evaluation_criteria}}"
+ data-criteria="{{c.assessment_criteria}}"
data-student="{{s.student}}"
{% if(s.assessment_details) { %}
disabled
- value="{{s.assessment_details[c.evaluation_criteria]}}"
+ value="{{s.assessment_details[c.assessment_criteria]}}"
{% } %}/>
</td>
{% endfor %}
diff --git a/erpnext/public/js/schools/student_button.html b/erpnext/public/js/schools/student_button.html
index dabaf26..4196808 100644
--- a/erpnext/public/js/schools/student_button.html
+++ b/erpnext/public/js/schools/student_button.html
@@ -1,5 +1,5 @@
<div class="col-sm-3">
- <div class="checkbox {% if status %} text-muted {% endif %}">
+ <div class="checkbox">
<label>
<input
type="checkbox"
@@ -7,9 +7,6 @@
data-student="{{student}}"
data-student-name="{{student_name}}"
class="students-check"
- {% if status %}
- disabled="true"
- {% endif %}
{% if status === "Present" %}
checked
{% endif %}
diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js
index 56bc27e..658c4fe 100644
--- a/erpnext/public/js/setup_wizard.js
+++ b/erpnext/public/js/setup_wizard.js
@@ -100,7 +100,12 @@
fy = ["01-01", "12-31"];
next_year = current_year;
}
-
+
+ var year_start_date = current_year + "-" + fy[0];
+ if(year_start_date > get_today()) {
+ next_year = current_year
+ current_year -= 1;
+ }
slide.get_field("fy_start_date").set_input(current_year + "-" + fy[0]);
slide.get_field("fy_end_date").set_input(next_year + "-" + fy[1]);
}
diff --git a/erpnext/public/js/templates/contact_list.html b/erpnext/public/js/templates/contact_list.html
index 765ddf8..abaadff 100644
--- a/erpnext/public/js/templates/contact_list.html
+++ b/erpnext/public/js/templates/contact_list.html
@@ -1,20 +1,23 @@
<p><button class="btn btn-xs btn-default btn-contact">
{{ __("New Contact") }}</button></p>
<div class="clearfix"></div>
-
+<ol>
{% for(var i=0, l=contact_list.length; i<l; i++) { %}
<p class="h6">
- {%= i+1 %}. {%= contact_list[i].first_name %} {%= contact_list[i].last_name %}
- {% if(contact_list[i].is_primary_contact) { %}
- <span class="text-muted">({%= __("Primary") %})</span>
- {% } %}
- {% if(contact_list[i].designation){ %}
- <span class="text-muted">– {%= contact_list[i].designation %}</span>
- {% } %}
- <a href="#Form/Contact/{%= encodeURIComponent(contact_list[i].name) %}"
- class="btn btn-xs btn-default pull-right">
- {%= __("Edit") %}</a>
- </p>
+ <li>
+ {%= contact_list[i].first_name %} {%= contact_list[i].last_name %}
+ {% if(contact_list[i].is_primary_contact) { %}
+ <span class="text-muted">({%= __("Primary") %})</span>
+ {% } %}
+ {% if(contact_list[i].designation){ %}
+ <span class="text-muted">– {%= contact_list[i].designation %}</span>
+ {% } %}
+ <a href="#Form/Contact/{%= encodeURIComponent(contact_list[i].name) %}"
+ class="btn btn-xs btn-default pull-right">
+ {%= __("Edit") %}</a>
+ </li>
+ </p>
+
<div style="padding-left: 15px;">
<p style="padding-top: 5px; font-size: 12px;">
{% if(contact_list[i].phone) { %}
@@ -29,6 +32,7 @@
</p>
</div>
{% } %}
+</ol>
{% if(!contact_list.length) { %}
<p class="text-muted">{%= __("No contacts added yet.") %}</p>
-{% } %}
+{% } %}
\ No newline at end of file
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 74e9fb6..551ea51 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -82,32 +82,6 @@
$.extend(erpnext.utils, {
- clear_address_and_contact: function(frm) {
- $(frm.fields_dict['address_html'].wrapper).html("");
- frm.fields_dict['contact_html'] && $(frm.fields_dict['contact_html'].wrapper).html("");
- },
-
- render_address_and_contact: function(frm) {
- // render address
- $(frm.fields_dict['address_html'].wrapper)
- .html(frappe.render_template("address_list",
- cur_frm.doc.__onload))
- .find(".btn-address").on("click", function() {
- frappe.new_doc("Address");
- });
-
- // render contact
- if(frm.fields_dict['contact_html']) {
- $(frm.fields_dict['contact_html'].wrapper)
- .html(frappe.render_template("contact_list",
- cur_frm.doc.__onload))
- .find(".btn-contact").on("click", function() {
- frappe.new_doc("Contact");
- }
- );
- }
- },
-
set_party_dashboard_indicators: function(frm) {
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
var info = frm.doc.__onload.dashboard_info;
diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js
index a1d200f..35d0b42 100644
--- a/erpnext/public/js/utils/party.js
+++ b/erpnext/public/js/utils/party.js
@@ -129,7 +129,7 @@
if(frm.doc["contact_person"]) {
frappe.call({
- method: "erpnext.utilities.doctype.contact.contact.get_contact_details",
+ method: "frappe.email.doctype.contact.contact.get_contact_details",
args: {contact: frm.doc.contact_person },
callback: function(r) {
if(r.message)
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index 790a031..495e618 100644
--- a/erpnext/public/less/erpnext.less
+++ b/erpnext/public/less/erpnext.less
@@ -82,7 +82,7 @@
.pos-toolbar, .pos-bill-toolbar {
padding: 10px 0px;
- border-bottom: 1px solid #d1d8dd;
+ // border-bottom: 1px solid #d1d8dd;
height: 51px;
}
@@ -97,6 +97,7 @@
}
.pos-bill {
+ border-top: 1px solid @border-color;
margin-left: -15px;
margin-right: -15px;
}
@@ -213,6 +214,10 @@
padding-right: 30px;
}
+.list-row-head.pos-invoice-list {
+ border-top: 1px solid @border-color;
+}
+
body[data-route="pos"] .modal-dialog {
width: 750px;
diff --git a/erpnext/public/less/website.less b/erpnext/public/less/website.less
index a645f28..b733dab 100644
--- a/erpnext/public/less/website.less
+++ b/erpnext/public/less/website.less
@@ -320,4 +320,30 @@
.product-image-wrapper {
padding-bottom: 40px;
+}
+
+.duration-bar {
+ display: inline-block;
+ color: white;
+ background: #8FD288;
+ padding: 3px;
+}
+
+.duration-invisible {
+ visibility: hidden;
+}
+
+.duration-value {
+ float: right;
+}
+
+.bar-outer-text {
+ color: #8FD288;
+ background: none;
+ float: none;
+ border: none;
+}
+
+.bom-spec {
+ margin-bottom: 20px;
}
\ No newline at end of file
diff --git a/erpnext/schools/api.py b/erpnext/schools/api.py
index 81ae9c4..316f0dd 100644
--- a/erpnext/schools/api.py
+++ b/erpnext/schools/api.py
@@ -8,6 +8,7 @@
from frappe import _
from frappe.model.mapper import get_mapped_doc
from frappe.utils import flt, cstr
+from frappe.email.doctype.email_group.email_group import add_subscribers
@frappe.whitelist()
def enroll_student(source_name):
@@ -66,21 +67,41 @@
frappe.msgprint(_("Attendance has been marked successfully."))
def make_attendance_records(student, student_name, status, course_schedule=None, student_batch=None, date=None):
- """Creates Attendance Record.
+ """Creates/Update Attendance Record.
:param student: Student.
:param student_name: Student Name.
:param course_schedule: Course Schedule.
:param status: Status (Present/Absent)
"""
- student_attendance = frappe.new_doc("Student Attendance")
+ student_attendance_list = frappe.get_list("Student Attendance", fields = ['name'], filters = {
+ "student": student,
+ "course_schedule": course_schedule,
+ "student_batch": student_batch,
+ "date": date
+ })
+
+ if student_attendance_list:
+ student_attendance = frappe.get_doc("Student Attendance", student_attendance_list[0])
+ else:
+ student_attendance = frappe.new_doc("Student Attendance")
student_attendance.student = student
student_attendance.student_name = student_name
student_attendance.course_schedule = course_schedule
student_attendance.student_batch = student_batch
student_attendance.date = date
student_attendance.status = status
- student_attendance.submit()
+ student_attendance.save()
+
+@frappe.whitelist()
+def get_student_guardians(student):
+ """Returns List of Guardians of a Student.
+
+ :param student: Student.
+ """
+ guardians = frappe.get_list("Student Guardian", fields=["guardian"] ,
+ filters={"parent": student})
+ return guardians
@frappe.whitelist()
def get_student_batch_students(student_batch):
@@ -167,13 +188,13 @@
return data
@frappe.whitelist()
-def get_evaluation_criterias(course):
- """Returns Evaluation Criterias and their Weightage from Course Master.
+def get_assessment_criteria(course):
+ """Returns Assessmemt Criteria and their Weightage from Course Master.
:param Course: Course
"""
- return frappe.get_list("Course Evaluation Criteria", \
- fields=["evaluation_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
+ return frappe.get_list("Course Assessment Criteria", \
+ fields=["assessment_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
@frappe.whitelist()
def get_assessment_students(assessment_plan, student_group=None, student_batch=None):
@@ -187,7 +208,7 @@
if result:
student_result = {}
for d in result.details:
- student_result.update({d.evaluation_criteria: cstr(d.score) + " ("+ d.grade + ")"})
+ student_result.update({d.assessment_criteria: cstr(d.score) + " ("+ d.grade + ")"})
student_result.update({"total_score": cstr(result.total_score) + " (" + result.grade + ")"})
student.update({'assessment_details': student_result})
else:
@@ -196,12 +217,12 @@
@frappe.whitelist()
def get_assessment_details(assessment_plan):
- """Returns Evaluation Criteria and Maximum Score from Assessment Plan Master.
+ """Returns Assessment Criteria and Maximum Score from Assessment Plan Master.
:param Assessment Plan: Assessment Plan
"""
- return frappe.get_list("Assessment Evaluation Criteria", \
- fields=["evaluation_criteria", "maximum_score"], filters={"parent": assessment_plan}, order_by= "idx")
+ return frappe.get_list("Assessment Plan Criteria", \
+ fields=["assessment_criteria", "maximum_score"], filters={"parent": assessment_plan}, order_by= "idx")
@frappe.whitelist()
def get_result(student, assessment_plan):
@@ -241,7 +262,7 @@
details = []
for s in student_score.keys():
details.append({
- "evaluation_criteria": s,
+ "assessment_criteria": s,
"score": flt(student_score[s])
})
assessment_result = frappe.new_doc("Assessment Result")
@@ -253,4 +274,23 @@
})
assessment_result.save()
assessment_result.submit()
- return assessment_result
\ No newline at end of file
+ return assessment_result
+
+@frappe.whitelist()
+def update_email_group(doctype, name):
+ if not frappe.db.exists("Email Group", name):
+ email_group = frappe.new_doc("Email Group")
+ email_group.title = name
+ email_group.save()
+ email_list = []
+ students = []
+ if doctype == "Student Batch":
+ students = get_student_batch_students(name)
+ if doctype == "Student Group":
+ students = get_student_group_students(name)
+ for stud in students:
+ for guard in get_student_guardians(stud.student):
+ email = frappe.db.get_value("Guardian", guard.guardian, "email_address")
+ if email:
+ email_list.append(email)
+ add_subscribers(name, email_list)
diff --git a/erpnext/schools/doctype/announcement/announcement.js b/erpnext/schools/doctype/announcement/announcement.js
deleted file mode 100644
index 5b1d1c0..0000000
--- a/erpnext/schools/doctype/announcement/announcement.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2016, Frappe and contributors
-// For license information, please see license.txt
-
-frappe.ui.form.on('Announcement', {
- onload: function(frm) {
- frm.add_fetch('instructor', 'instructor_name' , 'posted_by');
- }
-});
-
diff --git a/erpnext/schools/doctype/announcement/announcement.json b/erpnext/schools/doctype/announcement/announcement.json
deleted file mode 100644
index 831b71f..0000000
--- a/erpnext/schools/doctype/announcement/announcement.json
+++ /dev/null
@@ -1,315 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "autoname": "announcement.#####",
- "beta": 0,
- "creation": "2016-06-23 05:37:33.996289",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 0,
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "default": "",
- "fieldname": "receiver",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Receiver",
- "length": 0,
- "no_copy": 0,
- "options": "Student\nStudent Group\nAll Students",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "instructor",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Instructor",
- "length": 0,
- "no_copy": 0,
- "options": "Instructor",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval: doc.receiver == \"Student\"",
- "fieldname": "student",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Student",
- "length": 0,
- "no_copy": 0,
- "options": "Student",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "depends_on": "eval: doc.receiver == \"Student Group\"",
- "fieldname": "student_group",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Student Group",
- "length": 0,
- "no_copy": 0,
- "options": "Student Group",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "posted_by",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Posted By",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "section_break_5",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "subject",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Subject",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "description",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Description",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Amended From",
- "length": 0,
- "no_copy": 1,
- "options": "Announcement",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- }
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 1,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2016-07-21 06:30:12.825629",
- "modified_by": "r@r.com",
- "module": "Schools",
- "name": "Announcement",
- "name_case": "",
- "owner": "demo@erpnext.com",
- "permissions": [
- {
- "amend": 1,
- "apply_user_permissions": 0,
- "cancel": 1,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Academics User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
- "write": 1
- }
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "title_field": "subject",
- "track_seen": 1
-}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/announcement.py b/erpnext/schools/doctype/announcement/announcement.py
deleted file mode 100644
index 1a3fe75d..0000000
--- a/erpnext/schools/doctype/announcement/announcement.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.model.document import Document
-from frappe import _
-
-class Announcement(Document):
- def validate(self):
- self.validate_receiver()
- self.set_posted_by()
-
- def validate_receiver(self):
- if self.receiver == "Student":
- if not self.student:
- frappe.throw(_("Please select a Student"))
- self.student_group = None
- elif self.receiver == "Student Group":
- if not self.student_group:
- frappe.throw(_("Please select a Student Group"))
- self.student = None
- else:
- self.student_group = None
- self.student = None
-
- def set_posted_by(self):
- if self.instructor:
- self.posted_by = frappe.db.get_value("Instructor", self.instructor, "instructor_name")
- else:
- self.posted_by = frappe.session.user
-
-
-
-
-def get_message_list(doctype, txt, filters, limit_start, limit_page_length=20):
- user = frappe.session.user
- student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
- if student:
- sg_list = frappe.db.sql("""select parent from `tabStudent Group Student` as sgs
- where sgs.student = %s """,(student))
-
- data = frappe.db.sql("""select name, receiver, subject, description, posted_by, modified,
- student, student_group
- from `tabAnnouncement` as announce
- where (announce.receiver = "Student" and announce.student = %s)
- or (announce.receiver = "Student Group" and announce.student_group in %s)
- or announce.receiver = "All Students"
- and announce.docstatus = 1
- order by announce.idx asc limit {0} , {1}"""
- .format(limit_start, limit_page_length), (student,sg_list), as_dict = True)
-
- for announcement in data:
- try:
- num_attachments = frappe.db.sql(""" select count(file_url) from tabFile as file
- where file.attached_to_name=%s
- and file.attached_to_doctype=%s""",(announcement.name,"Announcement"))
-
- except IOError or frappe.DoesNotExistError:
- pass
- frappe.local.message_log.pop()
-
- announcement.num_attachments = num_attachments[0][0]
-
- return data
-
-def get_list_context(context=None):
- return {
- "show_sidebar": True,
- 'no_breadcrumbs': True,
- "title": _("Announcements"),
- "get_list": get_message_list,
- "row_template": "templates/includes/announcement/announcement_row.html"
- }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/test_announcement.py b/erpnext/schools/doctype/announcement/test_announcement.py
deleted file mode 100644
index b0200a2..0000000
--- a/erpnext/schools/doctype/announcement/test_announcement.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe and Contributors
-# See license.txt
-from __future__ import unicode_literals
-
-import frappe
-import unittest
-
-# test_records = frappe.get_test_records('Announcement')
-
-class TestAnnouncement(unittest.TestCase):
- pass
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py b/erpnext/schools/doctype/assessment_criteria/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py
rename to erpnext/schools/doctype/assessment_criteria/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.js
similarity index 78%
rename from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
rename to erpnext/schools/doctype/assessment_criteria/assessment_criteria.js
index 5e0269b..44b9ca3 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Assessment Criteria', {
refresh: function(frm) {
}
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.json
similarity index 64%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
copy to erpnext/schools/doctype/assessment_criteria/assessment_criteria.json
index f830abe..990b22b 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
+++ b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.json
@@ -2,7 +2,7 @@
"allow_copy": 0,
"allow_import": 1,
"allow_rename": 0,
- "autoname": "field:evaluation_criteria",
+ "autoname": "field:assessment_criteria",
"beta": 0,
"creation": "2016-12-14 16:40:15.144115",
"custom": 0,
@@ -17,15 +17,14 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
+ "fieldname": "assessment_criteria",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Assessment Criteria",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -39,6 +38,34 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "assessment_criteria_group",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Assessment Criteria Group",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Assessment Criteria Group",
+ "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,
@@ -51,10 +78,10 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-14 16:40:36.351183",
+ "modified": "2017-02-03 05:53:39.248759",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Evaluation Criteria",
+ "name": "Assessment Criteria",
"name_case": "",
"owner": "Administrator",
"permissions": [
@@ -68,7 +95,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -85,5 +111,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/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/schools/doctype/assessment_criteria/assessment_criteria.py
index 85c1b32..e666a74 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class AssessmentCriteria(Document):
pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.py
similarity index 62%
rename from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
rename to erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.py
index 0182db6..fc0d745 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.py
@@ -6,7 +6,7 @@
import frappe
import unittest
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Assessment Criteria')
-class TestEvaluationCriteria(unittest.TestCase):
+class TestAssessmentCriteria(unittest.TestCase):
pass
diff --git a/erpnext/schools/doctype/assessment_criteria/test_records.json b/erpnext/schools/doctype/assessment_criteria/test_records.json
new file mode 100644
index 0000000..7af63b3
--- /dev/null
+++ b/erpnext/schools/doctype/assessment_criteria/test_records.json
@@ -0,0 +1,8 @@
+[
+ {
+ "assessment_criteria": "_Test Assessment Criteria"
+ },
+ {
+ "assessment_criteria": "_Test Assessment Criteria 1"
+ }
+]
\ No newline at end of file
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py b/erpnext/schools/doctype/assessment_criteria_group/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py
copy to erpnext/schools/doctype/assessment_criteria_group/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.js
similarity index 75%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
copy to erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.js
index 5e0269b..89358d2 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Assessment Criteria Group', {
refresh: function(frm) {
}
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.json
similarity index 82%
rename from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
rename to erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.json
index f830abe..0319868 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
+++ b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.json
@@ -1,10 +1,10 @@
{
"allow_copy": 0,
"allow_import": 1,
- "allow_rename": 0,
- "autoname": "field:evaluation_criteria",
+ "allow_rename": 1,
+ "autoname": "field:assessment_criteria_group",
"beta": 0,
- "creation": "2016-12-14 16:40:15.144115",
+ "creation": "2017-01-27 15:17:38.855910",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
@@ -17,7 +17,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
+ "fieldname": "assessment_criteria_group",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -25,7 +25,7 @@
"in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Assessment Criteria Group",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -51,10 +51,10 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-14 16:40:36.351183",
+ "modified": "2017-02-01 17:39:12.453618",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Evaluation Criteria",
+ "name": "Assessment Criteria Group",
"name_case": "",
"owner": "Administrator",
"permissions": [
@@ -68,7 +68,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -85,5 +84,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/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.py
similarity index 85%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.py
index 85c1b32..75381e1 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class AssessmentCriteriaGroup(Document):
pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.py
similarity index 60%
copy from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
copy to erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.py
index 0182db6..5b29337 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.py
@@ -6,7 +6,7 @@
import frappe
import unittest
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Assessment Criteria Group')
-class TestEvaluationCriteria(unittest.TestCase):
+class TestAssessmentCriteriaGroup(unittest.TestCase):
pass
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.py b/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.py
deleted file mode 100644
index 08f6fd4..0000000
--- a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.model.document import Document
-
-class AssessmentEvaluationCriteria(Document):
- pass
diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.js b/erpnext/schools/doctype/assessment_plan/assessment_plan.js
index 374b444..9685e0e 100644
--- a/erpnext/schools/doctype/assessment_plan/assessment_plan.js
+++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.js
@@ -7,23 +7,34 @@
cur_frm.add_fetch("supervisor", "instructor_name", "supervisor_name");
frappe.ui.form.on("Assessment Plan", {
+ refresh: function(frm) {
+ if (!frm.doc.__islocal) {
+ frm.add_custom_button(__("Assessment Result"), function() {
+ frappe.route_options = {
+ assessment_plan: frm.doc.name
+ }
+ frappe.set_route("Form", "Assessment Result Tool");
+ });
+ }
+ },
+
course: function(frm) {
if (frm.doc.course && frm.doc.maximum_assessment_score) {
frappe.call({
- method: "erpnext.schools.api.get_evaluation_criterias",
+ method: "erpnext.schools.api.get_assessment_criteria",
args: {
course: frm.doc.course
},
callback: function(r) {
if (r.message) {
- frm.doc.evaluation_criterias = [];
+ frm.doc.assessment_criteria = [];
$.each(r.message, function(i, d) {
- var row = frappe.model.add_child(frm.doc, "Assessment Evaluation Criteria", "evaluation_criterias");
- row.evaluation_criteria = d.evaluation_criteria;
+ var row = frappe.model.add_child(frm.doc, "Assessment Plan Criteria", "assessment_criteria");
+ row.assessment_criteria = d.assessment_criteria;
row.maximum_score = d.weightage / 100 * frm.doc.maximum_assessment_score;
});
}
- refresh_field("evaluation_criterias");
+ refresh_field("assessment_criteria");
}
});
diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.json b/erpnext/schools/doctype/assessment_plan/assessment_plan.json
index 967c689..bf1f2c2 100644
--- a/erpnext/schools/doctype/assessment_plan/assessment_plan.json
+++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Assessment Name",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Assessment Code",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Assessment Group",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Course",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maximum Assessment Score",
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Grading Scale",
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -248,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Student Group",
@@ -277,6 +286,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -304,6 +314,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch",
@@ -335,6 +346,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Schedule",
@@ -364,6 +376,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Schedule Date",
@@ -392,6 +405,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Room",
@@ -421,6 +435,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Examiner",
@@ -450,6 +465,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Examiner Name",
@@ -478,6 +494,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -505,6 +522,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Time",
@@ -533,6 +551,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Time",
@@ -561,6 +580,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supervisor",
@@ -590,6 +610,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supervisor Name",
@@ -618,6 +639,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -639,18 +661,19 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criterias",
+ "fieldname": "assessment_criteria",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Evaluation Criterias",
+ "label": "Assessment Criteria",
"length": 0,
"no_copy": 0,
- "options": "Assessment Evaluation Criteria",
+ "options": "Assessment Plan Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -674,6 +697,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -703,7 +727,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2017-01-05 12:15:33.183100",
+ "modified": "2017-02-17 17:15:26.824469",
"modified_by": "Administrator",
"module": "Schools",
"name": "Assessment Plan",
@@ -720,7 +744,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -735,6 +758,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.py b/erpnext/schools/doctype/assessment_plan/assessment_plan.py
index aa84ae3..31e96aa 100644
--- a/erpnext/schools/doctype/assessment_plan/assessment_plan.py
+++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.py
@@ -13,7 +13,7 @@
frappe.throw(_("Please select Student Group or Student Batch"))
self.validate_student_batch()
self.validate_overlap()
-
+ self.validate_max_score()
def validate_overlap(self):
"""Validates overlap for Student Group/Student Batch, Instructor, Room"""
@@ -42,4 +42,11 @@
def validate_student_batch(self):
if self.student_group:
- self.student_batch = frappe.db.get_value("Student Group", self.student_group, "student_batch")
\ No newline at end of file
+ self.student_batch = frappe.db.get_value("Student Group", self.student_group, "student_batch")
+
+ def validate_max_score(self):
+ max_score = 0
+ for d in self.assessment_criteria:
+ max_score += d.maximum_score
+ if self.maximum_assessment_score != max_score:
+ frappe.throw(_("Sum of Scores of Assessment Criteria needs to be {0}.".format(self.maximum_assessment_score)))
\ No newline at end of file
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py b/erpnext/schools/doctype/assessment_plan_criteria/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py
copy to erpnext/schools/doctype/assessment_plan_criteria/__init__.py
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.json b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.json
similarity index 91%
rename from erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.json
rename to erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.json
index 870aaa0..2ba5ca7 100644
--- a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.json
+++ b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.json
@@ -17,7 +17,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
+ "fieldname": "assessment_criteria",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -25,10 +25,10 @@
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Assessment Criteria",
"length": 0,
"no_copy": 0,
- "options": "Evaluation Criteria",
+ "options": "Assessment Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -108,10 +108,10 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-12-14 17:31:11.950549",
+ "modified": "2017-02-01 17:11:47.164623",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Assessment Evaluation Criteria",
+ "name": "Assessment Plan Criteria",
"name_case": "",
"owner": "Administrator",
"permissions": [],
@@ -120,5 +120,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/doctype/course_evaluation_criteria/course_evaluation_criteria.py b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.py
similarity index 85%
rename from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
rename to erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.py
index b8398a3..53b477f 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class CourseEvaluationCriteria(Document):
+class AssessmentPlanCriteria(Document):
pass
diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.js b/erpnext/schools/doctype/assessment_result/assessment_result.js
index 265a626..0af5adc 100644
--- a/erpnext/schools/doctype/assessment_result/assessment_result.js
+++ b/erpnext/schools/doctype/assessment_result/assessment_result.js
@@ -17,7 +17,7 @@
frm.doc.details = [];
$.each(r.message, function(i, d) {
var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
- row.evaluation_criteria = d.evaluation_criteria;
+ row.assessment_criteria = d.assessment_criteria;
row.maximum_score = d.maximum_score;
});
}
diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.json b/erpnext/schools/doctype/assessment_result/assessment_result.json
index 3bf9758..d56c941 100644
--- a/erpnext/schools/doctype/assessment_result/assessment_result.json
+++ b/erpnext/schools/doctype/assessment_result/assessment_result.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Student Name",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Assessment Plan",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grading Scale",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Details",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -249,6 +257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maximum Score",
@@ -277,6 +286,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Score",
@@ -305,6 +315,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -332,6 +343,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grade",
@@ -354,12 +366,70 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "section_break_13",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "comment",
+ "fieldtype": "Long Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Comment",
+ "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": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -388,7 +458,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-04 16:56:33.868949",
+ "modified": "2017-02-21 08:03:46.054604",
"modified_by": "Administrator",
"module": "Schools",
"name": "Assessment Result",
@@ -405,7 +475,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -420,6 +489,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "student_name",
diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.py b/erpnext/schools/doctype/assessment_result/assessment_result.py
index 860dcbd..c878ec3 100644
--- a/erpnext/schools/doctype/assessment_result/assessment_result.py
+++ b/erpnext/schools/doctype/assessment_result/assessment_result.py
@@ -21,10 +21,10 @@
assessment_details = get_assessment_details(self.assessment_plan)
max_scores = {}
for d in assessment_details:
- max_scores.update({d.evaluation_criteria: d.maximum_score})
+ max_scores.update({d.assessment_criteria: d.maximum_score})
for d in self.details:
- d.maximum_score = max_scores.get(d.evaluation_criteria)
+ d.maximum_score = max_scores.get(d.assessment_criteria)
if d.score > d.maximum_score:
frappe.throw(_("Score cannot be greater than Maximum Score"))
diff --git a/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json b/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json
index 87ce120..7956a32 100644
--- a/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json
+++ b/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json
@@ -17,7 +17,7 @@
"bold": 0,
"collapsible": 0,
"columns": 4,
- "fieldname": "evaluation_criteria",
+ "fieldname": "assessment_criteria",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -25,10 +25,10 @@
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Assessment Criteria",
"length": 0,
"no_copy": 0,
- "options": "Evaluation Criteria",
+ "options": "Assessment Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -164,7 +164,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-12-27 16:18:12.022257",
+ "modified": "2017-02-01 18:33:06.006040",
"modified_by": "Administrator",
"module": "Schools",
"name": "Assessment Result Detail",
@@ -176,5 +176,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/doctype/assessment_result_tool/assessment_result_tool.js b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js
index c58304b..8fd670e 100644
--- a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js
+++ b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js
@@ -39,15 +39,15 @@
assessment_plan: assessment_plan
},
callback: function(r) {
- var criterias = r.message;
+ var criteria_list = r.message;
var max_total_score = 0;
- criterias.forEach(function(c) {
+ criteria_list.forEach(function(c) {
max_total_score += c.maximum_score
});
var result_table = $(frappe.render_template('assessment_result_tool', {
frm: frm,
students: students,
- criterias: criterias,
+ criteria: criteria_list,
max_total_score: max_total_score
}));
result_table.appendTo(frm.fields_dict.result_html.wrapper)
@@ -67,7 +67,8 @@
value = max_score;
}
student_scores[student][criteria] = value;
- if(Object.keys(student_scores[student]).length == criterias.length) {
+ if(Object.keys(student_scores[student]).length == criteria_list.length) {
+ console.log("ok");
frappe.call(({
method: "erpnext.schools.api.mark_assessment_result",
args: {
@@ -87,7 +88,7 @@
var criteria = $input.data().criteria;
var value = $input.val();
var grade = details.find(function(d) {
- return d.evaluation_criteria === criteria;
+ return d.assessment_criteria === criteria;
}).grade;
$input.val(`${value} (${grade})`);
$input.attr('disabled', true);
diff --git a/erpnext/schools/doctype/course/course.json b/erpnext/schools/doctype/course/course.json
index 3f16619..d1ca261 100644
--- a/erpnext/schools/doctype/course/course.json
+++ b/erpnext/schools/doctype/course/course.json
@@ -1,362 +1,375 @@
{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 1,
- "autoname": "field:course_name",
- "beta": 0,
- "creation": "2015-09-07 12:39:55.181893",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "",
- "editable_grid": 0,
- "engine": "InnoDB",
- "fields": [{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "course_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Course Name",
- "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": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "course_code",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Course Code",
- "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_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "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": "course_abbreviation",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Course Abbreviation",
- "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": "department",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Department",
- "length": 0,
- "no_copy": 0,
- "options": "Department",
- "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_6",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "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": "course_intro",
- "fieldtype": "Text Editor",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Course Intro",
- "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": "assessment",
- "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": "Assessment",
- "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": "default_grading_scale",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Default Grading Scale",
- "length": 0,
- "no_copy": 0,
- "options": "Grading Scale",
- "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": "evaluation_criterias",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Evaluation Criterias",
- "length": 0,
- "no_copy": 0,
- "options": "Course Evaluation Criteria",
- "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,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "menu_index": 0,
- "modified": "2016-12-14 16:48:16.642813",
- "modified_by": "Administrator",
- "module": "Schools",
- "name": "Course",
- "name_case": "",
- "owner": "Administrator",
- "permissions": [{
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Academics User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- },
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "HR Manager",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
- "write": 1
- }
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "department",
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_seen": 0
+ "allow_copy": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
+ "autoname": "field:course_name",
+ "beta": 0,
+ "creation": "2015-09-07 12:39:55.181893",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 0,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "course_name",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Course Name",
+ "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": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "course_code",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Course Code",
+ "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_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "course_abbreviation",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Course Abbreviation",
+ "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": "department",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Department",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Department",
+ "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_6",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "course_intro",
+ "fieldtype": "Text Editor",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Course Intro",
+ "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": "assessment",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Assessment",
+ "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": "default_grading_scale",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Grading Scale",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Grading Scale",
+ "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": "assessment_criteria",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Assessment Criteria",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Course Assessment Criteria",
+ "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,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "menu_index": 0,
+ "modified": "2017-02-17 17:22:36.450073",
+ "modified_by": "Administrator",
+ "module": "Schools",
+ "name": "Course",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Academics User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 0,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "search_fields": "department",
+ "show_name_in_global_search": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 0,
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/course/course.py b/erpnext/schools/doctype/course/course.py
index 3baccdf..0ac11ec 100644
--- a/erpnext/schools/doctype/course/course.py
+++ b/erpnext/schools/doctype/course/course.py
@@ -9,12 +9,12 @@
class Course(Document):
def validate(self):
- self.validate_evaluation_criterias()
+ self.validate_assessment_criteria()
- def validate_evaluation_criterias(self):
- if self.evaluation_criterias:
+ def validate_assessment_criteria(self):
+ if self.assessment_criteria:
total_weightage = 0
- for criteria in self.evaluation_criterias:
+ for criteria in self.assessment_criteria:
total_weightage += criteria.weightage
if total_weightage != 100:
- frappe.throw(_("Total Weightage of all Evaluation Criterias must be 100%"))
+ frappe.throw(_("Total Weightage of all Assessment Criteria must be 100%"))
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/__init__.py b/erpnext/schools/doctype/course_assessment_criteria/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/course_evaluation_criteria/__init__.py
rename to erpnext/schools/doctype/course_assessment_criteria/__init__.py
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.json
similarity index 91%
rename from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json
rename to erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.json
index a4d3ce4..6646d20 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json
+++ b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.json
@@ -17,7 +17,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
+ "fieldname": "assessment_criteria",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -25,10 +25,10 @@
"in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Assessment Criteria",
"length": 0,
"no_copy": 0,
- "options": "Evaluation Criteria",
+ "options": "Assessment Criteria",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -108,10 +108,10 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-12-14 16:59:17.353023",
+ "modified": "2017-02-01 18:01:40.682674",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Course Evaluation Criteria",
+ "name": "Course Assessment Criteria",
"name_case": "",
"owner": "Administrator",
"permissions": [],
@@ -120,5 +120,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/doctype/course_evaluation_criteria/course_evaluation_criteria.py b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.py
similarity index 85%
copy from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
copy to erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.py
index b8398a3..ade2a39 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
+++ b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class CourseEvaluationCriteria(Document):
+class CourseAssessmentCriteria(Document):
pass
diff --git a/erpnext/schools/doctype/course_schedule/course_schedule.json b/erpnext/schools/doctype/course_schedule/course_schedule.json
index 450d7cf..d678d28 100644
--- a/erpnext/schools/doctype/course_schedule/course_schedule.json
+++ b/erpnext/schools/doctype/course_schedule/course_schedule.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Student Group",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Instructor",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructor Name",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Course",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -253,6 +261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Schedule Date",
@@ -281,6 +290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Room",
@@ -310,6 +320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -337,6 +348,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "From Time",
@@ -365,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "To Time",
@@ -393,6 +406,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -422,7 +436,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-09 17:00:02.822788",
+ "modified": "2017-02-17 17:14:46.074804",
"modified_by": "Administrator",
"module": "Schools",
"name": "Course Schedule",
@@ -434,33 +448,11 @@
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
- "delete": 0,
- "email": 0,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 0,
- "read": 1,
- "report": 1,
- "role": "Instructor",
- "set_user_permissions": 0,
- "share": 0,
- "submit": 0,
- "write": 1
- },
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -475,8 +467,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "schedule_date",
"sort_order": "DESC",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/discussion/discussion.js b/erpnext/schools/doctype/discussion/discussion.js
deleted file mode 100644
index df3c2b8..0000000
--- a/erpnext/schools/doctype/discussion/discussion.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2016, Frappe and contributors
-// For license information, please see license.txt
-
-frappe.ui.form.on('Discussion', {
- refresh: function(frm) {
-
- }
-});
diff --git a/erpnext/schools/doctype/discussion/discussion.json b/erpnext/schools/doctype/discussion/discussion.json
deleted file mode 100644
index 57ebfba..0000000
--- a/erpnext/schools/doctype/discussion/discussion.json
+++ /dev/null
@@ -1,175 +0,0 @@
-{
- "allow_copy": 0,
- "allow_import": 1,
- "allow_rename": 0,
- "autoname": "Discussion.####",
- "beta": 0,
- "creation": "2016-06-13 07:57:38.326925",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Document",
- "editable_grid": 0,
- "engine": "InnoDB",
- "fields": [
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "subject",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Subject",
- "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": 1,
- "search_index": 1,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "course",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Course",
- "length": 0,
- "no_copy": 0,
- "options": "Course",
- "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": 1,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "description",
- "fieldtype": "Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Description",
- "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": "amended_from",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Amended From",
- "length": 0,
- "no_copy": 1,
- "options": "Discussion",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- }
- ],
- "hide_heading": 0,
- "hide_toolbar": 0,
- "idx": 0,
- "image_view": 0,
- "in_create": 0,
- "in_dialog": 0,
- "is_submittable": 1,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2016-11-07 05:28:34.032169",
- "modified_by": "Administrator",
- "module": "Schools",
- "name": "Discussion",
- "name_case": "",
- "owner": "Administrator",
- "permissions": [
- {
- "amend": 0,
- "apply_user_permissions": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 1,
- "if_owner": 0,
- "import": 0,
- "is_custom": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Academics User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 1,
- "write": 1
- }
- ],
- "quick_entry": 1,
- "read_only": 0,
- "read_only_onload": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "title_field": "subject",
- "track_seen": 1
-}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/discussion/discussion.py b/erpnext/schools/doctype/discussion/discussion.py
deleted file mode 100644
index 96732e3..0000000
--- a/erpnext/schools/doctype/discussion/discussion.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe import _
-from frappe.model.document import Document
-
-class Discussion(Document):
- def validate(self):
- if not self.owner== frappe.session.user:
- frappe.throw(_("Not Permitted"))
-
-def get_discussions(doctype, txt, filters, limit_start, limit_page_length=20):
- from frappe.www.list import get_list
- if not filters:
- filters = []
- filters.append(("Discussion", "course", "=", frappe.form_dict.course))
- return get_list(doctype, txt, filters, limit_start, limit_page_length, ignore_permissions=True)
-
-def get_list_context(context=None):
- course_name = frappe.form_dict.course
- portal_items = [{'reference_doctype': u'Topic', 'route': u"/topic?course=" + str(course_name), 'show_always': 0L, 'title': u'Topics'},
- {'reference_doctype': u'Discussion', 'route': u"/discussion?course=" + str(course_name), 'show_always': 0L, 'title': u'Discussions'},
-
- ]
- sidebar_title = course_name
- return {
- "show_sidebar": True,
- 'no_breadcrumbs': True,
- "get_list" : get_discussions,
- "title": _("Discussions"),
- "sidebar_items" : portal_items,
- "sidebar_title" : sidebar_title,
- "row_template": "templates/includes/discussion/discussion_row.html"
- }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/discussion/test_discussion.py b/erpnext/schools/doctype/discussion/test_discussion.py
deleted file mode 100644
index 31799f0..0000000
--- a/erpnext/schools/doctype/discussion/test_discussion.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe and Contributors
-# See license.txt
-from __future__ import unicode_literals
-
-import frappe
-import unittest
-
-# test_records = frappe.get_test_records('Discussion')
-
-class TestDiscussion(unittest.TestCase):
- pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/__init__.py b/erpnext/schools/doctype/evaluation_criteria/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/schools/doctype/evaluation_criteria/__init__.py
+++ /dev/null
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_records.json b/erpnext/schools/doctype/evaluation_criteria/test_records.json
deleted file mode 100644
index 64ff701..0000000
--- a/erpnext/schools/doctype/evaluation_criteria/test_records.json
+++ /dev/null
@@ -1,8 +0,0 @@
-[
- {
- "evaluation_criteria": "_Test Evaluation Criteria"
- },
- {
- "evaluation_criteria": "_Test Evaluation Criteria 1"
- }
-]
\ No newline at end of file
diff --git a/erpnext/schools/doctype/fee_category/fee_category.json b/erpnext/schools/doctype/fee_category/fee_category.json
index da8f7b1..cf2eb06 100644
--- a/erpnext/schools/doctype/fee_category/fee_category.json
+++ b/erpnext/schools/doctype/fee_category/fee_category.json
@@ -15,13 +15,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "category_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Name",
"length": 0,
"no_copy": 0,
@@ -32,6 +35,7 @@
"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,
@@ -42,13 +46,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -59,6 +66,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,
@@ -79,7 +87,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-07-25 08:42:24.309236",
+ "modified": "2017-02-20 13:18:30.034466",
"modified_by": "Administrator",
"module": "Schools",
"name": "Fee Category",
@@ -111,7 +119,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "description",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/fee_structure/fee_structure.json b/erpnext/schools/doctype/fee_structure/fee_structure.json
index 6e99032..03b4fb8 100644
--- a/erpnext/schools/doctype/fee_structure/fee_structure.json
+++ b/erpnext/schools/doctype/fee_structure/fee_structure.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Program",
@@ -54,6 +55,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series",
@@ -83,6 +85,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Term",
@@ -142,6 +146,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Category",
@@ -171,6 +176,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -198,6 +204,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Components",
@@ -227,6 +234,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -254,6 +262,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Total Amount",
@@ -284,7 +293,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:25:37.393218",
+ "modified": "2017-02-17 17:17:25.543140",
"modified_by": "Administrator",
"module": "Schools",
"name": "Fee Structure",
@@ -301,7 +310,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -316,8 +324,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "program",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/fees/fees.json b/erpnext/schools/doctype/fees/fees.json
index 6309dbd..076bbe0 100644
--- a/erpnext/schools/doctype/fees/fees.json
+++ b/erpnext/schools/doctype/fees/fees.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Academic Year",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Academic Term",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fee Structure",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Due Date",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -194,6 +200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Name",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Program",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Program Enrollment",
@@ -309,6 +319,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Category",
@@ -338,6 +349,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -365,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Components",
@@ -394,6 +407,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -421,6 +435,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -449,6 +464,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -477,6 +493,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount",
@@ -506,6 +523,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid Amount",
@@ -535,6 +553,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Outstanding Amount",
@@ -564,7 +583,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:25:29.875222",
+ "modified": "2017-02-17 17:22:49.264775",
"modified_by": "Administrator",
"module": "Schools",
"name": "Fees",
@@ -581,7 +600,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -596,8 +614,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "student_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/grading_scale/grading_scale.py b/erpnext/schools/doctype/grading_scale/grading_scale.py
index f7f6ba9..4abff96 100644
--- a/erpnext/schools/doctype/grading_scale/grading_scale.py
+++ b/erpnext/schools/doctype/grading_scale/grading_scale.py
@@ -5,6 +5,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _
+from frappe.utils import cint
from frappe.model.document import Document
class GradingScale(Document):
@@ -12,8 +13,8 @@
thresholds = []
for d in self.intervals:
if d.threshold in thresholds:
- frappe.throw(_("Treshold {0}% appears more than once.".format(d.threshold)))
+ frappe.throw(_("Treshold {0}% appears more than once".format(d.threshold)))
else:
- thresholds.append(d.threshold)
+ thresholds.append(cint(d.threshold))
if 0 not in thresholds:
frappe.throw(_("Please define grade for treshold 0%"))
\ No newline at end of file
diff --git a/erpnext/schools/doctype/guardian/guardian.json b/erpnext/schools/doctype/guardian/guardian.json
index 8368f4a..22b8bd8 100644
--- a/erpnext/schools/doctype/guardian/guardian.json
+++ b/erpnext/schools/doctype/guardian/guardian.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Guardian Name",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Email Address",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Mobile Number",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Alternate Number",
@@ -129,39 +133,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "column_break_3",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "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": "date_of_birth",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date of Birth",
@@ -184,12 +162,41 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "education",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Education",
@@ -218,6 +225,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Occupation",
@@ -246,6 +254,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Designation",
@@ -268,67 +277,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "image",
- "fieldtype": "Attach Image",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Image",
- "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": "section_break_9",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "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": "work_address",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Work Address",
@@ -351,14 +306,104 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach Image",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Image",
+ "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": "section_break_13",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Guardian Of ",
+ "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": "students",
+ "fieldtype": "Table",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Students",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Guardian Student",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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_8",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
+ "label": "Guardian Interests",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -384,6 +429,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Interests",
@@ -414,7 +460,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-28 16:14:58.836437",
+ "modified": "2017-02-20 13:17:43.366116",
"modified_by": "Administrator",
"module": "Schools",
"name": "Guardian",
@@ -431,7 +477,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -446,8 +491,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "guardian_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/guardian/guardian.py b/erpnext/schools/doctype/guardian/guardian.py
index 1388cfe..38597f0 100644
--- a/erpnext/schools/doctype/guardian/guardian.py
+++ b/erpnext/schools/doctype/guardian/guardian.py
@@ -7,4 +7,22 @@
from frappe.model.document import Document
class Guardian(Document):
- pass
+ def __setup__(self):
+ self.onload()
+
+ def onload(self):
+ """Load Students for quick view"""
+ self.load_students()
+
+ def load_students(self):
+ """Load `students` from the database"""
+ self.students = []
+ students = frappe.get_all("Student Guardian", filters={"guardian":self.name}, fields=["parent"])
+ for student in students:
+ self.append("students", {
+ "student":student.parent,
+ "student_name": frappe.db.get_value("Student", student.parent, "title")
+ })
+
+ def validate(self):
+ self.students = []
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/schools/doctype/guardian_student/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/announcement/__init__.py
rename to erpnext/schools/doctype/guardian_student/__init__.py
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json b/erpnext/schools/doctype/guardian_student/guardian_student.json
similarity index 82%
copy from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json
copy to erpnext/schools/doctype/guardian_student/guardian_student.json
index a4d3ce4..598b868 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json
+++ b/erpnext/schools/doctype/guardian_student/guardian_student.json
@@ -2,9 +2,8 @@
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
- "autoname": "",
"beta": 0,
- "creation": "2016-12-14 16:46:46.786353",
+ "creation": "2017-01-31 11:53:21.580099",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
@@ -17,26 +16,27 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
+ "fieldname": "student",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Student",
"length": 0,
"no_copy": 0,
- "options": "Evaluation Criteria",
+ "options": "Student",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
- "read_only": 0,
+ "read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -52,9 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -74,22 +74,23 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "weightage",
- "fieldtype": "Percent",
+ "fieldname": "student_name",
+ "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
- "label": "Weightage",
+ "label": "Student Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
- "read_only": 0,
+ "read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
@@ -108,17 +109,19 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-12-14 16:59:17.353023",
+ "modified": "2017-02-17 17:14:03.795718",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Course Evaluation Criteria",
+ "name": "Guardian Student",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/schools/doctype/guardian_student/guardian_student.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/schools/doctype/guardian_student/guardian_student.py
index 85c1b32..bf6f5c1 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/schools/doctype/guardian_student/guardian_student.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class GuardianStudent(Document):
pass
diff --git a/erpnext/schools/doctype/instructor/instructor.json b/erpnext/schools/doctype/instructor/instructor.json
index fbb4a0b..db14aef 100644
--- a/erpnext/schools/doctype/instructor/instructor.json
+++ b/erpnext/schools/doctype/instructor/instructor.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructor Name",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employee",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Department",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -195,7 +201,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:24:48.046207",
+ "modified": "2017-02-17 17:19:03.465228",
"modified_by": "Administrator",
"module": "Schools",
"name": "Instructor",
@@ -212,7 +218,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -227,8 +232,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "instructor_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/program/program.json b/erpnext/schools/doctype/program/program.json
index 95a37f0..cac2964 100644
--- a/erpnext/schools/doctype/program/program.json
+++ b/erpnext/schools/doctype/program/program.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Program Name",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Program Code",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Program Abbreviation",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -134,6 +138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Department",
@@ -163,6 +168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Course",
@@ -191,6 +197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Courses",
@@ -220,6 +227,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fee Schedule",
@@ -248,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fees",
@@ -278,7 +287,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:23:07.030155",
+ "modified": "2017-02-17 17:22:14.107052",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program",
@@ -295,7 +304,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -311,7 +319,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "department",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/program_course/program_course.json b/erpnext/schools/doctype/program_course/program_course.json
index e9a397e..c19b613 100644
--- a/erpnext/schools/doctype/program_course/program_course.json
+++ b/erpnext/schools/doctype/program_course/program_course.json
@@ -9,18 +9,22 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "course",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Course",
"length": 0,
"no_copy": 0,
@@ -30,6 +34,7 @@
"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,
@@ -40,13 +45,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "academic_term",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Academic Term",
"length": 0,
"no_copy": 0,
@@ -56,6 +64,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,
@@ -66,13 +75,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -80,6 +92,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,
@@ -90,13 +103,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "course_code",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Course Code",
"length": 0,
"no_copy": 0,
@@ -105,6 +121,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -115,13 +132,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "required",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Required",
"length": 0,
"no_copy": 0,
@@ -130,6 +150,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,
@@ -148,7 +169,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-07-21 12:27:02.330118",
+ "modified": "2017-02-17 17:16:10.315691",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Course",
@@ -158,7 +179,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/program_enrollment/program_enrollment.json b/erpnext/schools/doctype/program_enrollment/program_enrollment.json
index e7269f0..331f79e 100644
--- a/erpnext/schools/doctype/program_enrollment/program_enrollment.json
+++ b/erpnext/schools/doctype/program_enrollment/program_enrollment.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Name",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Category",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch Name",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Program",
@@ -195,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Year",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Enrollment Date",
@@ -253,6 +261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -281,6 +290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fees",
@@ -311,6 +321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -339,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -369,7 +381,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-18 14:20:10.023790",
+ "modified": "2017-02-20 13:19:29.456157",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Enrollment",
@@ -386,7 +398,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -401,8 +412,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "student_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/program_fee/program_fee.json b/erpnext/schools/doctype/program_fee/program_fee.json
index d5d3b5f..9e2aa61 100644
--- a/erpnext/schools/doctype/program_fee/program_fee.json
+++ b/erpnext/schools/doctype/program_fee/program_fee.json
@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Academic Term",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,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,
@@ -48,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Fee Structure",
"length": 0,
"no_copy": 0,
@@ -58,6 +64,7 @@
"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,
@@ -75,7 +82,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Student Category",
"length": 0,
"no_copy": 0,
@@ -85,6 +94,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,
@@ -102,7 +112,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -110,6 +122,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,
@@ -127,7 +140,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Due Date",
"length": 0,
"no_copy": 0,
@@ -136,6 +151,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,
@@ -153,7 +169,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -162,6 +180,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -179,7 +198,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-05 07:07:39.776848",
+ "modified": "2017-02-17 17:18:33.899938",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Fee",
@@ -189,7 +208,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ 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..9b64439 100644
--- a/erpnext/schools/doctype/student/student.json
+++ b/erpnext/schools/doctype/student/student.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "First Name",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Middle Name",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Last Name",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -134,6 +138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series",
@@ -163,6 +168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Email Address",
@@ -191,6 +197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Mobile Number",
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Joining Date",
@@ -249,6 +257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -279,6 +288,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Personal Details",
@@ -307,6 +317,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date of Birth",
@@ -335,6 +346,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Blood Group",
@@ -364,6 +376,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -391,6 +404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gender",
@@ -420,6 +434,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Nationality",
@@ -449,6 +464,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Applicant",
@@ -472,207 +488,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "section_break_22",
- "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": "Home Address",
- "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": "address_line_1",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Address Line 1",
- "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": "address_line_2",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Address Line 2",
- "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": "pincode",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Pincode",
- "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_20",
- "fieldtype": "Column Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "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": "city",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "City",
- "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": "state",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "State",
- "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": 1,
- "columns": 0,
"fieldname": "section_break_18",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Guardian Details",
@@ -701,6 +523,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Guardians",
@@ -722,6 +545,208 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "section_break_22",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Home Address",
+ "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": "address_line_1",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Address Line 1",
+ "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": "address_line_2",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Address Line 2",
+ "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": "pincode",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Pincode",
+ "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_20",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "city",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "City",
+ "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": "state",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "State",
+ "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": 1,
"columns": 0,
"fieldname": "section_break_20",
@@ -730,6 +755,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sibling Details",
@@ -759,6 +785,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Siblings",
@@ -780,6 +807,150 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 1,
+ "columns": 0,
+ "fieldname": "exit",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Exit",
+ "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": "date_of_leaving",
+ "fieldtype": "Date",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Date of Leaving",
+ "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": "leaving_certificate_number",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Leaving Certificate Number",
+ "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_31",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "reason_for_leaving",
+ "fieldtype": "Text",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Reason For Leaving",
+ "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,
"default": "",
@@ -789,6 +960,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -819,7 +991,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-01 12:55:32.453131",
+ "modified": "2017-02-17 17:21:51.693028",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student",
@@ -836,7 +1008,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -856,8 +1027,7 @@
"email": 1,
"export": 1,
"if_owner": 0,
- "import": 0,
- "is_custom": 0,
+ "import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -872,8 +1042,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"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/student.py b/erpnext/schools/doctype/student/student.py
index a34bb6a..a830e5b 100644
--- a/erpnext/schools/doctype/student/student.py
+++ b/erpnext/schools/doctype/student/student.py
@@ -5,9 +5,10 @@
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
+from frappe import _
+from frappe.desk.form.linked_with import get_linked_doctypes
class Student(Document):
-
def validate(self):
self.title = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
@@ -15,11 +16,26 @@
self.check_unique()
self.update_applicant_status()
+ if frappe.get_value("Student", self.name, "title") != self.title:
+ self.update_student_name_in_linked_doctype()
+
+ def update_student_name_in_linked_doctype(self):
+ linked_doctypes = get_linked_doctypes("Student")
+ for d in linked_doctypes:
+ if "student_name" in [f.fieldname for f in frappe.get_meta(d).fields]:
+ frappe.db.sql("""UPDATE `tab{0}` set student_name = %s where {1} = %s"""
+ .format(d, linked_doctypes[d]["fieldname"]),(self.title, self.name))
+
+ if "child_doctype" in linked_doctypes[d].keys() and "student_name" in \
+ [f.fieldname for f in frappe.get_meta(linked_doctypes[d]["child_doctype"]).fields]:
+ frappe.db.sql("""UPDATE `tab{0}` set student_name = %s where {1} = %s"""
+ .format(linked_doctypes[d]["child_doctype"], linked_doctypes[d]["fieldname"]),(self.title, self.name))
+
def check_unique(self):
"""Validates if the Student Applicant is Unique"""
student = frappe.db.sql("select name from `tabStudent` where student_applicant=%s and name!=%s", (self.student_applicant, self.name))
if student:
- frappe.throw("Student {0} exist against student applicant {1}".format(student[0][0], self.student_applicant))
+ frappe.throw(_("Student {0} exist against student applicant {1}").format(student[0][0], self.student_applicant))
def update_applicant_status(self):
"""Updates Student Applicant status to Admitted"""
@@ -28,10 +44,9 @@
def get_timeline_data(doctype, name):
'''Return timeline for attendance'''
- return dict(frappe.db.sql('''select unix_timestamp(cs.schedule_date), count(*)
- from `tabCourse Schedule` as cs , `tabStudent Attendance` as sa where
- sa.course_schedule = cs.name
- and sa.student=%s
- and cs.schedule_date > date_sub(curdate(), interval 1 year)
+ return dict(frappe.db.sql('''select unix_timestamp(`date`), count(*)
+ from `tabStudent Attendance` where
+ student=%s
+ and `date` > date_sub(curdate(), interval 1 year)
and status = 'Present'
- group by cs.schedule_date''', name))
+ group by date''', name))
diff --git a/erpnext/schools/doctype/student_admission/student_admission.json b/erpnext/schools/doctype/student_admission/student_admission.json
index 22bdb2b..bf76d0d 100644
--- a/erpnext/schools/doctype/student_admission/student_admission.json
+++ b/erpnext/schools/doctype/student_admission/student_admission.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Year",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Admission Start Date",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Admission End Date",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series (for Student Applicant)",
@@ -163,6 +168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Publish on website",
@@ -191,6 +197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -218,6 +225,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Program",
@@ -247,6 +255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Application Fee",
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -306,6 +316,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Route",
@@ -334,6 +345,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Application Form Route",
@@ -362,6 +374,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -389,6 +402,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Introduction",
@@ -417,6 +431,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Eligibility",
@@ -445,7 +460,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:23:58.170546",
+ "modified": "2017-02-20 13:20:31.273514",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Admission",
@@ -462,7 +477,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -477,8 +491,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"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.js b/erpnext/schools/doctype/student_applicant/student_applicant.js
index 36baa80..c14c6f7 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.js
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.js
@@ -1,3 +1,6 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
frappe.ui.form.on("Student Applicant", {
refresh: function(frm) {
if(frm.doc.application_status== "Applied" && frm.doc.docstatus== 1 ) {
@@ -26,4 +29,13 @@
frm: frm
})
}
-});
\ No newline at end of file
+});
+
+
+frappe.ui.form.on('Student Sibling', {
+ student: function(frm) {
+ frm.add_fetch("student", "title", "full_name");
+ frm.add_fetch("student", "gender", "gender");
+ frm.add_fetch("student", "date_of_birth", "date_of_birth");
+ }
+});
diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.json b/erpnext/schools/doctype/student_applicant/student_applicant.json
index 2c6947c..315ba8cd 100644
--- a/erpnext/schools/doctype/student_applicant/student_applicant.json
+++ b/erpnext/schools/doctype/student_applicant/student_applicant.json
@@ -24,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "First Name",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Middle Name",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Last Name",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Program",
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Paid",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Naming Series",
@@ -222,6 +229,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Application Status",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Application Date",
@@ -281,6 +290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Academic Year",
@@ -310,6 +320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Admission",
@@ -339,6 +350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -368,6 +380,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Personal Details",
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date of Birth",
@@ -424,6 +438,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gender",
@@ -453,6 +468,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Blood Group",
@@ -482,6 +498,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -509,6 +526,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Email Address",
@@ -537,6 +555,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Mobile Number",
@@ -559,18 +578,20 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "default": "INDIAN",
"fieldname": "nationality",
- "fieldtype": "Link",
+ "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Nationality",
"length": 0,
"no_copy": 0,
- "options": "Country",
+ "options": "",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -594,6 +615,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Home Address",
@@ -622,6 +644,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address Line 1",
@@ -650,6 +673,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address Line 2",
@@ -678,6 +702,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pincode",
@@ -706,6 +731,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -733,6 +759,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "City",
@@ -761,6 +788,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "State",
@@ -789,6 +817,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Guardian Details",
@@ -817,6 +846,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Guardians",
@@ -846,6 +876,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sibling Details",
@@ -874,6 +905,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Siblings",
@@ -903,6 +935,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -930,6 +963,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -958,6 +992,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -988,7 +1023,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-17 10:26:13.225135",
+ "modified": "2017-02-21 01:14:59.352772",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Applicant",
@@ -1005,7 +1040,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1020,8 +1054,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"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_attendance/student_attendance.json b/erpnext/schools/doctype/student_attendance/student_attendance.json
index 1f8f680..e5a4075 100644
--- a/erpnext/schools/doctype/student_attendance/student_attendance.json
+++ b/erpnext/schools/doctype/student_attendance/student_attendance.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Student",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Course Schedule",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Name",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Student Batch",
@@ -195,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -224,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -248,11 +256,11 @@
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
- "is_submittable": 1,
+ "is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:51:03.951240",
+ "modified": "2017-02-21 01:15:20.989687",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Attendance",
@@ -260,16 +268,15 @@
"owner": "Administrator",
"permissions": [
{
- "amend": 1,
+ "amend": 0,
"apply_user_permissions": 0,
- "cancel": 1,
+ "cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -277,15 +284,17 @@
"role": "Academics User",
"set_user_permissions": 0,
"share": 1,
- "submit": 1,
+ "submit": 0,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "student_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_attendance/student_attendance.py b/erpnext/schools/doctype/student_attendance/student_attendance.py
index e2d01b5..8e806e4 100644
--- a/erpnext/schools/doctype/student_attendance/student_attendance.py
+++ b/erpnext/schools/doctype/student_attendance/student_attendance.py
@@ -6,11 +6,15 @@
import frappe
from frappe.model.document import Document
from frappe import _
+from erpnext.schools.api import get_student_batch_students, get_student_group_students
+
class StudentAttendance(Document):
def validate(self):
self.validate_date()
self.validate_mandatory()
+ self.validate_course_schedule()
+ self.validate_student()
self.validate_duplication()
def validate_date(self):
@@ -21,9 +25,27 @@
if not (self.student_batch or self.course_schedule):
frappe.throw(_("""Student Batch or Course Schedule is mandatory"""))
+ def validate_course_schedule(self):
+ if self.course_schedule:
+ self.student_batch = frappe.db.get_value("Course Schedule", self.course_schedule, "student_batch")
+
+ def validate_student(self):
+ if self.course_schedule:
+ student_group = frappe.db.get_value("Course Schedule", self.course_schedule, "student_group")
+ student_group_students = []
+ for d in get_student_group_students(student_group):
+ student_group_students.append(d.student)
+ if student_group and self.student not in student_group_students:
+ frappe.throw(_("""Student {0}: {1} does not belong to Student Group {2}""".format(self.student, self.student_name, student_group)))
+ else:
+ student_batch_students = []
+ for d in get_student_batch_students(self.student_batch):
+ student_batch_students.append(d.student)
+ if self.student not in student_batch_students:
+ frappe.throw(_("""Student {0}: {1} does not belong to Student Batch {2}""".format(self.student, self.student_name, self.student_batch)))
+
def validate_duplication(self):
"""Check if the Attendance Record is Unique"""
-
attendance_records=None
if self.course_schedule:
attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
diff --git a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
index 7dd9dda..20fb2fd 100644
--- a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
@@ -3,148 +3,152 @@
frappe.provide("schools")
frappe.ui.form.on('Student Attendance Tool', {
- refresh: function(frm) {
- frm.disable_save();
- },
+ refresh: function(frm) {
+ frm.disable_save();
+ },
- based_on: function(frm) {
- if (frm.doc.based_on == "Student Batch") {
- frm.set_value("course_schedule", "");
- } else {
- frm.set_value("student_batch", "");
- }
- },
+ based_on: function(frm) {
+ if (frm.doc.based_on == "Student Batch") {
+ frm.set_value("course_schedule", "");
+ } else {
+ frm.set_value("student_batch", "");
+ }
+ },
- student_batch: function(frm) {
- if ((frm.doc.student_batch && frm.doc.date) || frm.doc.course_schedule) {
- var method = "erpnext.schools.doctype.student_attendance_tool.student_attendance_tool.get_student_attendance_records";
+ student_batch: function(frm) {
+ if ((frm.doc.student_batch && frm.doc.date) || frm.doc.course_schedule) {
+ var method = "erpnext.schools.doctype.student_attendance_tool.student_attendance_tool.get_student_attendance_records";
- frappe.call({
- method: method,
- args: {
- based_on: frm.doc.based_on,
- student_batch: frm.doc.student_batch,
- date: frm.doc.date,
- course_schedule: frm.doc.course_schedule
- },
- callback: function(r) {
- frm.events.get_students(frm, r.message);
- }
- })
- }
- },
+ frappe.call({
+ method: method,
+ args: {
+ based_on: frm.doc.based_on,
+ student_batch: frm.doc.student_batch,
+ date: frm.doc.date,
+ course_schedule: frm.doc.course_schedule
+ },
+ callback: function(r) {
+ frm.events.get_students(frm, r.message);
+ }
+ })
+ }
+ },
- date: function(frm) {
- frm.trigger("student_batch");
- },
+ date: function(frm) {
+ frm.trigger("student_batch");
+ },
- course_schedule: function(frm) {
- frm.trigger("student_batch");
- },
+ course_schedule: function(frm) {
+ frm.trigger("student_batch");
+ },
- get_students: function(frm, students) {
- if (!frm.students_area) {
- frm.students_area = $('<div>')
- .appendTo(frm.fields_dict.students_html.wrapper);
- }
- frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
- }
+ get_students: function(frm, students) {
+ if (!frm.students_area) {
+ frm.students_area = $('<div>')
+ .appendTo(frm.fields_dict.students_html.wrapper);
+ }
+ frm.students_editor = new schools.StudentsEditor(frm, frm.students_area, students)
+ }
});
schools.StudentsEditor = Class.extend({
- init: function(frm, wrapper, students) {
- this.wrapper = wrapper;
- this.frm = frm;
- this.make(frm, students);
- },
- make: function(frm, students) {
- var me = this;
+ init: function(frm, wrapper, students) {
+ this.wrapper = wrapper;
+ this.frm = frm;
+ this.make(frm, students);
+ },
+ make: function(frm, students) {
+ var me = this;
- $(this.wrapper).empty();
- var student_toolbar = $('<p>\
+ $(this.wrapper).empty();
+ var student_toolbar = $('<p>\
<button class="btn btn-default btn-add btn-xs" style="margin-right: 5px;"></button>\
<button class="btn btn-xs btn-default btn-remove" style="margin-right: 5px;"></button>\
<button class="btn btn-default btn-primary btn-mark-att btn-xs"></button></p>').appendTo($(this.wrapper));
- student_toolbar.find(".btn-add")
- .html(__('Check all'))
- .on("click", function() {
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if (!$(check).prop("disabled")) {
- check.checked = true;
- }
- });
- });
+ student_toolbar.find(".btn-add")
+ .html(__('Check all'))
+ .on("click", function() {
+ $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
+ if (!$(check).prop("disabled")) {
+ check.checked = true;
+ }
+ });
+ });
- student_toolbar.find(".btn-remove")
- .html(__('Uncheck all'))
- .on("click", function() {
- $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
- if (!$(check).prop("disabled")) {
- check.checked = false;
- }
- });
- });
+ student_toolbar.find(".btn-remove")
+ .html(__('Uncheck all'))
+ .on("click", function() {
+ $(me.wrapper).find('input[type="checkbox"]').each(function(i, check) {
+ if (!$(check).prop("disabled")) {
+ check.checked = false;
+ }
+ });
+ });
- var get_present_student = function(student) {
- return students.filter(function(s) {
- return s.idx === idx;
- })
- }
- var get_absent_student = function(idx) {
- return students.filter(function(s) {
- return s.idx === idx;
- })
- }
+ var get_present_student = function(student) {
+ return students.filter(function(s) {
+ return s.idx === idx;
+ })
+ }
+ var get_absent_student = function(idx) {
+ return students.filter(function(s) {
+ return s.idx === idx;
+ })
+ }
- student_toolbar.find(".btn-mark-att")
- .html(__('Mark Attendence'))
- .on("click", function() {
- var studs = [];
- $(me.wrapper.find('input[type="checkbox"]')).each(function(i, check) {
- var $check = $(check);
- studs.push({
- student: $check.data().student,
- student_name: $check.data().studentName,
- idx: $check.data().idx,
- disabled: $check.prop("disabled"),
- checked: $check.is(":checked")
- });
- });
+ student_toolbar.find(".btn-mark-att")
+ .html(__('Mark Attendence'))
+ .on("click", function() {
+ var studs = [];
+ $(me.wrapper.find('input[type="checkbox"]')).each(function(i, check) {
+ var $check = $(check);
+ studs.push({
+ student: $check.data().student,
+ student_name: $check.data().studentName,
+ idx: $check.data().idx,
+ disabled: $check.prop("disabled"),
+ checked: $check.is(":checked")
+ });
+ });
- var students_present = studs.filter(function(stud) {
- return !stud.disabled && stud.checked;
- });
+ var students_present = studs.filter(function(stud) {
+ return !stud.disabled && stud.checked;
+ });
- var students_absent = studs.filter(function(stud) {
- return !stud.disabled && !stud.checked;
- });
+ var students_absent = studs.filter(function(stud) {
+ return !stud.disabled && !stud.checked;
+ });
- frappe.call({
- method: "erpnext.schools.api.mark_attendance",
- args: {
- "students_present": students_present,
- "students_absent": students_absent,
- "student_batch": frm.doc.student_batch,
- "course_schedule": frm.doc.course_schedule,
- "date": frm.doc.date
- },
- callback: function(r) {
- frm.trigger("student_batch");
- }
- });
- });
+ frappe.confirm(__("Do you want to update attendance?<br>Present: {0}\
+ <br>Absent: {1}", [students_present.length, students_absent.length]), function() {
+ frappe.call({
+ method: "erpnext.schools.api.mark_attendance",
+ args: {
+ "students_present": students_present,
+ "students_absent": students_absent,
+ "student_batch": frm.doc.student_batch,
+ "course_schedule": frm.doc.course_schedule,
+ "date": frm.doc.date
+ },
+ callback: function(r) {
+ frm.trigger("student_batch");
+ }
+ });
+ });
- var htmls = students.map(function(student) {
- return frappe.render_template("student_button", {
- student: student.student,
- student_name: student.student_name,
- idx: student.idx,
- status: student.status
- })
- });
+ });
- $(htmls.join("")).appendTo(me.wrapper);
- }
+ var htmls = students.map(function(student) {
+ return frappe.render_template("student_button", {
+ student: student.student,
+ student_name: student.student_name,
+ idx: student.idx,
+ status: student.status
+ })
+ });
+
+ $(htmls.join("")).appendTo(me.wrapper);
+ }
});
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json
index 092af04..51b015c 100644
--- a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Based On",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Course Schedule",
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -169,6 +174,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Attendance",
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students HTML",
@@ -225,7 +232,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-09 17:36:28.739318",
+ "modified": "2017-02-21 01:15:11.435110",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Attendance Tool",
@@ -242,7 +249,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -263,7 +269,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -278,7 +283,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py
index 58588a9..0734747 100644
--- a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.py
@@ -27,10 +27,10 @@
if course_schedule:
student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
- course_schedule= %s and docstatus=1""", (course_schedule), as_dict=1)
+ course_schedule= %s""", (course_schedule), as_dict=1)
else:
student_attendance_list= frappe.db.sql("""select student, status from `tabStudent Attendance` where \
- student_batch= %s and date= %s and docstatus=1 and \
+ student_batch= %s and date= %s and \
(course_schedule is Null or course_schedule='')""",
(student_batch, date), as_dict=1)
@@ -38,4 +38,5 @@
for student in student_list:
if student.student == attendance.student:
student.status = attendance.status
+
return student_list
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_batch/student_batch.js b/erpnext/schools/doctype/student_batch/student_batch.js
index 931e41b..7fad5d7 100644
--- a/erpnext/schools/doctype/student_batch/student_batch.js
+++ b/erpnext/schools/doctype/student_batch/student_batch.js
@@ -3,7 +3,23 @@
frappe.ui.form.on('Student Batch', {
refresh: function(frm) {
-
+ if (!frm.doc.__islocal) {
+ frm.add_custom_button(__("Update Email Group"), function() {
+ frappe.call({
+ method: "erpnext.schools.api.update_email_group",
+ args: {
+ "doctype": "Student Batch",
+ "name": frm.doc.name
+ }
+ });
+ });
+ frm.add_custom_button(__("Newsletter"), function() {
+ frappe.route_options = {
+ email_group: frm.doc.name
+ }
+ frappe.set_route("List", "Newsletter");
+ });
+ }
},
onload: function(frm){
diff --git a/erpnext/schools/doctype/student_batch/student_batch.json b/erpnext/schools/doctype/student_batch/student_batch.json
index f571d9d..1b7239b 100644
--- a/erpnext/schools/doctype/student_batch/student_batch.json
+++ b/erpnext/schools/doctype/student_batch/student_batch.json
@@ -1,7 +1,7 @@
{
"allow_copy": 0,
- "allow_import": 0,
- "allow_rename": 0,
+ "allow_import": 1,
+ "allow_rename": 1,
"autoname": "",
"beta": 0,
"creation": "2016-07-21 15:49:53.776461",
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch Name",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Academic Year",
@@ -82,6 +84,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Active",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Program",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Academic Term",
@@ -195,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students",
@@ -223,6 +230,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructors",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructors",
@@ -309,7 +319,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-01 13:18:12.024001",
+ "modified": "2017-02-17 17:17:00.460594",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Batch",
@@ -325,8 +335,7 @@
"email": 1,
"export": 1,
"if_owner": 0,
- "import": 0,
- "is_custom": 0,
+ "import": 1,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -347,7 +356,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -362,8 +370,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"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_batch/student_batch.py b/erpnext/schools/doctype/student_batch/student_batch.py
index 1a0d799..9c0f3d7 100644
--- a/erpnext/schools/doctype/student_batch/student_batch.py
+++ b/erpnext/schools/doctype/student_batch/student_batch.py
@@ -6,6 +6,7 @@
from frappe.model.document import Document
from erpnext.schools.utils import validate_duplicate_student
import frappe
+from frappe import _
class StudentBatch(Document):
def autoname(self):
@@ -16,3 +17,8 @@
def validate(self):
validate_duplicate_student(self.students)
+ self.validate_name()
+
+ def validate_name(self):
+ if frappe.db.exists("Student Group", self.name):
+ frappe.throw(_("""Student Group exists with same name"""))
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..3558cc8 100644
--- a/erpnext/schools/doctype/student_batch_student/student_batch_student.json
+++ b/erpnext/schools/doctype/student_batch_student/student_batch_student.json
@@ -20,7 +20,6 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Student",
@@ -44,41 +43,11 @@
"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,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -105,13 +74,12 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Student Name",
"length": 0,
"no_copy": 0,
- "options": "",
+ "options": "student.title",
"permlevel": 0,
"precision": "",
"print_hide": 0,
@@ -123,6 +91,34 @@
"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_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 +131,8 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-01-20 18:26:51.242924",
- "modified_by": "neil@frappe.io",
+ "modified": "2017-02-03 05:26:35.518004",
+ "modified_by": "Administrator",
"module": "Schools",
"name": "Student Batch Student",
"name_case": "",
diff --git a/erpnext/schools/doctype/student_group/student_group.js b/erpnext/schools/doctype/student_group/student_group.js
index 392793a..1dcbc3a 100644
--- a/erpnext/schools/doctype/student_group/student_group.js
+++ b/erpnext/schools/doctype/student_group/student_group.js
@@ -1,33 +1,48 @@
cur_frm.add_fetch("student", "title", "student_name");
frappe.ui.form.on("Student Group", {
- refresh: function(frm) {
- if (!frm.doc.__islocal) {
- frm.add_custom_button(__("Course Schedule"), function() {
- frappe.route_options = {
- student_group: frm.doc.name
- }
- frappe.set_route("List", "Course Schedule");
- });
+ refresh: function(frm) {
+ if (!frm.doc.__islocal) {
+ frm.add_custom_button(__("Course Schedule"), function() {
+ frappe.route_options = {
+ student_group: frm.doc.name
+ }
+ frappe.set_route("List", "Course Schedule");
+ });
- frm.add_custom_button(__("Assessment Plan"), function() {
- frappe.route_options = {
- student_group: frm.doc.name
- }
- frappe.set_route("List", "Assessment Plan");
- });
- }
- },
+ frm.add_custom_button(__("Assessment Plan"), function() {
+ frappe.route_options = {
+ student_group: frm.doc.name
+ }
+ frappe.set_route("List", "Assessment Plan");
+ });
+ frm.add_custom_button(__("Update Email Group"), function() {
+ frappe.call({
+ method: "erpnext.schools.api.update_email_group",
+ args: {
+ "doctype": "Student Group",
+ "name": frm.doc.name
+ }
+ });
+ });
+ frm.add_custom_button(__("Newsletter"), function() {
+ frappe.route_options = {
+ email_group: frm.doc.name
+ }
+ frappe.set_route("List", "Newsletter");
+ });
+ }
+ },
- onload: function(frm) {
- cur_frm.set_query("academic_term", function() {
- return {
- "filters": {
- "academic_year": (frm.doc.academic_year)
- }
- };
- });
- }
+ onload: function(frm) {
+ frm.set_query("academic_term", function() {
+ return {
+ "filters": {
+ "academic_year": (frm.doc.academic_year)
+ }
+ };
+ });
+ }
});
//If Student Batch is entered, deduce program, academic_year and academic term from it
diff --git a/erpnext/schools/doctype/student_group/student_group.json b/erpnext/schools/doctype/student_group/student_group.json
index 9e44f51..cf42e24 100644
--- a/erpnext/schools/doctype/student_group/student_group.json
+++ b/erpnext/schools/doctype/student_group/student_group.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Batch",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Year",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Academic Term",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Program",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Course",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Strength",
@@ -216,7 +223,7 @@
{
"allow_on_submit": 0,
"bold": 0,
- "collapsible": 1,
+ "collapsible": 0,
"collapsible_depends_on": "",
"columns": 0,
"fieldname": "section_break_6",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students",
@@ -253,6 +261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Students",
@@ -282,6 +291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -311,7 +321,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-01 12:57:17.125085",
+ "modified": "2017-02-17 17:16:31.682311",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Group",
@@ -328,7 +338,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -349,7 +358,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -365,8 +373,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "program, course",
+ "show_name_in_global_search": 0,
"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_group.py b/erpnext/schools/doctype/student_group/student_group.py
index f604773..996f518 100644
--- a/erpnext/schools/doctype/student_group/student_group.py
+++ b/erpnext/schools/doctype/student_group/student_group.py
@@ -7,6 +7,7 @@
from frappe.model.document import Document
from frappe import _
from erpnext.schools.utils import validate_duplicate_student
+from erpnext.schools.api import get_student_batch_students
class StudentGroup(Document):
def autoname(self):
@@ -29,6 +30,9 @@
def validate(self):
self.validate_strength()
self.validate_student_name()
+ self.validate_name()
+ if self.student_batch:
+ self.validate_student_batch()
validate_duplicate_student(self.students)
def validate_strength(self):
@@ -39,4 +43,14 @@
for d in self.students:
d.student_name = frappe.db.get_value("Student", d.student, "title")
-
\ No newline at end of file
+ def validate_name(self):
+ if frappe.db.exists("Student Batch", self.name):
+ frappe.throw(_("""Student Batch exists with same name"""))
+
+ def validate_student_batch(self):
+ student_batch_students = []
+ for d in get_student_batch_students(self.student_batch):
+ student_batch_students.append(d.student)
+ for d in self.students:
+ if d.student not in student_batch_students:
+ frappe.throw(_("""Student {0}: {1} does not belong to Student Batch {2}""".format(d.student, d.student_name, self.student_batch)))
\ 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..b5f9d88 100644
--- a/erpnext/schools/doctype/student_guardian/student_guardian.json
+++ b/erpnext/schools/doctype/student_guardian/student_guardian.json
@@ -21,7 +21,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Guardian",
"length": 0,
"no_copy": 0,
@@ -31,6 +33,36 @@
"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_global_search": 1,
+ "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,
@@ -48,7 +80,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Relation",
"length": 0,
"no_copy": 0,
@@ -58,6 +92,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 +110,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-01 14:39:03.576590",
+ "modified": "2017-02-17 17:13:53.507571",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Guardian",
@@ -85,7 +120,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/schools/doctype/student_language/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/schools/doctype/student_language/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/schools/doctype/student_language/student_language.js
similarity index 77%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
copy to erpnext/schools/doctype/student_language/student_language.js
index 5e0269b..6239ed1 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/schools/doctype/student_language/student_language.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Student Language', {
refresh: function(frm) {
}
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json b/erpnext/schools/doctype/student_language/student_language.json
similarity index 81%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
copy to erpnext/schools/doctype/student_language/student_language.json
index f830abe..f3b4eb1 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
+++ b/erpnext/schools/doctype/student_language/student_language.json
@@ -1,10 +1,10 @@
{
"allow_copy": 0,
- "allow_import": 1,
+ "allow_import": 0,
"allow_rename": 0,
- "autoname": "field:evaluation_criteria",
+ "autoname": "field:language_name",
"beta": 0,
- "creation": "2016-12-14 16:40:15.144115",
+ "creation": "2017-02-21 01:55:00.366273",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
@@ -17,15 +17,16 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
+ "fieldname": "language_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Language Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -51,10 +52,10 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-14 16:40:36.351183",
+ "modified": "2017-02-22 13:03:48.600707",
"modified_by": "Administrator",
"module": "Schools",
- "name": "Evaluation Criteria",
+ "name": "Student Language",
"name_case": "",
"owner": "Administrator",
"permissions": [
@@ -68,7 +69,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -83,7 +83,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "title_field": "",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/schools/doctype/student_language/student_language.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/schools/doctype/student_language/student_language.py
index 85c1b32..be6d5de 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/schools/doctype/student_language/student_language.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class StudentLanguage(Document):
pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/schools/doctype/student_language/test_student_language.py
similarity index 62%
copy from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
copy to erpnext/schools/doctype/student_language/test_student_language.py
index 0182db6..592b94a 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/schools/doctype/student_language/test_student_language.py
@@ -6,7 +6,7 @@
import frappe
import unittest
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Student Language')
-class TestEvaluationCriteria(unittest.TestCase):
+class TestStudentLanguage(unittest.TestCase):
pass
diff --git a/erpnext/schools/doctype/student_leave_application/student_leave_application.json b/erpnext/schools/doctype/student_leave_application/student_leave_application.json
index ad6d498..b4f5278 100644
--- a/erpnext/schools/doctype/student_leave_application/student_leave_application.json
+++ b/erpnext/schools/doctype/student_leave_application/student_leave_application.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Name",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "From Date",
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "To Date",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mark as Present",
@@ -194,6 +200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -221,6 +228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reason",
@@ -249,6 +257,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -277,7 +286,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-21 18:58:00.256114",
+ "modified": "2017-02-20 13:21:08.828872",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Leave Application",
@@ -294,7 +303,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -315,7 +323,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -330,8 +337,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "student_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_log/student_log.json b/erpnext/schools/doctype/student_log/student_log.json
index 7809c7e..43ac134 100644
--- a/erpnext/schools/doctype/student_log/student_log.json
+++ b/erpnext/schools/doctype/student_log/student_log.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Student",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Type",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Student Name",
@@ -137,6 +141,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Date",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Log",
@@ -220,7 +227,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:59:40.460389",
+ "modified": "2017-02-17 17:18:19.596892",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Log",
@@ -237,7 +244,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -252,8 +258,10 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "student_name",
+ "track_changes": 0,
"track_seen": 1
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_sibling/student_sibling.json b/erpnext/schools/doctype/student_sibling/student_sibling.json
index b74d48c..87cdbf1 100644
--- a/erpnext/schools/doctype/student_sibling/student_sibling.json
+++ b/erpnext/schools/doctype/student_sibling/student_sibling.json
@@ -14,6 +14,36 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
+ "fieldname": "studying_in_same_institute",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Studying in Same Institute",
+ "length": 0,
+ "no_copy": 0,
+ "options": "NO\nYES",
+ "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": 3,
"fieldname": "full_name",
"fieldtype": "Data",
@@ -21,7 +51,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Full Name",
"length": 0,
"no_copy": 0,
@@ -31,8 +63,9 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -48,7 +81,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Gender",
"length": 0,
"no_copy": 0,
@@ -59,32 +94,7 @@
"print_hide_if_no_value": 0,
"print_width": "",
"read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 2,
- "fieldname": "date_of_birth",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "label": "Date of Birth",
- "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,
@@ -102,7 +112,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -110,6 +122,68 @@
"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,
+ "depends_on": "eval:doc.studying_in_same_institute == \"YES\"",
+ "fieldname": "student",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Student ID",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Student",
+ "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": 2,
+ "depends_on": "eval:doc.studying_in_same_institute == \"NO\"",
+ "fieldname": "institution",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Institution",
+ "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,
@@ -127,7 +201,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Program",
"length": 0,
"no_copy": 0,
@@ -136,6 +212,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,
@@ -147,21 +224,25 @@
"bold": 0,
"collapsible": 0,
"columns": 2,
- "fieldname": "institution",
- "fieldtype": "Data",
+ "fieldname": "date_of_birth",
+ "fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
- "label": "Institution",
+ "in_standard_filter": 0,
+ "label": "Date of Birth",
"length": 0,
"no_copy": 0,
+ "options": "",
"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,
@@ -179,7 +260,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-09-14 06:03:44.067781",
+ "modified": "2017-02-24 11:43:01.311010",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Sibling",
@@ -189,7 +270,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/topic/test_topic.py b/erpnext/schools/doctype/topic/test_topic.py
deleted file mode 100644
index 1d2974e..0000000
--- a/erpnext/schools/doctype/topic/test_topic.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe and Contributors
-# See license.txt
-from __future__ import unicode_literals
-
-import frappe
-import unittest
-
-# test_records = frappe.get_test_records('Topic')
-
-class TestTopic(unittest.TestCase):
- pass
diff --git a/erpnext/schools/doctype/topic/topic.js b/erpnext/schools/doctype/topic/topic.js
deleted file mode 100644
index bd9379d..0000000
--- a/erpnext/schools/doctype/topic/topic.js
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2016, Frappe and contributors
-// For license information, please see license.txt
-
-frappe.ui.form.on('Topic', {
- refresh: function(frm) {
-
- }
-});
diff --git a/erpnext/schools/doctype/topic/topic.py b/erpnext/schools/doctype/topic/topic.py
deleted file mode 100644
index 5dba561..0000000
--- a/erpnext/schools/doctype/topic/topic.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.model.document import Document
-from frappe import _
-
-class Topic(Document):
- pass
-
-def get_topic_list(doctype, txt, filters, limit_start, limit_page_length=20):
- user = frappe.session.user
- student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
- if student:
- data = frappe. db.sql('''select name, course, modified,topic_name, introduction, content from `tabTopic` as topic
- where topic.course = %s
- order by idx asc limit {0} , {1}'''.format(limit_start, limit_page_length),filters.course,as_dict = True)
-
- for topic in data:
- try:
- num_attachments = frappe.db.sql(""" select count(file_url) from tabFile as file
- where file.attached_to_name=%s
- and file.attached_to_doctype=%s""",(topic.name,"Topic"))
-
- except IOError or frappe.DoesNotExistError:
- pass
- frappe.local.message_log.pop()
-
- topic.num_attachments = num_attachments[0][0]
-
- return data
-
-def get_list_context(context=None):
- course = frappe.get_doc('Course', frappe.form_dict.course)
- portal_items = [{'reference_doctype': u'Topic', 'route': u"/topic?course=" + str(course.name), 'show_always': 0L, 'title': u'Topics'},
- {'reference_doctype': u'Discussion', 'route': u"/discussion?course=" + str(course.name), 'show_always': 0L, 'title': u'Discussions'},
-
- ]
- return {
- "show_sidebar": True,
- "title": _("Topic"),
- 'no_breadcrumbs': True,
- "sidebar_items" : portal_items,
- "sidebar_title" : course.name,
- "get_list": get_topic_list,
- "row_template": "templates/includes/topic/topic_row.html"
- }
\ No newline at end of file
diff --git a/erpnext/schools/report/absent_student_report/absent_student_report.py b/erpnext/schools/report/absent_student_report/absent_student_report.py
index 11b2e13..ba2b7ad 100644
--- a/erpnext/schools/report/absent_student_report/absent_student_report.py
+++ b/erpnext/schools/report/absent_student_report/absent_student_report.py
@@ -49,7 +49,7 @@
def get_absent_students(date):
absent_students = frappe.db.sql("""select student, student_name, student_batch from `tabStudent Attendance`
- where docstatus = 1 and status="Absent" and date = %s order by student_batch, student_name""", date, as_dict=1)
+ where status="Absent" and date = %s order by student_batch, student_name""", date, as_dict=1)
return absent_students
def get_leave_applications(date):
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..d8df3a0 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,12 +53,12 @@
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):
student_attendance = frappe.db.sql("""select count(*) as count, status from `tabStudent Attendance` where \
- student_batch= %s and date= %s and docstatus=1 and\
+ student_batch= %s and date= %s and\
(course_schedule is Null or course_schedule='') group by status""",
(student_batch, date), as_dict=1)
return student_attendance
\ No newline at end of file
diff --git a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py
index cd2c82c..f906034 100644
--- a/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py
+++ b/erpnext/schools/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py
@@ -53,7 +53,7 @@
def get_attendance_list(from_date, to_date, student_batch, students_list):
attendance_list = frappe.db.sql("""select student, date, status
- from `tabStudent Attendance` where docstatus = 1 and student_batch = %s
+ from `tabStudent Attendance` where student_batch = %s
and date between %s and %s
order by student, date""",
(student_batch, from_date, to_date), as_dict=1)
@@ -61,7 +61,7 @@
students_with_leave_application = get_students_with_leave_application(from_date, to_date, students_list)
for d in attendance_list:
att_map.setdefault(d.student, frappe._dict()).setdefault(d.date, "")
- if students_with_leave_application and d.student in students_with_leave_application.get(d.date,[]):
+ if students_with_leave_application and d.student in students_with_leave_application.get(d.date):
att_map[d.student][d.date] = "Present"
else:
att_map[d.student][d.date] = d.status
diff --git a/erpnext/schools/web_form/student_applicant/student_applicant.json b/erpnext/schools/web_form/student_applicant/student_applicant.json
index c28958a..f87a147 100644
--- a/erpnext/schools/web_form/student_applicant/student_applicant.json
+++ b/erpnext/schools/web_form/student_applicant/student_applicant.json
@@ -1,22 +1,30 @@
{
+ "accept_payment": 0,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 1,
+ "allow_incomplete": 0,
"allow_multiple": 1,
- "creation": "2016-09-12 02:26:42.447103",
+ "allow_print": 0,
+ "amount": 0.0,
+ "amount_based_on_field": 0,
+ "creation": "2016-09-22 13:10:10.792735",
"doc_type": "Student Applicant",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_standard": 1,
"login_required": 1,
- "modified": "2016-09-15 02:00:28.493759",
+ "max_attachment_size": 0,
+ "modified": "2017-02-21 04:44:46.022738",
"modified_by": "Administrator",
"module": "Schools",
"name": "student-applicant",
"owner": "Administrator",
+ "payment_button_label": "Buy Now",
"published": 1,
"route": "student-applicant",
+ "show_sidebar": 1,
"sidebar_items": [],
"success_url": "/student-applicant",
"title": "Student Applicant",
@@ -26,6 +34,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "First Name",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 1
},
@@ -34,6 +44,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Middle Name",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -42,6 +54,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Last Name",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -50,6 +64,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Image",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -58,6 +74,8 @@
"fieldtype": "Link",
"hidden": 0,
"label": "Program",
+ "max_length": 0,
+ "max_value": 0,
"options": "Program",
"read_only": 0,
"reqd": 1
@@ -67,6 +85,8 @@
"fieldtype": "Link",
"hidden": 0,
"label": "Academic Year",
+ "max_length": 0,
+ "max_value": 0,
"options": "Academic Year",
"read_only": 0,
"reqd": 0
@@ -76,6 +96,8 @@
"fieldtype": "Date",
"hidden": 0,
"label": "Date of Birth",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -84,6 +106,8 @@
"fieldtype": "Select",
"hidden": 0,
"label": "Blood Group",
+ "max_length": 0,
+ "max_value": 0,
"options": "\nA+\nA-\nB+\nB-\nO+\nO-\nAB+\nAB-",
"read_only": 0,
"reqd": 0
@@ -92,7 +116,9 @@
"fieldname": "student_email_id",
"fieldtype": "Data",
"hidden": 0,
- "label": "Student Email Address",
+ "label": "Student Email ID",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -101,15 +127,20 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Student Mobile Number",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
{
+ "default": "INDIAN",
"fieldname": "nationality",
- "fieldtype": "Link",
+ "fieldtype": "Data",
"hidden": 0,
"label": "Nationality",
- "options": "Country",
+ "max_length": 0,
+ "max_value": 0,
+ "options": "",
"read_only": 0,
"reqd": 0
},
@@ -118,6 +149,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Address Line 1",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -126,6 +159,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Address Line 2",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -134,6 +169,8 @@
"fieldtype": "Data",
"hidden": 0,
"label": "Pincode",
+ "max_length": 0,
+ "max_value": 0,
"read_only": 0,
"reqd": 0
},
@@ -142,6 +179,8 @@
"fieldtype": "Table",
"hidden": 0,
"label": "Guardians",
+ "max_length": 0,
+ "max_value": 0,
"options": "Student Guardian",
"read_only": 0,
"reqd": 0
@@ -151,6 +190,8 @@
"fieldtype": "Table",
"hidden": 0,
"label": "Siblings",
+ "max_length": 0,
+ "max_value": 0,
"options": "Student Sibling",
"read_only": 0,
"reqd": 0
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 747b31e..540ec28 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -37,7 +37,7 @@
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
if(!frm.doc.__islocal) {
- erpnext.utils.render_address_and_contact(frm);
+ frappe.geo.render_address_and_contact(frm);
// custom buttons
frm.add_custom_button(__('Accounting Ledger'), function() {
@@ -53,7 +53,7 @@
erpnext.utils.set_party_dashboard_indicators(frm);
} else {
- erpnext.utils.clear_address_and_contact(frm);
+ frappe.geo.clear_address_and_contact(frm);
}
var grid = cur_frm.get_field("sales_team").grid;
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 77cc624..4ae4738 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -24,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Name and Type",
@@ -53,6 +54,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -80,7 +82,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Full Name",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Type",
@@ -139,7 +143,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Lead",
@@ -170,6 +175,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -192,42 +198,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "default": "Active",
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 1,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Status",
- "length": 0,
- "no_copy": 0,
- "options": "Active\nDormant\nOpen",
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "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_break0",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -255,7 +232,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Customer Group",
@@ -287,6 +265,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Territory",
@@ -317,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tax ID",
@@ -346,6 +326,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
@@ -374,6 +355,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -402,6 +384,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Currency",
@@ -430,6 +413,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Price List",
@@ -458,6 +442,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -485,6 +470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -515,6 +501,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -543,6 +530,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address HTML",
@@ -570,6 +558,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website",
@@ -597,6 +586,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -624,6 +614,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact HTML",
@@ -653,6 +644,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounting",
@@ -682,6 +674,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts",
@@ -711,6 +704,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Limit",
@@ -739,6 +733,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days Based On",
@@ -769,6 +764,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days",
@@ -798,6 +794,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Limit",
@@ -829,6 +826,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -859,6 +857,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Details",
@@ -888,6 +887,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Frozen",
@@ -917,6 +917,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner and Commission",
@@ -946,6 +947,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -976,6 +978,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission Rate",
@@ -1006,6 +1009,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team",
@@ -1034,6 +1038,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team Details",
@@ -1066,7 +1071,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:26:57.948263",
+ "modified": "2017-02-20 13:21:53.659049",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",
@@ -1083,7 +1088,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1104,7 +1108,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1125,7 +1128,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1146,7 +1148,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1167,7 +1168,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -1188,7 +1188,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1209,7 +1208,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1230,7 +1228,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1251,7 +1248,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1267,7 +1263,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "customer_name,customer_group,territory",
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
"title_field": "customer_name",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index d8011af..e4101af 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -9,9 +9,8 @@
from frappe.utils import flt, cint, cstr
from frappe.desk.reportview import build_match_conditions
from erpnext.utilities.transaction_base import TransactionBase
-from erpnext.utilities.address_and_contact import load_address_and_contact, delete_contact_and_address
+from frappe.geo.address_and_contact import load_address_and_contact, delete_contact_and_address
from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
-from erpnext.accounts.party_status import get_party_status
from erpnext import get_default_currency
class Customer(TransactionBase):
@@ -70,7 +69,6 @@
self.flags.is_new_doc = self.is_new()
self.flags.old_lead = self.lead_name
validate_party_accounts(self)
- self.status = get_party_status(self)
self.validate_credit_limit_on_change()
def on_update(self):
@@ -95,9 +93,14 @@
def create_lead_address_contact(self):
if self.lead_name:
# assign lead address to customer (if already not set)
- address_name = frappe.get_value('Dynamic Link', dict(parenttype='Address', link_doctype='Lead', link_name=self.name))
- if address_name:
- address = frappe.get_doc('Address', address_name)
+ address_names = frappe.get_all('Dynamic Link', filters={
+ "parenttype":"Address",
+ "link_doctype":"Lead",
+ "link_name":self.lead_name
+ }, fields=["parent as name"])
+
+ for address_name in address_names:
+ address = frappe.get_doc('Address', address_name.get('name'))
if not address.has_link('Customer', self.name):
address.append('links', dict(link_doctype='Customer', link_name=self.name))
address.save()
@@ -105,17 +108,17 @@
lead = frappe.db.get_value("Lead", self.lead_name, ["lead_name", "email_id", "phone", "mobile_no"], as_dict=True)
# create contact from lead
- c = frappe.new_doc('Contact')
- c.first_name = lead.lead_name
- c.email_id = lead.email_id
- c.phone = lead.phone
- c.mobile_no = lead.mobile_no
- c.is_primary_contact = 1
- c.append('links', dict(link_doctype='Customer', link_name=self.name))
- c.flags.ignore_permissions = self.flags.ignore_permissions
- c.autoname()
- if not frappe.db.exists("Contact", c.name):
- c.insert()
+ contact = frappe.new_doc('Contact')
+ contact.first_name = lead.lead_name
+ contact.email_id = lead.email_id
+ contact.phone = lead.phone
+ contact.mobile_no = lead.mobile_no
+ contact.is_primary_contact = 1
+ contact.append('links', dict(link_doctype='Customer', link_name=self.name))
+ contact.flags.ignore_permissions = self.flags.ignore_permissions
+ contact.autoname()
+ if not frappe.db.exists("Contact", contact.name):
+ contact.insert()
def validate_name_with_customer_group(self):
if frappe.db.exists("Customer Group", self.name):
@@ -133,7 +136,7 @@
def on_trash(self):
delete_contact_and_address('Customer', self.name)
if self.lead_name:
- frappe.db.sql("update `tabLead` set status='Interested' where name=%s",self.lead_name)
+ frappe.db.sql("update `tabLead` set status='Interested' where name=%s", self.lead_name)
def after_rename(self, olddn, newdn, merge=False):
if frappe.defaults.get_global_default('cust_master_name') == 'Customer Name':
diff --git a/erpnext/selling/doctype/customer/customer_list.js b/erpnext/selling/doctype/customer/customer_list.js
index 57cebd4..09c3e93 100644
--- a/erpnext/selling/doctype/customer/customer_list.js
+++ b/erpnext/selling/doctype/customer/customer_list.js
@@ -1,12 +1,3 @@
frappe.listview_settings['Customer'] = {
- add_fields: ["customer_name", "territory", "customer_group", "customer_type", 'status'],
- get_indicator: function(doc) {
- color = {
- 'Open': 'red',
- 'Active': 'green',
- 'Dormant': 'darkgrey'
- }
- return [__(doc.status), color[doc.status], "status,=," + doc.status];
- }
-
+ add_fields: ["customer_name", "territory", "customer_group", "customer_type"],
};
diff --git a/erpnext/selling/doctype/installation_note/installation_note.json b/erpnext/selling/doctype/installation_note/installation_note.json
index 0254ec8..aa66193 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.json
+++ b/erpnext/selling/doctype/installation_note/installation_note.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Installation Note",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -168,6 +173,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Name",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -308,6 +318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -337,7 +348,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -368,6 +380,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -424,6 +438,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Installation Date",
@@ -453,6 +468,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Installation Time",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -513,7 +530,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -544,6 +562,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -574,6 +593,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Remarks",
@@ -603,6 +623,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -632,6 +653,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -663,7 +685,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:53:24.141335",
+ "modified": "2017-02-20 13:23:58.072172",
"modified_by": "Administrator",
"module": "Selling",
"name": "Installation Note",
@@ -679,7 +701,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -700,7 +721,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -715,9 +735,11 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "customer_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/installation_note_item/installation_note_item.json b/erpnext/selling/doctype/installation_note_item/installation_note_item.json
index 9b8d48f..17bf278 100644
--- a/erpnext/selling/doctype/installation_note_item/installation_note_item.json
+++ b/erpnext/selling/doctype/installation_note_item/installation_note_item.json
@@ -9,18 +9,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -31,6 +35,7 @@
"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,
@@ -41,13 +46,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "serial_no",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 0,
@@ -58,6 +66,7 @@
"print_hide_if_no_value": 0,
"print_width": "180px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -69,13 +78,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Installed Qty",
"length": 0,
"no_copy": 0,
@@ -85,6 +97,7 @@
"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,
@@ -95,13 +108,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -112,6 +128,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -123,13 +140,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_detail_docname",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Document Detail No",
"length": 0,
"no_copy": 1,
@@ -140,6 +160,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -151,13 +172,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_docname",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Document No",
"length": 0,
"no_copy": 1,
@@ -168,6 +192,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -179,13 +204,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_doctype",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Document Type",
"length": 0,
"no_copy": 1,
@@ -196,6 +224,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -215,7 +244,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-07-11 03:28:00.837535",
+ "modified": "2017-02-20 13:24:18.142419",
"modified_by": "Administrator",
"module": "Selling",
"name": "Installation Note Item",
@@ -224,6 +253,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.json b/erpnext/selling/doctype/product_bundle/product_bundle.json
index 0edb8e6..5a1aeb4 100644
--- a/erpnext/selling/doctype/product_bundle/product_bundle.json
+++ b/erpnext/selling/doctype/product_bundle/product_bundle.json
@@ -2,29 +2,37 @@
"allow_copy": 0,
"allow_import": 1,
"allow_rename": 0,
+ "beta": 0,
"creation": "2013-06-20 11:53:21",
"custom": 0,
"description": "Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. \n\nThe package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".\n\nFor Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.\n\nNote: BOM = Bill of Materials",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "basic_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -35,13 +43,17 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "new_item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Parent Item",
"length": 0,
"no_copy": 1,
@@ -50,7 +62,9 @@
"options": "Item",
"permlevel": 0,
"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,
@@ -61,19 +75,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "List items that form the package.",
"fieldname": "item_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
- "label": "",
+ "in_standard_filter": 0,
+ "label": "Items",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -84,12 +104,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Items",
"length": 0,
"no_copy": 0,
@@ -98,25 +122,86 @@
"options": "Product Bundle Item",
"permlevel": 0,
"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": "section_break_4",
+ "fieldtype": "Section Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "about",
+ "fieldtype": "HTML",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "",
+ "length": 0,
+ "no_copy": 0,
+ "options": "<h3>About Product Bundle</h3>\n\n<p>Aggregate group of <b>Items</b> into another <b>Item</b>. This is useful if you are bundling a certain <b>Items</b> into a package and you maintain stock of the packed <b>Items</b> and not the aggregate <b>Item</b>.</p>\n<p>The package <b>Item</b> will have <code>Is Stock Item</code> as <b>No</b> and <code>Is Sales Item</code> as <b>Yes</b>.</p>\n<h4>Example:</h4>\n<p>If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Product Bundle Item.</p>",
+ "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,
"hide_toolbar": 0,
"icon": "fa fa-sitemap",
"idx": 1,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2015-11-16 06:29:52.231105",
+ "modified": "2017-02-22 05:06:30.143089",
"modified_by": "Administrator",
"module": "Selling",
"name": "Product Bundle",
@@ -183,6 +268,11 @@
"write": 1
}
],
+ "quick_entry": 0,
"read_only": 0,
- "read_only_onload": 0
+ "read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "sort_order": "ASC",
+ "track_changes": 0,
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/product_bundle_item/product_bundle_item.json b/erpnext/selling/doctype/product_bundle_item/product_bundle_item.json
index 83ebab1..d31b5fb 100644
--- a/erpnext/selling/doctype/product_bundle_item/product_bundle_item.json
+++ b/erpnext/selling/doctype/product_bundle_item/product_bundle_item.json
@@ -8,18 +8,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item",
"length": 0,
"no_copy": 0,
@@ -30,6 +34,7 @@
"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,
@@ -40,13 +45,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty",
"length": 0,
"no_copy": 0,
@@ -56,6 +64,7 @@
"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,
@@ -66,13 +75,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -83,6 +95,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -93,13 +106,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rate",
"fieldtype": "Float",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -109,6 +125,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -119,13 +136,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -136,6 +156,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -153,7 +174,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:04.049998",
+ "modified": "2017-02-20 13:24:05.633546",
"modified_by": "Administrator",
"module": "Selling",
"name": "Product Bundle Item",
@@ -162,5 +183,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index a543ecd..ee194f3 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -109,7 +112,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quotation To",
@@ -140,7 +144,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -171,7 +176,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Lead",
@@ -202,6 +208,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -229,6 +236,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -257,6 +265,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -288,7 +297,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -320,7 +330,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -351,7 +362,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Order Type",
@@ -384,6 +396,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -411,7 +424,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -440,6 +454,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -469,7 +484,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -500,6 +516,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -527,6 +544,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -554,6 +572,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -583,6 +602,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -610,6 +630,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -638,6 +659,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -666,7 +688,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -697,7 +720,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -726,6 +750,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -753,7 +778,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -786,6 +812,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -817,6 +844,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -843,7 +871,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -875,6 +904,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -904,6 +934,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -932,6 +963,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -959,6 +991,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -988,6 +1021,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -1019,6 +1053,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1045,6 +1080,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1074,6 +1110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1105,6 +1142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1131,6 +1169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1160,6 +1199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1188,6 +1228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1217,6 +1258,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1247,6 +1289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1273,6 +1316,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Rule",
@@ -1302,6 +1346,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1328,6 +1373,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Taxes and Charges",
@@ -1358,6 +1404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1386,6 +1433,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1412,6 +1460,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1442,6 +1491,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1468,6 +1518,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1497,6 +1548,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1526,6 +1578,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1555,6 +1608,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1584,6 +1638,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1611,6 +1666,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1639,6 +1695,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1667,6 +1724,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1696,6 +1754,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1728,6 +1787,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1758,6 +1818,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -1789,6 +1850,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1817,6 +1879,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -1848,6 +1911,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total",
@@ -1879,6 +1943,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -1910,6 +1975,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -1939,6 +2005,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -1969,6 +2036,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Term Details",
@@ -1998,6 +2066,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Settings",
@@ -2026,6 +2095,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -2056,6 +2126,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -2086,6 +2157,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2113,6 +2185,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -2141,6 +2214,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -2170,6 +2244,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -2200,6 +2275,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -2231,6 +2307,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quotation Lost Reason",
@@ -2260,6 +2337,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2288,7 +2366,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Status",
@@ -2319,6 +2398,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opportunity Item",
@@ -2348,6 +2428,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Quotation",
@@ -2379,7 +2460,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2017-01-04 06:28:07.269867",
+ "modified": "2017-02-20 13:22:18.466192",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
@@ -2395,7 +2476,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2416,7 +2496,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"match": "",
"permlevel": 1,
"print": 0,
@@ -2438,7 +2517,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"match": "",
"permlevel": 1,
"print": 0,
@@ -2460,7 +2538,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2481,7 +2558,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2502,7 +2578,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"match": "",
"permlevel": 1,
"print": 0,
@@ -2524,7 +2599,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2545,7 +2619,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"match": "",
"permlevel": 1,
"print": 0,
@@ -2562,6 +2635,7 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status,transaction_date,customer,lead,order_type",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py
index 7a59dd7..36cc472 100644
--- a/erpnext/selling/doctype/quotation/test_quotation.py
+++ b/erpnext/selling/doctype/quotation/test_quotation.py
@@ -68,47 +68,6 @@
self.assertEquals(quotation.get("items")[0].rate, total_margin)
si.save()
- def test_party_status_open(self):
- from erpnext.selling.doctype.customer.test_customer import get_customer_dict
-
- customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- quotation.submit()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- quotation.cancel()
- quotation.delete()
- customer.delete()
-
- def test_party_status_close(self):
- from erpnext.selling.doctype.customer.test_customer import get_customer_dict
-
- customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
- # open quotation
- quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- # close quotation (submit)
- quotation.submit()
-
- quotation1 = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
-
- # still open
- self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
- quotation.cancel()
- quotation.delete()
-
- quotation1.delete()
-
- customer.delete()
-
test_records = frappe.get_test_records('Quotation')
def get_quotation_dict(customer=None, item_code=None):
diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.json b/erpnext/selling/doctype/quotation_item/quotation_item.json
index 3a27706..254e6c3 100644
--- a/erpnext/selling/doctype/quotation_item/quotation_item.json
+++ b/erpnext/selling/doctype/quotation_item/quotation_item.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -34,6 +37,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -52,7 +56,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Customer's Item Code",
"length": 0,
"no_copy": 0,
@@ -60,6 +66,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,13 +84,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -100,8 +110,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -112,6 +124,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 1,
@@ -130,7 +143,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -139,6 +154,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,
@@ -156,7 +172,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -167,6 +185,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -185,7 +204,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -193,6 +214,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,
@@ -210,7 +232,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -219,6 +243,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,
@@ -236,7 +261,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -246,6 +273,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -263,7 +291,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
@@ -271,6 +301,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,
@@ -288,7 +319,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -299,6 +332,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -317,7 +351,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
@@ -329,6 +365,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -347,13 +384,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -371,7 +411,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -383,6 +425,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -401,7 +444,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -413,6 +458,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -431,7 +477,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Discount and Margin",
"length": 0,
"no_copy": 0,
@@ -440,6 +488,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,
@@ -458,7 +507,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
@@ -469,6 +520,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -487,7 +539,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -495,6 +549,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,
@@ -513,7 +568,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Margin Type",
"length": 0,
"no_copy": 0,
@@ -523,6 +580,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -541,7 +599,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Margin Rate or Amount",
"length": 0,
"no_copy": 0,
@@ -550,6 +610,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -568,7 +629,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Total Margin",
"length": 0,
"no_copy": 0,
@@ -577,6 +640,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -594,13 +658,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -619,7 +686,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -631,6 +700,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -649,7 +719,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
@@ -658,6 +730,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -675,7 +748,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -687,6 +762,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -705,7 +781,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
@@ -715,6 +793,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -732,13 +811,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -756,7 +838,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -768,6 +852,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -786,7 +871,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -795,6 +882,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -812,7 +900,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -824,6 +914,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -842,7 +933,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -852,6 +945,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -869,7 +963,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
@@ -878,6 +974,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -896,7 +993,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Balance",
"length": 0,
"no_copy": 0,
@@ -905,6 +1004,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,
@@ -922,7 +1022,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -932,6 +1034,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -949,7 +1052,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -957,6 +1062,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,
@@ -974,7 +1080,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Projected Qty",
"length": 0,
"no_copy": 0,
@@ -983,6 +1091,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1001,7 +1110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Qty",
"length": 0,
"no_copy": 1,
@@ -1010,6 +1121,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1027,7 +1139,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Stock Balance",
"length": 0,
"no_copy": 0,
@@ -1036,6 +1150,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,
@@ -1053,7 +1168,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
@@ -1061,6 +1178,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,
@@ -1078,7 +1196,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Doctype",
"length": 0,
"no_copy": 1,
@@ -1090,6 +1210,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1108,7 +1229,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Against Docname",
"length": 0,
"no_copy": 1,
@@ -1120,6 +1243,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1138,7 +1262,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
@@ -1148,6 +1274,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1165,13 +1292,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -1189,7 +1319,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
@@ -1199,6 +1331,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1216,8 +1349,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -1228,6 +1363,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1244,8 +1380,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
@@ -1257,6 +1395,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1276,7 +1415,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-01 13:02:18.665333",
+ "modified": "2017-02-20 13:23:20.175080",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation Item",
@@ -1285,7 +1424,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 8a4a47c..8130ce8 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -4,19 +4,34 @@
{% include 'erpnext/selling/sales_common.js' %}
frappe.ui.form.on("Sales Order", {
+ setup: function(frm) {
+ $.extend(frm.cscript, new erpnext.selling.SalesOrderController({frm: frm}));
+ },
onload: function(frm) {
erpnext.queries.setup_queries(frm, "Warehouse", function() {
return erpnext.queries.warehouse(frm.doc);
});
+ frm.set_query('project', function(doc, cdt, cdn) {
+ return {
+ query: "erpnext.controllers.queries.get_project_name",
+ filters: {
+ 'customer': doc.customer
+ }
+ }
+ });
+
// formatter for material request item
frm.set_indicator_formatter('item_code',
function(doc) { return (doc.qty<=doc.delivered_qty) ? "green" : "orange" })
+
+ erpnext.queries.setup_warehouse_query(frm);
}
});
erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
refresh: function(doc, dt, dn) {
+ var me = this;
this._super();
var allow_purchase = false;
var allow_delivery = false;
@@ -24,8 +39,8 @@
if(doc.docstatus==1) {
if(doc.status != 'Closed') {
- for (var i in cur_frm.doc.items) {
- var item = cur_frm.doc.items[i];
+ for (var i in this.frm.doc.items) {
+ var item = this.frm.doc.items[i];
if(item.delivered_by_supplier === 1 || item.supplier){
if(item.qty > flt(item.ordered_qty)
&& item.qty > flt(item.delivered_qty)) {
@@ -47,55 +62,69 @@
if (this.frm.has_perm("submit")) {
// close
if(flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed) < 100) {
- cur_frm.add_custom_button(__('Close'), this.close_sales_order, __("Status"))
+ this.frm.add_custom_button(__('Close'),
+ function() { me.close_sales_order() }, __("Status"))
}
}
// delivery note
if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
- cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note, __("Make"));
- cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ this.frm.add_custom_button(__('Delivery'),
+ function() { me.make_delivery_note() }, __("Make"));
+ this.frm.add_custom_button(__('Production Order'),
+ function() { me.make_production_order() }, __("Make"));
+
+ this.frm.page.set_inner_btn_group_as_primary(__("Make"));
}
// sales invoice
if(flt(doc.per_billed, 2) < 100) {
- cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice, __("Make"));
+ this.frm.add_custom_button(__('Invoice'),
+ function() { me.make_sales_invoice() }, __("Make"));
}
// material request
if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
&& flt(doc.per_delivered, 2) < 100) {
- cur_frm.add_custom_button(__('Material Request'), this.make_material_request, __("Make"));
+ this.frm.add_custom_button(__('Material Request'),
+ function() { me.make_material_request() }, __("Make"));
}
// make purchase order
if(flt(doc.per_delivered, 2) < 100 && allow_purchase) {
- cur_frm.add_custom_button(__('Purchase Order'), cur_frm.cscript.make_purchase_order, __("Make"));
+ this.frm.add_custom_button(__('Purchase Order'),
+ function() { me.make_purchase_order() }, __("Make"));
}
+ // payment request
if(flt(doc.per_billed)==0) {
- cur_frm.add_custom_button(__('Payment Request'), this.make_payment_request, __("Make"));
- cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_payment_entry, __("Make"));
+ this.frm.add_custom_button(__('Payment Request'),
+ function() { me.make_payment_request() }, __("Make"));
+ this.frm.add_custom_button(__('Payment'),
+ function() { me.make_payment_entry() }, __("Make"));
}
// maintenance
if(flt(doc.per_delivered, 2) < 100 &&
["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
- cur_frm.add_custom_button(__('Maintenance Visit'), this.make_maintenance_visit, __("Make"));
- cur_frm.add_custom_button(__('Maintenance Schedule'), this.make_maintenance_schedule, __("Make"));
+ this.frm.add_custom_button(__('Maintenance Visit'),
+ function() { me.make_maintenance_visit() }, __("Make"));
+ this.frm.add_custom_button(__('Maintenance Schedule'),
+ function() { me.make_maintenance_schedule() }, __("Make"));
}
-
} else {
if (this.frm.has_perm("submit")) {
// un-close
- cur_frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unclose Sales Order'], __("Status"));
+ this.frm.add_custom_button(__('Re-open'), function() {
+ me.frm.cscript.update_status('Re-open', 'Draft')
+ }, __("Status"));
}
}
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(__('Quotation'),
+ this.frm.add_custom_button(__('Quotation'),
function() {
erpnext.utils.map_current_doc({
method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
@@ -103,9 +132,9 @@
get_query_filters: {
docstatus: 1,
status: ["!=", "Lost"],
- order_type: cur_frm.doc.order_type,
- customer: cur_frm.doc.customer || undefined,
- company: cur_frm.doc.company
+ order_type: me.frm.doc.order_type,
+ customer: me.frm.doc.customer || undefined,
+ company: me.frm.doc.company
}
})
}, __("Get items from"));
@@ -114,6 +143,82 @@
this.order_type(doc);
},
+ make_production_order() {
+ var me = this;
+ this.frm.call({
+ doc: this.frm.doc,
+ method: 'get_production_order_items',
+ callback: function(r) {
+ if(!r.message.every(function(d) { return !!d.bom })) {
+ frappe.msgprint({
+ title: __('Production Order not created'),
+ message: __('No Items with Bill of Materials to Manufacture'),
+ indicator: 'orange'
+ });
+ return;
+ }
+ else if(!r.message.every(function(d) { return !!d.pending_qty })) {
+ frappe.msgprint({
+ title: __('Production Order not created'),
+ message: __('Production Order already created for all items with BOM'),
+ indicator: 'orange'
+ });
+ return;
+ } else {
+ var fields = [
+ {fieldtype:'Table', fieldname: 'items',
+ description: __('Select BOM and Qty for Production'),
+ fields: [
+ {fieldtype:'Read Only', fieldname:'item_code',
+ label: __('Item Code'), in_list_view:1},
+ {fieldtype:'Link', fieldname:'bom', options: 'BOM',
+ label: __('Select BOM'), in_list_view:1, get_query: function(doc) {
+ return {filters: {item: doc.item_code}};
+ }},
+ {fieldtype:'Float', fieldname:'pending_qty',
+ label: __('Qty'), in_list_view:1},
+ ],
+ get_data: function() {
+ return r.message
+ }
+ }
+ ]
+ var d = new frappe.ui.Dialog({
+ title: __('Select Items to Manufacture'),
+ fields: fields,
+ primary_action: function() {
+ data = d.get_values();
+ me.frm.call({
+ method: 'make_production_orders',
+ args: {
+ items: data,
+ company: me.frm.doc.company,
+ sales_order: me.frm.docname,
+ project: me.frm.project
+ },
+ freeze: true,
+ callback: function(r) {
+ if(r.message) {
+ frappe.msgprint({
+ message: __('Production Orders Created: {0}',
+ [r.message.map(function(d) {
+ return repl('<a href="#Form/Production Order/%(name)s">%(name)s</a>', {name:d})
+ }).join(', ')]),
+ indicator: 'green'
+ })
+ }
+ d.hide();
+ }
+ });
+ },
+ primary_action_label: __('Make')
+ });
+ d.show();
+ }
+ }
+ });
+ },
+
order_type: function() {
this.frm.toggle_reqd("delivery_date", this.frm.doc.order_type == "Sales");
},
@@ -125,39 +230,40 @@
make_material_request: function() {
frappe.model.open_mapped_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
- frm: cur_frm
+ frm: this.frm
})
},
make_delivery_note: function() {
frappe.model.open_mapped_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
- frm: cur_frm
+ frm: this.frm
})
},
make_sales_invoice: function() {
frappe.model.open_mapped_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
- frm: cur_frm
+ frm: this.frm
})
},
make_maintenance_schedule: function() {
frappe.model.open_mapped_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule",
- frm: cur_frm
+ frm: this.frm
})
},
make_maintenance_visit: function() {
frappe.model.open_mapped_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
- frm: cur_frm
+ frm: this.frm
})
},
make_purchase_order: function(){
+ var me = this;
var dialog = new frappe.ui.Dialog({
title: __("For Supplier"),
fields: [
@@ -165,7 +271,7 @@
"get_query": function () {
return {
query:"erpnext.selling.doctype.sales_order.sales_order.get_supplier",
- filters: {'parent': cur_frm.doc.name}
+ filters: {'parent': me.frm.doc.name}
}
}, "reqd": 1 },
{"fieldtype": "Button", "label": __("Make Purchase Order"), "fieldname": "make_purchase_order", "cssClass": "btn-primary"},
@@ -180,7 +286,7 @@
type: "GET",
method: "erpnext.selling.doctype.sales_order.sales_order.make_purchase_order_for_drop_shipment",
args: {
- "source_name": cur_frm.doc.name,
+ "source_name": me.frm.doc.name,
"for_supplier": args.supplier
},
freeze: true,
@@ -195,44 +301,25 @@
dialog.show();
},
close_sales_order: function(){
- cur_frm.cscript.update_status("Close", "Closed")
+ this.frm.cscript.update_status("Close", "Closed")
+ },
+ update_status: function(label, status){
+ var doc = this.frm.doc;
+ frappe.ui.form.is_saving = true;
+ frappe.call({
+ method: "erpnext.selling.doctype.sales_order.sales_order.update_status",
+ args: {status: status, name: doc.name},
+ callback: function(r){
+ this.frm.reload_doc();
+ },
+ always: function() {
+ frappe.ui.form.is_saving = false;
+ }
+ });
+ },
+ on_submit: function(doc, cdt, cdn) {
+ if(cint(frappe.boot.notification_settings.sales_order)) {
+ this.frm.email_doc(frappe.boot.notification_settings.sales_order_message);
+ }
}
-
});
-
-// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
-
-cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
- return {
- query: "erpnext.controllers.queries.get_project_name",
- filters: {
- 'customer': doc.customer
- }
- }
-}
-
-cur_frm.cscript.update_status = function(label, status){
- var doc = cur_frm.doc;
- frappe.ui.form.is_saving = true;
- frappe.call({
- method: "erpnext.selling.doctype.sales_order.sales_order.update_status",
- args: {status: status, name: doc.name},
- callback: function(r){
- cur_frm.reload_doc();
- },
- always: function() {
- frappe.ui.form.is_saving = false;
- }
- });
-}
-
-cur_frm.cscript['Unclose Sales Order'] = function() {
- cur_frm.cscript.update_status('Re-open', 'Draft')
-}
-
-cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
- if(cint(frappe.boot.notification_settings.sales_order)) {
- cur_frm.email_doc(frappe.boot.notification_settings.sales_order_message);
- }
-};
diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json
index 51e68fb..4937522 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.json
+++ b/erpnext/selling/doctype/sales_order/sales_order.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -137,7 +141,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -168,6 +173,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Order Type",
@@ -227,6 +234,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -255,6 +263,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -286,7 +295,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -318,7 +328,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -349,7 +360,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Date",
@@ -382,6 +394,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Purchase Order",
@@ -414,6 +427,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Purchase Order Date",
@@ -446,6 +460,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -473,7 +488,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -502,6 +518,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -528,7 +545,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -557,6 +575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -584,6 +603,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -611,6 +631,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -639,6 +660,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -665,7 +687,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address Name",
@@ -694,6 +717,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -721,7 +745,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -750,7 +775,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -779,6 +805,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -807,6 +834,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -839,6 +867,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -870,6 +899,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -897,6 +927,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -928,6 +959,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -957,6 +989,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -985,6 +1018,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -1012,6 +1046,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1041,6 +1076,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -1071,6 +1107,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1097,6 +1134,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1123,6 +1161,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1152,6 +1191,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1183,6 +1223,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1209,6 +1250,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1238,6 +1280,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1266,6 +1309,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1295,6 +1339,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1325,6 +1370,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1351,6 +1397,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Rule",
@@ -1380,6 +1427,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1406,6 +1454,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Taxes and Charges",
@@ -1436,6 +1485,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1464,6 +1514,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1490,6 +1541,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1521,6 +1573,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1548,6 +1601,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1577,6 +1631,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1606,6 +1661,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1635,6 +1691,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1664,6 +1721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1691,6 +1749,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1720,6 +1779,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1748,6 +1808,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1777,6 +1838,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1808,6 +1870,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -1840,6 +1903,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1870,6 +1934,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1898,6 +1963,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -1929,6 +1995,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total",
@@ -1960,6 +2027,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -1990,6 +2058,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Advance Paid",
@@ -2020,6 +2089,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Packing List",
@@ -2049,6 +2119,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Packed Items",
@@ -2080,6 +2151,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -2109,6 +2181,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -2139,6 +2212,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions Details",
@@ -2169,6 +2243,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -2198,7 +2273,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -2229,6 +2305,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Party Account Currency",
@@ -2258,6 +2335,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2285,6 +2363,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -2316,6 +2395,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -2346,6 +2426,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Details",
@@ -2374,6 +2455,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -2402,6 +2484,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -2432,6 +2515,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2460,6 +2544,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -2490,6 +2575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Group same items",
@@ -2518,6 +2604,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing and Delivery Status",
@@ -2547,7 +2634,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Status",
@@ -2579,6 +2667,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Delivery Status",
@@ -2608,7 +2697,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "% Delivered",
@@ -2639,6 +2729,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2666,7 +2757,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "% Amount Billed",
@@ -2697,6 +2789,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Billing Status",
@@ -2726,6 +2819,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission",
@@ -2754,7 +2848,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -2786,6 +2881,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2813,6 +2909,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission Rate",
@@ -2843,6 +2940,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Commission",
@@ -2874,6 +2972,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team",
@@ -2901,6 +3000,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team1",
@@ -2926,12 +3026,14 @@
"collapsible": 1,
"collapsible_depends_on": "is_recurring",
"columns": 0,
+ "depends_on": "eval:doc.docstatus<2 && !doc.__islocal",
"fieldname": "recurring_order",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Order",
@@ -2960,6 +3062,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Settings",
@@ -2990,6 +3093,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Recurring",
@@ -3019,6 +3123,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Document",
@@ -3049,6 +3154,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Frequency",
@@ -3079,6 +3185,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Repeat on Day of Month",
@@ -3108,6 +3215,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Upto",
@@ -3136,6 +3244,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Submit on creation",
@@ -3166,6 +3275,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notify by email",
@@ -3196,6 +3306,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Notification Email Address",
@@ -3225,6 +3336,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recurring Print Format",
@@ -3254,6 +3366,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "This Document",
@@ -3283,6 +3396,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Date",
@@ -3312,6 +3426,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "To Date",
@@ -3341,6 +3456,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Next Date",
@@ -3369,7 +3485,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-01-06 12:51:17.847227",
+ "modified": "2017-02-22 18:17:15.293694",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",
@@ -3385,7 +3501,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3406,7 +3521,6 @@
"export": 1,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3427,7 +3541,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3448,7 +3561,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3469,7 +3581,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -3490,7 +3601,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -3506,9 +3616,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status,transaction_date,customer,customer_name, territory,order_type,company",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index acae0e5..fdaadd8 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -304,6 +304,24 @@
self.indicator_color = "green"
self.indicator_title = _("Paid")
+ def get_production_order_items(self):
+ '''Returns items with BOM that already do not have a linked production order'''
+ items = []
+ for i in self.packed_items or self.items:
+ bom = frappe.get_all('BOM', dict(item=i.item_code, is_active=True),
+ order_by='is_default desc')
+ bom = bom[0].name if bom else None
+ items.append(dict(
+ item_code= i.item_code,
+ bom = bom,
+ warehouse = i.warehouse,
+ pending_qty= i.qty - flt(frappe.db.sql('''select sum(qty) from `tabProduction Order`
+ where production_item=%s and sales_order=%s''', (i.item_code, self.name))[0][0])
+ ))
+
+ return items
+
+
def on_recurring(self, reference_doc):
mcount = month_map[reference_doc.recurring_type]
self.set("delivery_date", get_next_date(reference_doc.delivery_date, mcount,
@@ -442,7 +460,7 @@
target.amount = flt(source.amount) - flt(source.billed_amt)
target.base_amount = target.amount * flt(source_parent.conversion_rate)
target.qty = target.amount / flt(source.rate) if (source.rate and source.billed_amt) else source.qty
-
+
item = frappe.db.get_value("Item", target.item_code, ["item_group", "selling_cost_center"], as_dict=1)
target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \
or item.selling_cost_center \
@@ -653,6 +671,27 @@
})
@frappe.whitelist()
+def make_production_orders(items, sales_order, company, project=None):
+ '''Make Production Orders against the given Sales Order for the given `items`'''
+ items = json.loads(items).get('items')
+ out = []
+
+ for i in items:
+ production_order = frappe.get_doc(dict(
+ doctype='Production Order',
+ production_item=i['item_code'],
+ bom_no=i['bom'],
+ qty=i['pending_qty'],
+ company=company,
+ sales_order=sales_order,
+ project=project,
+ fg_warehouse=i['warehouse']
+ )).insert()
+ out.append(production_order)
+
+ return [p.name for p in out]
+
+@frappe.whitelist()
def update_status(status, name):
so = frappe.get_doc("Sales Order", name)
so.update_status(status)
diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.json b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
index a59858a..ae30450 100644
--- a/erpnext/selling/doctype/sales_order_item/sales_order_item.json
+++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,8 +22,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -34,6 +37,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -52,7 +56,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Customer's Item Code",
"length": 0,
"no_copy": 0,
@@ -60,6 +66,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -77,13 +84,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -101,7 +111,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -112,6 +124,7 @@
"print_hide_if_no_value": 0,
"print_width": "150",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -130,7 +143,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -139,6 +154,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,
@@ -155,8 +171,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -167,6 +185,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -185,7 +204,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -193,6 +214,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,
@@ -210,7 +232,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -219,6 +243,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,
@@ -236,7 +261,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -246,6 +273,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -263,7 +291,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
@@ -271,6 +301,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,
@@ -288,7 +319,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -299,6 +332,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -317,7 +351,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
@@ -329,6 +365,7 @@
"print_hide_if_no_value": 0,
"print_width": "70px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -347,13 +384,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -371,7 +411,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -383,6 +425,7 @@
"print_hide_if_no_value": 0,
"print_width": "70px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -401,7 +444,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -413,6 +458,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -431,7 +477,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Discount and Margin",
"length": 0,
"no_copy": 0,
@@ -440,6 +488,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,
@@ -458,7 +507,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
@@ -469,6 +520,7 @@
"print_hide_if_no_value": 0,
"print_width": "70px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -487,7 +539,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -495,6 +549,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,
@@ -513,7 +568,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Margin Type",
"length": 0,
"no_copy": 0,
@@ -523,6 +580,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -541,7 +599,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Margin Rate or Amount",
"length": 0,
"no_copy": 0,
@@ -550,6 +610,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -568,7 +629,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Total Margin",
"length": 0,
"no_copy": 0,
@@ -577,6 +640,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -594,13 +658,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -619,7 +686,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
@@ -631,6 +700,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -649,7 +719,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -662,6 +734,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -680,13 +753,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -704,7 +780,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Basic Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -716,6 +794,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -734,7 +813,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -746,6 +827,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -764,7 +846,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
@@ -773,6 +857,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -790,7 +875,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -798,6 +885,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,
@@ -815,7 +903,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
@@ -825,6 +915,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -842,7 +933,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
@@ -852,6 +945,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -869,7 +963,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -877,6 +973,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,
@@ -894,7 +991,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -904,6 +1003,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -921,7 +1021,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
@@ -931,6 +1033,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -949,7 +1052,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Drop Ship",
"length": 0,
"no_copy": 0,
@@ -958,6 +1063,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -975,7 +1081,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier delivers to Customer",
"length": 0,
"no_copy": 0,
@@ -984,6 +1092,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1001,7 +1110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Supplier",
"length": 0,
"no_copy": 0,
@@ -1011,6 +1122,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1028,7 +1140,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Warehouse and Reference",
"length": 0,
"no_copy": 0,
@@ -1036,6 +1150,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,
@@ -1054,7 +1169,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Delivery Warehouse",
"length": 0,
"no_copy": 0,
@@ -1066,6 +1183,7 @@
"print_hide_if_no_value": 0,
"print_width": "150px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1085,7 +1203,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Customer Warehouse (Optional)",
"length": 0,
"no_copy": 1,
@@ -1095,6 +1215,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1111,8 +1232,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quotation",
"length": 0,
"no_copy": 1,
@@ -1123,6 +1246,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1139,8 +1263,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand Name",
"length": 0,
"no_copy": 0,
@@ -1151,6 +1277,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1168,8 +1295,10 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
@@ -1180,6 +1309,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -1197,7 +1327,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 0,
@@ -1207,6 +1339,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1224,13 +1357,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -1248,7 +1384,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Projected Qty",
"length": 0,
"no_copy": 1,
@@ -1259,6 +1397,7 @@
"print_hide_if_no_value": 0,
"print_width": "70px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1277,7 +1416,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Qty",
"length": 0,
"no_copy": 1,
@@ -1286,6 +1427,7 @@
"print_hide_if_no_value": 0,
"print_width": "70px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1304,7 +1446,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Ordered Qty",
"length": 0,
"no_copy": 1,
@@ -1313,6 +1457,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1330,7 +1475,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Delivered Qty",
"length": 0,
"no_copy": 1,
@@ -1341,6 +1488,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1360,7 +1508,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Returned Qty",
"length": 0,
"no_copy": 1,
@@ -1369,6 +1519,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1386,7 +1537,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Billed Amt",
"length": 0,
"no_copy": 1,
@@ -1395,6 +1548,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -1412,7 +1566,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Valuation Rate",
"length": 0,
"no_copy": 1,
@@ -1422,6 +1578,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1439,7 +1596,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Gross Profit",
"length": 0,
"no_copy": 1,
@@ -1449,6 +1608,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1467,7 +1627,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Planned Quantity",
"length": 0,
"no_copy": 1,
@@ -1478,6 +1640,7 @@
"print_hide_if_no_value": 0,
"print_width": "50px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1497,7 +1660,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Produced Quantity",
"length": 0,
"no_copy": 0,
@@ -1508,6 +1673,7 @@
"print_hide_if_no_value": 0,
"print_width": "50px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1526,7 +1692,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
@@ -1536,6 +1704,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1554,7 +1723,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Order Date",
"length": 0,
"no_copy": 0,
@@ -1564,6 +1735,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -1582,7 +1754,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-01 13:01:13.572400",
+ "modified": "2017-02-20 13:23:31.696583",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order Item",
@@ -1591,7 +1763,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.json b/erpnext/selling/doctype/selling_settings/selling_settings.json
index f1bfe95..11b83c6 100644
--- a/erpnext/selling/doctype/selling_settings/selling_settings.json
+++ b/erpnext/selling/doctype/selling_settings/selling_settings.json
@@ -24,7 +24,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Customer Naming By",
"length": 0,
"no_copy": 0,
@@ -33,6 +35,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,
@@ -50,7 +53,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Campaign Naming By",
"length": 0,
"no_copy": 0,
@@ -59,6 +64,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,
@@ -77,7 +83,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Default Customer Group",
"length": 0,
"no_copy": 0,
@@ -86,6 +94,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,
@@ -104,7 +113,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Default Territory",
"length": 0,
"no_copy": 0,
@@ -113,6 +124,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,
@@ -130,7 +142,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Default Price List",
"length": 0,
"no_copy": 0,
@@ -139,6 +153,38 @@
"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,
+ "default": "15",
+ "description": "Auto close Opportunity after 15 days",
+ "fieldname": "close_opportunity_after_days",
+ "fieldtype": "Int",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Close Opportunity After Days",
+ "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,
@@ -156,13 +202,16 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -180,7 +229,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Sales Order Required",
"length": 0,
"no_copy": 0,
@@ -189,6 +240,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,
@@ -206,7 +258,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Delivery Note Required",
"length": 0,
"no_copy": 0,
@@ -215,6 +269,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,
@@ -232,7 +287,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Maintain Same Rate Throughout Sales Cycle",
"length": 0,
"no_copy": 0,
@@ -240,6 +297,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,
@@ -257,7 +315,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Allow user to edit Price List Rate in transactions",
"length": 0,
"no_copy": 0,
@@ -265,6 +325,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,
@@ -282,7 +343,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Allow Item to be added multiple times in a transaction",
"length": 0,
"no_copy": 0,
@@ -291,6 +354,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,
@@ -308,7 +372,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Allow multiple Sales Orders against a Customer's Purchase Order",
"length": 0,
"no_copy": 0,
@@ -317,6 +383,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,
@@ -334,7 +401,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Validate Selling Price for Item against Purchase Rate or Valuation Rate",
"length": 0,
"no_copy": 0,
@@ -343,6 +412,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,
@@ -361,7 +431,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-10-20 08:17:45.621151",
+ "modified": "2017-02-17 13:06:03.520385",
"modified_by": "Administrator",
"module": "Selling",
"name": "Selling Settings",
@@ -377,7 +447,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -392,7 +461,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/selling/page/sales_analytics/sales_analytics.js b/erpnext/selling/page/sales_analytics/sales_analytics.js
index 2f9b02c..73793d4 100644
--- a/erpnext/selling/page/sales_analytics/sales_analytics.js
+++ b/erpnext/selling/page/sales_analytics/sales_analytics.js
@@ -202,7 +202,9 @@
if (posting_date >= from_date && posting_date <= to_date) {
var item = me.item_by_name[tl[me.tree_grid.item_key]] ||
me.item_by_name['Not Set'];
- item[me.column_map[tl.posting_date].field] += (is_val ? tl.base_net_amount : tl.qty);
+ if(item){
+ item[me.column_map[tl.posting_date].field] += (is_val ? tl.base_net_amount : tl.qty);
+ }
}
}
});
diff --git a/erpnext/selling/page/sales_funnel/sales_funnel.py b/erpnext/selling/page/sales_funnel/sales_funnel.py
index 4d12efd..3c4d528 100644
--- a/erpnext/selling/page/sales_funnel/sales_funnel.py
+++ b/erpnext/selling/page/sales_funnel/sales_funnel.py
@@ -12,9 +12,9 @@
where (date(`modified`) between %s and %s)
and status != "Do Not Contact" """, (from_date, to_date))[0][0]
- active_leads += frappe.db.sql("""select count(distinct customer) from `tabContact`
- where (date(`modified`) between %s and %s)
- and status != "Passive" """, (from_date, to_date))[0][0]
+ active_leads += frappe.db.sql("""select count(distinct contact.name) from `tabContact` contact
+ left join `tabDynamic Link` dl on (dl.parent=contact.name) where dl.link_doctype='Customer'
+ and (date(contact.modified) between %s and %s) and status != "Passive" """, (from_date, to_date))[0][0]
opportunities = frappe.db.sql("""select count(*) from `tabOpportunity`
where (date(`creation`) between %s and %s)
diff --git a/erpnext/selling/report/customer_addresses_and_contacts/__init__.py b/erpnext/selling/report/customer_addresses_and_contacts/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/selling/report/customer_addresses_and_contacts/__init__.py
+++ /dev/null
diff --git a/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.json b/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.json
deleted file mode 100644
index 1f6707b..0000000
--- a/erpnext/selling/report/customer_addresses_and_contacts/customer_addresses_and_contacts.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "add_total_row": 0,
- "apply_user_permissions": 1,
- "creation": "2012-10-04 18:45:27",
- "disabled": 0,
- "docstatus": 0,
- "doctype": "Report",
- "idx": 1,
- "is_standard": "Yes",
- "modified": "2015-08-24 11:44:00.711112",
- "modified_by": "Administrator",
- "module": "Selling",
- "name": "Customer Addresses And Contacts",
- "owner": "Administrator",
- "query": "SELECT\n\t`tabCustomer`.name as \"Customer ID:Link/Customer\",\n\t`tabCustomer`.customer_name as \"Customer Name\",\n\t`tabCustomer`.customer_group as \"Customer Group:Link/Customer Group\",\n\t`tabAddress`.address_line1 as \"Address Line 1\",\n\t`tabAddress`.address_line2 as \"Address Line 2\",\n\t`tabAddress`.city as \"City\",\n\t`tabAddress`.state as \"State\",\n\t`tabAddress`.pincode as \"Postal Code\",\n\t`tabAddress`.country as \"Country\",\n\t`tabAddress`.is_primary_address as \"Is Primary Address:Check\", \n\t`tabContact`.first_name as \"First Name\",\n\t`tabContact`.last_name as \"Last Name\",\n\t`tabContact`.phone as \"Phone\",\n\t`tabContact`.mobile_no as \"Mobile No\",\n\t`tabContact`.email_id as \"Email Address\",\n\t`tabContact`.is_primary_contact as \"Is Primary Contact:Check\"\nFROM\n\t`tabCustomer`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.customer=`tabCustomer`.name\n\t)\n\tleft join `tabContact` on (\n\t\t`tabContact`.customer=`tabCustomer`.name\n\t)\nWHERE\n\t`tabCustomer`.docstatus<2\nORDER BY\n\t`tabCustomer`.name asc",
- "ref_doctype": "Customer",
- "report_name": "Customer Addresses And Contacts",
- "report_type": "Query Report"
-}
\ No newline at end of file
diff --git a/erpnext/selling/report/lead_details/lead_details.json b/erpnext/selling/report/lead_details/lead_details.json
index 387b5f8..047b4b7 100644
--- a/erpnext/selling/report/lead_details/lead_details.json
+++ b/erpnext/selling/report/lead_details/lead_details.json
@@ -1,16 +1,18 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-10-22 11:58:16",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "modified": "2015-02-02 11:39:57.231750",
+ "modified": "2017-01-19 15:44:59.742195",
"modified_by": "Administrator",
"module": "Selling",
"name": "Lead Details",
"owner": "Administrator",
- "query": "SELECT\n `tabLead`.name as \"Lead Id:Link/Lead:120\",\n `tabLead`.lead_name as \"Lead Name::120\",\n\t`tabLead`.company_name as \"Company Name::120\",\n\t`tabLead`.status as \"Status::120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2)\n\t) as 'Address::180',\n\t`tabAddress`.state as \"State::100\",\n\t`tabAddress`.pincode as \"Pincode::70\",\n\t`tabAddress`.country as \"Country::100\",\n\t`tabLead`.phone as \"Phone::100\",\n\t`tabLead`.mobile_no as \"Mobile No::100\",\n\t`tabLead`.email_id as \"Email Address::120\",\n\t`tabLead`.lead_owner as \"Lead Owner::120\",\n\t`tabLead`.source as \"Source::120\",\n\t`tabLead`.territory as \"Territory::120\",\n `tabLead`.owner as \"Owner:Link/User:120\"\nFROM\n\t`tabLead`\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.lead=`tabLead`.name\n\t)\nWHERE\n\t`tabLead`.docstatus<2\nORDER BY\n\t`tabLead`.name asc",
+ "query": "SELECT\n `tabLead`.name as \"Lead Id:Link/Lead:120\",\n `tabLead`.lead_name as \"Lead Name::120\",\n\t`tabLead`.company_name as \"Company Name::120\",\n\t`tabLead`.status as \"Status::120\",\n\tconcat_ws(', ', \n\t\ttrim(',' from `tabAddress`.address_line1), \n\t\ttrim(',' from tabAddress.address_line2)\n\t) as 'Address::180',\n\t`tabAddress`.state as \"State::100\",\n\t`tabAddress`.pincode as \"Pincode::70\",\n\t`tabAddress`.country as \"Country::100\",\n\t`tabLead`.phone as \"Phone::100\",\n\t`tabLead`.mobile_no as \"Mobile No::100\",\n\t`tabLead`.email_id as \"Email Id::120\",\n\t`tabLead`.lead_owner as \"Lead Owner::120\",\n\t`tabLead`.source as \"Source::120\",\n\t`tabLead`.territory as \"Territory::120\",\n `tabLead`.owner as \"Owner:Link/User:120\"\nFROM\n\t`tabLead`\n\tleft join `tabDynamic Link` on (\n\t\t`tabDynamic Link`.link_name=`tabLead`.name\n\t)\n\tleft join `tabAddress` on (\n\t\t`tabAddress`.name=`tabDynamic Link`.parent\n\t)\nWHERE\n\t`tabLead`.docstatus<2\nORDER BY\n\t`tabLead`.name asc",
"ref_doctype": "Lead",
"report_name": "Lead Details",
"report_type": "Query Report"
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.json b/erpnext/setup/doctype/authorization_rule/authorization_rule.json
index d696d3b..70047bc 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.json
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Transaction",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Based On",
@@ -82,6 +84,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer or Item",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Customer / Item Name",
@@ -141,6 +145,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -168,6 +173,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Company",
@@ -198,6 +204,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Authorized Value",
@@ -254,6 +262,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -281,6 +290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Applicable To (Role)",
@@ -312,6 +322,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable To (Employee)",
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -369,6 +381,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable To (User)",
@@ -400,6 +413,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable To (Designation)",
@@ -430,6 +444,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -457,6 +472,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Approving Role (above authorized value)",
@@ -487,6 +503,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -514,6 +531,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Approving User (above authorized value)",
@@ -545,7 +563,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:10:52.977860",
+ "modified": "2017-02-20 13:25:52.751381",
"modified_by": "Administrator",
"module": "Setup",
"name": "Authorization Rule",
@@ -561,7 +579,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -577,6 +594,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "transaction,based_on,system_user,system_role,approving_user,approving_role",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/brand/brand.json b/erpnext/setup/doctype/brand/brand.json
index 03433de..8d4ba74 100644
--- a/erpnext/setup/doctype/brand/brand.json
+++ b/erpnext/setup/doctype/brand/brand.json
@@ -15,13 +15,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "brand",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Brand Name",
"length": 0,
"no_copy": 0,
@@ -31,6 +34,7 @@
"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,
@@ -41,13 +45,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -57,6 +64,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,
@@ -76,7 +84,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 05:24:26.450436",
+ "modified": "2017-02-20 13:24:33.616809",
"modified_by": "Administrator",
"module": "Setup",
"name": "Brand",
@@ -186,5 +194,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
+ "sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index f22e63e..0d8b41f 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -4,7 +4,7 @@
frappe.provide("erpnext.company");
frappe.ui.form.on("Company", {
- onload: function(frm) {
+ setup: function(frm) {
erpnext.company.setup_queries(frm);
},
@@ -135,6 +135,7 @@
["default_payable_account", {"account_type": "Payable"}],
["default_expense_account", {"root_type": "Expense"}],
["default_income_account", {"root_type": "Income"}],
+ ["default_payroll_payable_account", {"root_type": "Liability"}],
["round_off_account", {"root_type": "Expense"}],
["write_off_account", {"root_type": "Expense"}],
["exchange_gain_loss_account", {"root_type": "Expense"}],
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index fabbd51..46acbc1 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Abbr",
@@ -111,6 +114,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Change Abbreviation",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Domain",
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Values",
@@ -219,6 +226,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Letter Head",
@@ -248,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Holiday List",
@@ -277,6 +286,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Terms",
@@ -305,6 +315,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Currency",
@@ -333,6 +344,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -360,6 +372,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Country",
@@ -388,6 +401,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Create Chart Of Accounts Based On",
@@ -418,6 +432,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Chart Of Accounts Template",
@@ -448,6 +463,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Existing Company ",
@@ -477,6 +493,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accounts Settings",
@@ -506,6 +523,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Bank Account",
@@ -537,6 +555,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Cash Account",
@@ -566,6 +585,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Receivable Account",
@@ -596,6 +616,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Round Off Account",
@@ -625,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Write Off Account",
@@ -654,6 +676,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Gain / Loss Account",
@@ -683,6 +706,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -712,6 +736,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Payable Account",
@@ -743,6 +768,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Cost of Goods Sold Account",
@@ -772,6 +798,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Income Account",
@@ -794,12 +821,42 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "depends_on": "eval:!doc.__islocal",
+ "fieldname": "default_payroll_payable_account",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 1,
+ "ignore_xss_filter": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Default Payroll Payable Account",
+ "length": 0,
+ "no_copy": 1,
+ "options": "Account",
+ "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": "round_off_cost_center",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Round Off Cost Center",
@@ -829,6 +886,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -857,6 +915,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Cost Center",
@@ -886,6 +945,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Limit",
@@ -916,6 +976,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -943,6 +1004,8 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
+
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days Based On",
@@ -973,6 +1036,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Days",
@@ -1003,6 +1067,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Settings",
@@ -1030,6 +1095,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Received But Not Billed",
@@ -1058,6 +1124,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock Adjustment Account",
@@ -1086,6 +1153,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1113,6 +1181,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expenses Included In Valuation",
@@ -1141,6 +1210,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fixed Asset Depreciation Settings",
@@ -1169,6 +1239,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Accumulated Depreciation Account",
@@ -1198,6 +1269,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Depreciation Expense Account",
@@ -1227,6 +1299,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1254,6 +1327,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Gain/Loss Account on Asset Disposal",
@@ -1283,6 +1357,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Depreciation Cost Center",
@@ -1313,6 +1388,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company Info",
@@ -1340,6 +1416,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -1369,6 +1446,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1397,6 +1475,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Phone No",
@@ -1427,6 +1506,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Fax",
@@ -1457,6 +1537,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Email",
@@ -1487,6 +1568,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website",
@@ -1517,6 +1599,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1547,6 +1630,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Registration Details",
@@ -1576,6 +1660,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delete Company Transactions",
@@ -1606,7 +1691,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-23 16:32:04.893315",
+ "modified": "2017-02-20 13:24:43.849009",
"modified_by": "Administrator",
"module": "Setup",
"name": "Company",
@@ -1622,7 +1707,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1643,7 +1727,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1664,7 +1747,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1685,7 +1767,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1706,7 +1787,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1727,7 +1807,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1748,7 +1827,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -1763,6 +1841,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index 32ad8eb..dd7bca9 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -50,7 +50,7 @@
def validate_default_accounts(self):
for field in ["default_bank_account", "default_cash_account", "default_receivable_account", "default_payable_account",
"default_expense_account", "default_income_account", "stock_received_but_not_billed",
- "stock_adjustment_account", "expenses_included_in_valuation"]:
+ "stock_adjustment_account", "expenses_included_in_valuation", "default_payroll_payable_account"]:
if self.get(field):
for_company = frappe.db.get_value("Account", self.get(field), "company")
if for_company != self.name:
@@ -153,6 +153,8 @@
self.db_set("default_income_account", frappe.db.get_value("Account",
{"account_name": _("Sales"), "company": self.name}))
+ if not self.default_payable_account:
+ self.db_set("default_payable_account", self.default_payable_account)
def _set_default_account(self, fieldname, account_type):
if self.get(fieldname):
diff --git a/erpnext/setup/doctype/company/delete_company_transactions.py b/erpnext/setup/doctype/company/delete_company_transactions.py
index eb5c043..eef8599 100644
--- a/erpnext/setup/doctype/company/delete_company_transactions.py
+++ b/erpnext/setup/doctype/company/delete_company_transactions.py
@@ -73,11 +73,23 @@
def delete_lead_addresses(company_name):
"""Delete addresses to which leads are linked"""
- for lead in frappe.get_all("Lead", filters={"company": company_name}):
- frappe.db.sql("""delete from `tabAddress`
- where lead=%s and (customer='' or customer is null) and (supplier='' or supplier is null)""", lead.name)
+ leads = frappe.get_all("Lead", filters={"company": company_name})
+ leads = [ "'%s'"%row.get("name") for row in leads ]
+ addresses = []
+ if leads:
+ addresses = frappe.db.sql_list("""select parent from `tabDynamic Link` where link_name
+ in ({leads})""".format(leads=",".join(leads)), debug=True)
+ addresses = ["'%s'"%addr for addr in addresses]
- frappe.db.sql("""update `tabAddress` set lead=null, lead_name=null where lead=%s""", lead.name)
+ frappe.db.sql("""delete from tabAddress where name in ({addresses}) and
+ name not in (select distinct dl1.parent from `tabDynamic Link` dl1
+ inner join `tabDynamic Link` dl2 on dl1.parent=dl2.parent
+ and dl1.link_doctype<>dl2.link_doctype)""".format(addresses=",".join(addresses)), debug=True)
+
+ frappe.db.sql("""delete from `tabDynamic Link` where link_doctype='Lead' and parenttype='Address'
+ and link_name in ({leads})""".format(leads=",".join(leads)), debug=True)
+
+ frappe.db.sql("""update tabCustomer set lead_name=NULL where lead_name in ({leads})""".format(leads=",".join(leads)), debug=True)
def delete_communications(doctype, company_name, company_fieldname):
frappe.db.sql("""
diff --git a/erpnext/setup/doctype/company/fixtures/india/__init__.py b/erpnext/setup/doctype/company/fixtures/india/__init__.py
index 0f4bd4f..2cf43c9 100644
--- a/erpnext/setup/doctype/company/fixtures/india/__init__.py
+++ b/erpnext/setup/doctype/company/fixtures/india/__init__.py
@@ -10,7 +10,9 @@
{'doctype': 'Salary Component', 'salary_component': 'Professional Tax', 'description': 'Professional Tax', 'type': 'Deduction'},
{'doctype': 'Salary Component', 'salary_component': 'Provident Fund', 'description': 'Provident fund', 'type': 'Deduction'},
{'doctype': 'Salary Component', 'salary_component': 'House Rent Allowance', 'description': 'House Rent Allowance', 'type': 'Earning'},
- {'doctype': 'Salary Component', 'salary_component': 'Basic', 'description': 'Basic', 'type': 'Earning'}
+ {'doctype': 'Salary Component', 'salary_component': 'Basic', 'description': 'Basic', 'type': 'Earning'},
+ {'doctype': 'Salary Component', 'salary_component': 'Arrear', 'description': 'Arrear', 'type': 'Earning'},
+ {'doctype': 'Salary Component', 'salary_component': 'Leave Encashment', 'description': 'Leave Encashment', 'type': 'Earning'}
]
for d in docs:
diff --git a/erpnext/setup/doctype/customer_group/customer_group.json b/erpnext/setup/doctype/customer_group/customer_group.json
index dc595ac..316f11b 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.json
+++ b/erpnext/setup/doctype/customer_group/customer_group.json
@@ -15,13 +15,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "customer_group_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Customer Group Name",
"length": 0,
"no_copy": 1,
@@ -31,6 +34,7 @@
"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,
@@ -41,6 +45,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "parent_customer_group",
"fieldtype": "Link",
@@ -48,7 +53,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Parent Customer Group",
"length": 0,
"no_copy": 0,
@@ -59,6 +66,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,
@@ -69,6 +77,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"description": "Only leaf nodes are allowed in transaction",
"fieldname": "is_group",
"fieldtype": "Check",
@@ -76,7 +85,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Is Group",
"length": 0,
"no_copy": 0,
@@ -87,6 +98,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,
@@ -97,19 +109,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "cb0",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -120,13 +136,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "default_price_list",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Price List",
"length": 0,
"no_copy": 0,
@@ -135,6 +154,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,
@@ -145,13 +165,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "credit_days_based_on",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit Days Based On",
"length": 0,
"no_copy": 0,
@@ -161,6 +184,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,
@@ -171,6 +195,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.credit_days_based_on=='Fixed Days'",
"fieldname": "credit_days",
"fieldtype": "Int",
@@ -178,7 +203,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit Days",
"length": 0,
"no_copy": 0,
@@ -186,6 +213,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,
@@ -196,13 +224,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "credit_limit",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit Limit",
"length": 0,
"no_copy": 0,
@@ -210,6 +241,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,
@@ -220,13 +252,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "lft",
"length": 0,
"no_copy": 1,
@@ -236,6 +271,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 1,
@@ -246,13 +282,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "rgt",
"length": 0,
"no_copy": 1,
@@ -262,6 +301,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 1,
@@ -272,6 +312,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "old_parent",
"fieldtype": "Link",
@@ -279,7 +320,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "old_parent",
"length": 0,
"no_copy": 1,
@@ -290,6 +333,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -300,13 +344,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "default_receivable_account",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Receivable Account",
"length": 0,
"no_copy": 0,
@@ -314,6 +361,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,
@@ -324,6 +372,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:!doc.__islocal",
"description": "Mention if non-standard receivable account applicable",
"fieldname": "accounts",
@@ -332,7 +381,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Accounts",
"length": 0,
"no_copy": 0,
@@ -341,6 +392,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,
@@ -359,7 +411,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 05:16:17.676700",
+ "modified": "2017-02-20 13:25:31.549874",
"modified_by": "Administrator",
"module": "Setup",
"name": "Customer Group",
@@ -490,6 +542,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_customer_group",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json
index 45740bc..6230706 100644
--- a/erpnext/setup/doctype/item_group/item_group.json
+++ b/erpnext/setup/doctype/item_group/item_group.json
@@ -16,13 +16,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "gs",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "General Settings",
"length": 0,
"no_copy": 0,
@@ -30,6 +33,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,
@@ -40,13 +44,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_group_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Group Name",
"length": 0,
"no_copy": 0,
@@ -56,6 +63,7 @@
"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,
@@ -66,6 +74,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "parent_item_group",
"fieldtype": "Link",
@@ -73,7 +82,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Parent Item Group",
"length": 0,
"no_copy": 0,
@@ -84,6 +95,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,
@@ -94,6 +106,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"description": "Only leaf nodes are allowed in transaction",
"fieldname": "is_group",
"fieldtype": "Check",
@@ -101,7 +114,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Is Group",
"length": 0,
"no_copy": 0,
@@ -112,6 +127,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,
@@ -122,19 +138,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_5",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -145,13 +165,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "default_income_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Income Account",
"length": 0,
"no_copy": 0,
@@ -160,6 +183,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,
@@ -170,13 +194,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "default_expense_account",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Expense Account",
"length": 0,
"no_copy": 0,
@@ -185,6 +212,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,
@@ -195,13 +223,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "default_cost_center",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Cost Center",
"length": 0,
"no_copy": 0,
@@ -210,6 +241,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,
@@ -220,13 +252,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "sb9",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Website Settings",
"length": 0,
"no_copy": 0,
@@ -234,6 +269,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,
@@ -244,6 +280,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Check this if you want to show in website",
"fieldname": "show_in_website",
"fieldtype": "Check",
@@ -251,7 +288,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Show in Website",
"length": 0,
"no_copy": 0,
@@ -259,6 +298,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,
@@ -269,6 +309,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "show_in_website",
"fieldname": "route",
"fieldtype": "Data",
@@ -276,7 +317,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Route",
"length": 0,
"no_copy": 0,
@@ -285,6 +328,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,
@@ -295,6 +339,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "show_in_website",
"description": "Show this slideshow at the top of the page",
"fieldname": "slideshow",
@@ -303,7 +348,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Slideshow",
"length": 0,
"no_copy": 0,
@@ -312,6 +359,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,
@@ -322,6 +370,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "show_in_website",
"description": "HTML / Banner that will show on the top of product list.",
"fieldname": "description",
@@ -330,7 +379,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -338,6 +389,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,
@@ -348,6 +400,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "show_in_website",
"fieldname": "website_specifications",
"fieldtype": "Table",
@@ -355,7 +408,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Website Specifications",
"length": 0,
"no_copy": 0,
@@ -364,6 +419,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,
@@ -374,13 +430,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "lft",
"length": 0,
"no_copy": 1,
@@ -390,6 +449,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -400,13 +460,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "rgt",
"length": 0,
"no_copy": 1,
@@ -416,6 +479,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -426,6 +490,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "old_parent",
"fieldtype": "Link",
@@ -433,7 +498,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "old_parent",
"length": 0,
"no_copy": 1,
@@ -444,6 +511,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -462,7 +530,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 3,
- "modified": "2016-07-25 05:20:09.760558",
+ "modified": "2017-02-20 13:24:59.364873",
"modified_by": "Administrator",
"module": "Setup",
"name": "Item Group",
@@ -594,6 +662,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_item_group",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/topic/__init__.py b/erpnext/setup/doctype/party_type/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/topic/__init__.py
copy to erpnext/setup/doctype/party_type/__init__.py
diff --git a/erpnext/setup/doctype/party_type/party_type.js b/erpnext/setup/doctype/party_type/party_type.js
new file mode 100644
index 0000000..7a96dc5
--- /dev/null
+++ b/erpnext/setup/doctype/party_type/party_type.js
@@ -0,0 +1,15 @@
+// Copyright (c) 2016, Frappe Technologies and contributors
+// For license information, please see license.txt
+
+frappe.ui.form.on('Party Type', {
+ setup: function(frm) {
+ frm.fields_dict["party_type"].get_query = function(frm) {
+ return {
+ filters: {
+ "istable": 0,
+ "is_submittable": 0
+ }
+ }
+ }
+ }
+});
diff --git a/erpnext/setup/doctype/party_type/party_type.json b/erpnext/setup/doctype/party_type/party_type.json
new file mode 100644
index 0000000..ee4b8ea
--- /dev/null
+++ b/erpnext/setup/doctype/party_type/party_type.json
@@ -0,0 +1,132 @@
+{
+ "allow_copy": 0,
+ "allow_import": 0,
+ "allow_rename": 0,
+ "autoname": "field:party_type",
+ "beta": 0,
+ "creation": "2016-12-26 11:26:51.508286",
+ "custom": 0,
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "",
+ "editable_grid": 1,
+ "engine": "InnoDB",
+ "fields": [
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "party_type",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Party Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "DocType",
+ "permlevel": 0,
+ "precision": "",
+ "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
+ }
+ ],
+ "hide_heading": 0,
+ "hide_toolbar": 0,
+ "idx": 0,
+ "image_view": 0,
+ "in_create": 0,
+ "in_dialog": 0,
+ "is_submittable": 0,
+ "issingle": 0,
+ "istable": 0,
+ "max_attachments": 0,
+ "modified": "2017-02-20 13:25:04.456818",
+ "modified_by": "Administrator",
+ "module": "Setup",
+ "name": "Party Type",
+ "name_case": "",
+ "owner": "Administrator",
+ "permissions": [
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "System Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts User",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ },
+ {
+ "amend": 0,
+ "apply_user_permissions": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "export": 1,
+ "if_owner": 0,
+ "import": 0,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Accounts Manager",
+ "set_user_permissions": 0,
+ "share": 1,
+ "submit": 0,
+ "write": 1
+ }
+ ],
+ "quick_entry": 1,
+ "read_only": 0,
+ "read_only_onload": 0,
+ "show_name_in_global_search": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "track_changes": 1,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/party_type/party_type.py b/erpnext/setup/doctype/party_type/party_type.py
new file mode 100644
index 0000000..74db037
--- /dev/null
+++ b/erpnext/setup/doctype/party_type/party_type.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2015, Frappe Technologies and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.model.document import Document
+
+class PartyType(Document):
+ pass
+
+@frappe.whitelist()
+def get_party_type(doctype, txt, searchfield, start, page_len, filters):
+ return frappe.db.sql("""select name from `tabParty Type`
+ where `{key}` LIKE %(txt)s
+ order by name limit %(start)s, %(page_len)s"""
+ .format(key=searchfield), {
+ 'txt': "%%%s%%" % frappe.db.escape(txt),
+ 'start': start, 'page_len': page_len
+ })
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/setup/doctype/party_type/test_party_type.py
similarity index 62%
copy from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
copy to erpnext/setup/doctype/party_type/test_party_type.py
index 0182db6..079fe2f 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/setup/doctype/party_type/test_party_type.py
@@ -6,7 +6,7 @@
import frappe
import unittest
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Party Type')
-class TestEvaluationCriteria(unittest.TestCase):
+class TestPartyType(unittest.TestCase):
pass
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index 1bfba98..84cf749 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -6,12 +6,12 @@
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Sales Person'}
if(frm.doc.__islocal){
- hide_field(['address_html', 'contact_html']);
- erpnext.utils.clear_address_and_contact(frm);
+ hide_field(['address_html', 'contact_html', 'address_contacts']);
+ frappe.geo.clear_address_and_contact(frm);
}
else{
- unhide_field(['address_html', 'contact_html']);
- erpnext.utils.render_address_and_contact(frm);
+ unhide_field(['address_html', 'contact_html', 'address_contacts']);
+ frappe.geo.render_address_and_contact(frm);
}
}
});
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.json b/erpnext/setup/doctype/sales_partner/sales_partner.json
index 760954c..6c2d705 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.json
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.json
@@ -23,7 +23,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner Name",
@@ -52,7 +53,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Partner Type",
@@ -84,6 +86,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Territory",
@@ -112,6 +115,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -140,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission Rate",
@@ -169,6 +174,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address & Contacts",
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address Desc",
@@ -224,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address HTML",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -278,6 +287,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Desc",
@@ -305,6 +315,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact HTML",
@@ -332,6 +343,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner Target",
@@ -360,6 +372,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Targets",
@@ -391,6 +404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Target Distribution",
@@ -421,6 +435,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website",
@@ -448,6 +463,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Show In Website",
@@ -476,6 +492,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -502,6 +519,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Route",
@@ -530,6 +548,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -556,6 +575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Logo",
@@ -584,6 +604,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Partner website",
@@ -612,6 +633,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -638,6 +660,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Introduction",
@@ -665,6 +688,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -693,7 +717,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:29:37.597903",
+ "modified": "2017-02-20 13:25:19.554124",
"modified_by": "Administrator",
"module": "Setup",
"name": "Sales Partner",
@@ -709,7 +733,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -730,7 +753,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -751,7 +773,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -766,6 +787,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py
index 5a2aa49..96211af 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.py
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.py
@@ -5,7 +5,7 @@
import frappe
from frappe.utils import cstr, filter_strip_join
from frappe.website.website_generator import WebsiteGenerator
-from erpnext.utilities.address_and_contact import load_address_and_contact
+from frappe.geo.address_and_contact import load_address_and_contact
class SalesPartner(WebsiteGenerator):
website = frappe._dict(
@@ -28,15 +28,6 @@
if self.partner_website and not self.partner_website.startswith("http"):
self.partner_website = "http://" + self.partner_website
- def get_contacts(self, nm):
- if nm:
- return frappe.db.convert_to_lists(frappe.db.sql("""
- select name, CONCAT(IFNULL(first_name,''),
- ' ',IFNULL(last_name,'')),contact_no,email_id
- from `tabContact` where sales_partner = %s""", nm))
- else:
- return ''
-
def get_context(self, context):
address = frappe.db.get_value("Address",
{"sales_partner": self.name, "is_primary_address": 1},
diff --git a/erpnext/setup/doctype/sales_person/sales_person.json b/erpnext/setup/doctype/sales_person/sales_person.json
index 595552e..9f46501 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.json
+++ b/erpnext/setup/doctype/sales_person/sales_person.json
@@ -24,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Name and Employee ID",
@@ -51,7 +52,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Sales Person Name",
@@ -82,6 +84,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Parent Sales Person",
@@ -112,6 +115,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Is Group",
@@ -142,6 +146,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -168,6 +173,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Employee",
@@ -197,6 +203,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Enabled",
@@ -224,7 +231,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "lft",
@@ -253,7 +261,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "rgt",
@@ -283,6 +292,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "old_parent",
@@ -313,6 +323,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Person Targets",
@@ -342,6 +353,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Targets",
@@ -373,6 +385,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Target Distribution",
@@ -404,7 +417,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-12 18:47:13.924225",
+ "modified": "2017-02-20 13:25:12.583516",
"modified_by": "Administrator",
"module": "Setup",
"name": "Sales Person",
@@ -420,7 +433,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -441,7 +453,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -462,7 +473,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -478,6 +488,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_sales_person",
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.json b/erpnext/setup/doctype/supplier_type/supplier_type.json
index 5e62099..9b40e0f 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.json
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.json
@@ -3,22 +3,28 @@
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:supplier_type",
+ "beta": 0,
"creation": "2013-01-10 16:34:24",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_type",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Supplier Type",
"length": 0,
"no_copy": 0,
@@ -28,6 +34,7 @@
"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,
@@ -38,12 +45,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "section_credit_limit",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit Limit",
"length": 0,
"no_copy": 0,
@@ -52,6 +63,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,
@@ -62,12 +74,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "credit_days_based_on",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit Days Based On",
"length": 0,
"no_copy": 0,
@@ -76,6 +92,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,
@@ -86,13 +103,17 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:doc.credit_days_based_on=='Fixed Days'",
"fieldname": "credit_days",
"fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Credit Days",
"length": 0,
"no_copy": 0,
@@ -101,6 +122,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,
@@ -111,12 +133,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "default_payable_account",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Default Payable Account",
"length": 0,
"no_copy": 0,
@@ -124,6 +150,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,
@@ -134,14 +161,18 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"depends_on": "eval:!doc.__islocal",
"description": "Mention if non-standard receivable account applicable",
"fieldname": "accounts",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Accounts",
"length": 0,
"no_copy": 0,
@@ -150,6 +181,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,
@@ -161,13 +193,14 @@
"hide_toolbar": 0,
"icon": "fa fa-flag",
"idx": 1,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-01-25 02:09:49.846022",
+ "modified": "2017-02-20 13:25:25.641431",
"modified_by": "Administrator",
"module": "Setup",
"name": "Supplier Type",
@@ -294,7 +327,11 @@
"write": 0
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
- "sort_order": "ASC"
+ "show_name_in_global_search": 1,
+ "sort_order": "ASC",
+ "track_changes": 0,
+ "track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
index bede595..824b8e2 100644
--- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
+++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json
@@ -22,7 +22,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Disabled",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions Help",
@@ -139,7 +143,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-12 17:31:53.349301",
+ "modified": "2017-02-20 13:26:07.730118",
"modified_by": "Administrator",
"module": "Setup",
"name": "Terms and Conditions",
@@ -155,7 +159,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -176,7 +179,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -197,7 +199,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -218,7 +219,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -239,7 +239,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -260,7 +259,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -275,6 +273,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/territory/territory.json b/erpnext/setup/doctype/territory/territory.json
index e920c9d..030f936 100644
--- a/erpnext/setup/doctype/territory/territory.json
+++ b/erpnext/setup/doctype/territory/territory.json
@@ -16,13 +16,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "territory_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Territory Name",
"length": 0,
"no_copy": 1,
@@ -32,6 +35,7 @@
"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,
@@ -42,6 +46,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "parent_territory",
"fieldtype": "Link",
@@ -49,7 +54,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Parent Territory",
"length": 0,
"no_copy": 0,
@@ -60,6 +67,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,
@@ -70,6 +78,7 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
+ "columns": 0,
"description": "Only leaf nodes are allowed in transaction",
"fieldname": "is_group",
"fieldtype": "Check",
@@ -77,7 +86,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Is Group",
"length": 0,
"no_copy": 0,
@@ -88,6 +99,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,
@@ -98,19 +110,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "cb0",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -121,14 +137,17 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "For reference",
"fieldname": "territory_manager",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Territory Manager",
"length": 0,
"no_copy": 0,
@@ -139,6 +158,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": 1,
@@ -149,13 +169,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "lft",
"length": 0,
"no_copy": 1,
@@ -165,6 +188,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -175,13 +199,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "rgt",
"length": 0,
"no_copy": 1,
@@ -191,6 +218,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 1,
@@ -201,6 +229,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "",
"fieldname": "old_parent",
"fieldtype": "Link",
@@ -208,7 +237,9 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "old_parent",
"length": 0,
"no_copy": 1,
@@ -219,6 +250,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -229,6 +261,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Set Item Group-wise budgets on this Territory. You can also include seasonality by setting the Distribution.",
"fieldname": "target_details_section_break",
"fieldtype": "Section Break",
@@ -236,7 +269,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Territory Targets",
"length": 0,
"no_copy": 0,
@@ -245,6 +280,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,
@@ -255,13 +291,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "targets",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Targets",
"length": 0,
"no_copy": 0,
@@ -272,6 +311,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,
@@ -282,6 +322,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Select Monthly Distribution to unevenly distribute targets across months.",
"fieldname": "distribution_id",
"fieldtype": "Link",
@@ -289,7 +330,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Target Distribution",
"length": 0,
"no_copy": 0,
@@ -300,6 +343,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,
@@ -318,7 +362,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 05:18:18.629953",
+ "modified": "2017-02-20 13:24:53.794688",
"modified_by": "Administrator",
"module": "Setup",
"name": "Territory",
@@ -430,6 +474,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "parent_territory,territory_manager",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/uom/uom.json b/erpnext/setup/doctype/uom/uom.json
index 609c6c0..e752d0f 100644
--- a/erpnext/setup/doctype/uom/uom.json
+++ b/erpnext/setup/doctype/uom/uom.json
@@ -22,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM Name",
"length": 0,
"no_copy": 0,
@@ -32,6 +34,7 @@
"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,
@@ -50,7 +53,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Must be Whole Number",
"length": 0,
"no_copy": 0,
@@ -58,6 +63,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,
@@ -76,7 +82,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-09-23 17:58:21.574996",
+ "modified": "2017-02-20 13:24:25.456634",
"modified_by": "Administrator",
"module": "Setup",
"name": "UOM",
@@ -146,6 +152,8 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/setup/setup_wizard/install_fixtures.py b/erpnext/setup/setup_wizard/install_fixtures.py
index 1589b3b..e6b4208 100644
--- a/erpnext/setup/setup_wizard/install_fixtures.py
+++ b/erpnext/setup/setup_wizard/install_fixtures.py
@@ -33,6 +33,9 @@
# salary component
{'doctype': 'Salary Component', 'salary_component': _('Income Tax'), 'description': _('Income Tax'), 'type': 'Deduction'},
{'doctype': 'Salary Component', 'salary_component': _('Basic'), 'description': _('Basic'), 'type': 'Earning'},
+ {'doctype': 'Salary Component', 'salary_component': _('Arrear'), 'description': _('Arrear'), 'type': 'Earning'},
+ {'doctype': 'Salary Component', 'salary_component': _('Leave Encashment'), 'description': _('Leave Encashment'), 'type': 'Earning'},
+
# expense claim type
{'doctype': 'Expense Claim Type', 'name': _('Calls'), 'expense_type': _('Calls')},
@@ -171,6 +174,10 @@
{'doctype': "Email Account", "email_id": "support@example.com", "append_to": "Issue"},
{'doctype': "Email Account", "email_id": "jobs@example.com", "append_to": "Job Applicant"},
+ {'doctype': "Party Type", "party_type": "Customer"},
+ {'doctype': "Party Type", "party_type": "Supplier"},
+ {'doctype': "Party Type", "party_type": "Employee"},
+
{"doctype": "Offer Term", "offer_term": _("Date of Joining")},
{"doctype": "Offer Term", "offer_term": _("Annual Salary")},
{"doctype": "Offer Term", "offer_term": _("Probationary Period")},
diff --git a/erpnext/setup/setup_wizard/test_setup_data.py b/erpnext/setup/setup_wizard/test_setup_data.py
index de54a1d..25378f4 100644
--- a/erpnext/setup/setup_wizard/test_setup_data.py
+++ b/erpnext/setup/setup_wizard/test_setup_data.py
@@ -13,7 +13,7 @@
"customer_2": "Mahesh Engg",
"customer_contact_1": "Aditya Duggal",
"customer_contact_2": "Mahesh Malani",
-"first_name": "Rushabh",
+"full_name": "Rushabh Mehta",
"fy_start": "1st Apr",
"item_1": "Enterprise Plan",
"item_2": "Small Business",
@@ -42,7 +42,6 @@
"item_uom_3": "Unit",
"item_uom_4": "Unit",
"item_uom_5": "Unit",
-"last_name": "Mehta",
"supplier_1": "Google",
"supplier_2": "Hetzner",
"supplier_3": "Digital Ocean",
diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py
index 0c214e4..cb63837 100644
--- a/erpnext/setup/utils.py
+++ b/erpnext/setup/utils.py
@@ -6,7 +6,7 @@
from frappe import _, throw
from frappe.utils import flt
from frappe.utils import get_datetime_str, nowdate
-
+
def get_company_currency(company):
currency = frappe.db.get_value("Company", company, "default_currency", cache=True)
if not currency:
@@ -37,8 +37,7 @@
if not frappe.get_list("Company"):
setup_complete({
"currency" :"USD",
- "first_name" :"Test",
- "last_name" :"User",
+ "full_name" :"Test User",
"company_name" :"Wind Power LLC",
"timezone" :"America/New_York",
"company_abbr" :"WP",
@@ -52,7 +51,7 @@
"password" :"test",
"chart_of_accounts" : "Standard",
"domain" : "Manufacturing",
-
+
})
frappe.db.sql("delete from `tabLeave Allocation`")
@@ -71,18 +70,18 @@
if not (from_currency and to_currency):
# manqala 19/09/2016: Should this be an empty return or should it throw and exception?
return
-
+
if from_currency == to_currency:
return 1
-
+
# cksgb 19/09/2016: get last entry in Currency Exchange with from_currency and to_currency.
- entries = frappe.get_all("Currency Exchange", fields = ["exchange_rate"],
+ entries = frappe.get_all("Currency Exchange", fields = ["exchange_rate"],
filters=[
- ["date", "<=", get_datetime_str(transaction_date)],
- ["from_currency", "=", from_currency],
+ ["date", "<=", get_datetime_str(transaction_date)],
+ ["from_currency", "=", from_currency],
["to_currency", "=", to_currency]
], order_by="date desc", limit=1)
-
+
if entries:
return flt(entries[0].exchange_rate)
diff --git a/erpnext/startup/notifications.py b/erpnext/startup/notifications.py
index a1b90f9..554243f 100644
--- a/erpnext/startup/notifications.py
+++ b/erpnext/startup/notifications.py
@@ -11,8 +11,6 @@
"Task": {"status": "Overdue"},
"Project": {"status": "Open"},
"Item": {"total_projected_qty": ("<", 0)},
- "Customer": {"status": "Open"},
- "Supplier": {"status": "Open"},
"Lead": {"status": "Open"},
"Contact": {"status": "Open"},
"Opportunity": {"status": "Open"},
@@ -23,11 +21,11 @@
},
"Journal Entry": {"docstatus": 0},
"Sales Invoice": {
- "outstanding_amount": (">", 0),
- "docstatus": ("<", 2)
+ "outstanding_amount": (">", 0),
+ "docstatus": ("<", 2)
},
"Purchase Invoice": {
- "outstanding_amount": (">", 0),
+ "outstanding_amount": (">", 0),
"docstatus": ("<", 2)
},
"Payment Entry": {"docstatus": 0},
diff --git a/erpnext/startup/report_data_map.py b/erpnext/startup/report_data_map.py
index 4dc326e..6cdd889 100644
--- a/erpnext/startup/report_data_map.py
+++ b/erpnext/startup/report_data_map.py
@@ -269,7 +269,7 @@
},
"Purchase Receipt": {
"columns": ["name", "supplier", "posting_date", "company"],
- "conditions": ["docstatus=1"],
+ "conditions": ["docstatus=1"],
"order_by": "posting_date",
"links": {
"supplier": ["Supplier", "name"],
@@ -278,7 +278,7 @@
},
"Purchase Receipt Item[Purchase Analytics]": {
"columns": ["name", "parent", "item_code", "qty", "base_net_amount"],
- "conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
+ "conditions": ["docstatus=1", "ifnull(parent, '')!=''"],
"order_by": "parent",
"links": {
"parent": ["Purchase Receipt", "name"],
@@ -290,6 +290,12 @@
"columns": ["name","status","creation","resolution_date","first_responded_on"],
"conditions": ["docstatus < 2"],
"order_by": "creation"
- }
+ },
+ # Manufacturing
+ "Production Order": {
+ "columns": ["name","status","creation","planned_start_date","planned_end_date","status","actual_start_date","actual_end_date", "modified"],
+ "conditions": ["docstatus = 1"],
+ "order_by": "creation"
+ }
}
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 8f87198..23806d4 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -13,14 +13,7 @@
return (doc.docstatus==1 || doc.qty<=doc.actual_qty) ? "green" : "orange"
})
- frm.set_query("warehouse", "items", function() {
- return {
- filters: [
- ["Warehouse", "company", "in", ["", cstr(frm.doc.company)]],
- ["Warehouse", "is_group", "=", 0]
- ]
- }
- })
+ erpnext.queries.setup_warehouse_query(frm);
}
});
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json
index 6be4ad8..e0deb1b 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.json
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery To",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -137,7 +141,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -169,6 +174,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -196,6 +202,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -223,6 +230,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -255,7 +263,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -288,7 +297,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -320,6 +330,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Purchase Order No",
@@ -352,6 +363,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Purchase Order Date",
@@ -383,6 +395,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Return",
@@ -412,6 +425,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Return Against Delivery Note",
@@ -442,6 +456,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -470,6 +485,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -498,6 +514,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -524,7 +541,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -553,6 +571,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -580,6 +599,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -607,6 +627,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -635,6 +656,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -663,7 +685,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Address Name",
@@ -692,6 +715,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billing Address",
@@ -719,7 +743,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -748,7 +773,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -777,6 +803,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -805,6 +832,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -836,6 +864,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -866,6 +895,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -892,6 +922,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -922,6 +953,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -951,6 +983,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -979,6 +1012,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -1006,6 +1040,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1035,6 +1070,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -1066,6 +1102,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Packing List",
@@ -1095,6 +1132,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Packed Items",
@@ -1125,6 +1163,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Product Bundle Help",
@@ -1152,6 +1191,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1178,6 +1218,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1207,6 +1248,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1239,6 +1281,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1265,6 +1308,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1294,6 +1338,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1322,6 +1367,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1352,6 +1398,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1382,6 +1429,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1408,6 +1456,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Rule",
@@ -1437,6 +1486,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1463,6 +1513,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Taxes and Charges",
@@ -1493,6 +1544,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1521,6 +1573,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1547,6 +1600,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1579,6 +1633,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1606,6 +1661,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1635,6 +1691,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1664,6 +1721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1693,6 +1751,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1722,6 +1781,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1748,6 +1808,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1776,6 +1837,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1804,6 +1866,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1833,6 +1896,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1865,6 +1929,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -1898,6 +1963,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1929,6 +1995,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1956,6 +2023,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -1988,6 +2056,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total",
@@ -2021,6 +2090,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -2053,6 +2123,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -2082,6 +2153,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -2112,6 +2184,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions Details",
@@ -2142,6 +2215,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transporter Info",
@@ -2170,6 +2244,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transporter Name",
@@ -2201,6 +2276,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2230,6 +2306,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Vehicle No",
@@ -2263,6 +2340,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Vehicle Dispatch Date",
@@ -2294,6 +2372,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -2323,7 +2402,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -2355,6 +2435,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Campaign",
@@ -2385,6 +2466,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Source",
@@ -2415,6 +2497,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2445,6 +2528,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Time",
@@ -2476,6 +2560,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Amount Billed",
@@ -2504,6 +2589,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Details",
@@ -2532,6 +2618,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -2562,6 +2649,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -2592,6 +2680,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -2620,6 +2709,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2647,6 +2737,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Without Amount",
@@ -2676,6 +2767,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Status",
@@ -2703,7 +2795,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -2737,7 +2830,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "% Installed",
@@ -2767,6 +2861,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Installation Status",
@@ -2794,6 +2889,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2821,6 +2917,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "To Warehouse",
@@ -2851,6 +2948,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Excise Page Number",
@@ -2880,6 +2978,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructions",
@@ -2910,6 +3009,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission",
@@ -2939,6 +3039,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Partner",
@@ -2971,6 +3072,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2999,6 +3101,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Commission Rate (%)",
@@ -3030,6 +3133,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Commission",
@@ -3061,6 +3165,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team",
@@ -3088,6 +3193,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Team1",
@@ -3120,7 +3226,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2017-01-06 12:52:48.960308",
+ "modified": "2017-02-20 13:29:16.788934",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",
@@ -3136,7 +3242,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3157,7 +3262,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3178,7 +3282,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -3199,7 +3302,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -3220,7 +3322,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -3236,9 +3337,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status,customer,customer_name, territory,base_grand_total",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index e1ac06e..679e31d 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Barcode",
@@ -49,7 +50,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Code",
@@ -82,6 +84,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Name",
@@ -113,6 +116,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer's Item Code",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -194,6 +200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -225,6 +232,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -309,6 +319,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity and Rate",
@@ -336,6 +347,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Quantity",
@@ -367,6 +379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -399,6 +412,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -425,6 +439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "UOM",
@@ -457,6 +472,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -489,6 +505,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount and Margin",
@@ -518,6 +535,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -549,6 +567,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -577,6 +596,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Type",
@@ -607,6 +627,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Margin Rate or Amount",
@@ -636,6 +657,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Margin",
@@ -664,6 +686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -690,6 +713,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate",
@@ -722,6 +746,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -754,6 +779,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -780,6 +806,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -812,6 +839,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -844,6 +872,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -872,6 +901,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -899,6 +929,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -928,6 +959,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -957,6 +989,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -984,6 +1017,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -1013,6 +1047,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -1042,6 +1077,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse and Reference",
@@ -1069,6 +1105,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "From Warehouse",
@@ -1103,6 +1140,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Warehouse (Optional)",
@@ -1133,6 +1171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1162,6 +1201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1188,7 +1228,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1218,6 +1259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1248,6 +1290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Available Qty at From Warehouse",
@@ -1280,6 +1323,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Available Batch Qty at From Warehouse",
@@ -1311,6 +1355,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1341,6 +1386,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand Name",
@@ -1373,6 +1419,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1402,6 +1449,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1428,6 +1476,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense Account",
@@ -1458,6 +1507,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1477,6 +1527,35 @@
"width": "120px"
},
{
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "is_sample_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Sample Item",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
@@ -1487,6 +1566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Sales Order",
@@ -1515,6 +1595,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Sales Invoice",
@@ -1542,7 +1623,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Sales Order Item",
@@ -1573,7 +1655,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Against Sales Invoice Item",
@@ -1602,6 +1685,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Installed Qty",
@@ -1633,6 +1717,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billed Amt",
@@ -1662,6 +1747,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1691,7 +1777,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-12-24 12:33:37.728117",
+ "modified": "2017-02-20 13:30:37.815725",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note Item",
@@ -1700,7 +1786,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 03c23d2..439c729 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -4,6 +4,13 @@
frappe.provide("erpnext.item");
frappe.ui.form.on("Item", {
+ setup: function(frm) {
+ frm.add_fetch('attribute', 'numeric_values', 'numeric_values');
+ frm.add_fetch('attribute', 'from_range', 'from_range');
+ frm.add_fetch('attribute', 'to_range', 'to_range');
+ frm.add_fetch('attribute', 'increment', 'increment');
+ frm.add_fetch('tax_type', 'tax_rate', 'tax_rate');
+ },
onload: function(frm) {
erpnext.item.setup_queries(frm);
if (frm.doc.variant_of){
@@ -16,7 +23,6 @@
},
refresh: function(frm) {
-
if(frm.doc.is_stock_item) {
frm.add_custom_button(__("Balance"), function() {
frappe.route_options = {
@@ -54,9 +60,9 @@
}, __("View"));
frm.add_custom_button(__("Variant"), function() {
- erpnext.item.make_variant()
+ erpnext.item.make_variant(frm);
}, __("Make"));
- cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ frm.page.set_inner_btn_group_as_primary(__("Make"));
}
if (frm.doc.variant_of) {
frm.set_intro(__("This Item is a Variant of {0} (Template). Attributes will be copied over from the template unless 'No Copy' is set", [frm.doc.variant_of]), true);
@@ -79,6 +85,17 @@
frm.toggle_enable("is_fixed_asset", (frm.doc.__islocal || (!frm.doc.is_stock_item &&
((frm.doc.__onload && frm.doc.__onload.asset_exists) ? false : true))));
+
+ frm.add_custom_button(__('Duplicate'), function() {
+ var new_item = frappe.model.copy_doc(frm.doc);
+ if(new_item.item_name===new_item.item_code) {
+ new_item.item_name = null;
+ }
+ if(new_item.description===new_item.description) {
+ new_item.description = null;
+ }
+ frappe.set_route('Form', 'Item', new_item.name);
+ });
},
validate: function(frm){
@@ -218,7 +235,8 @@
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
@@ -240,12 +258,12 @@
}
},
- make_variant: function(doc) {
+ make_variant: function(frm) {
var fields = []
- for(var i=0;i< cur_frm.doc.attributes.length;i++){
+ for(var i=0;i< frm.doc.attributes.length;i++){
var fieldtype, desc;
- var row = cur_frm.doc.attributes[i];
+ var row = frm.doc.attributes[i];
if (row.numeric_values){
fieldtype = "Float";
desc = "Min Value: "+ row.from_range +" , Max Value: "+ row.to_range +", in Increments of: "+ row.increment
@@ -274,7 +292,7 @@
frappe.call({
method:"erpnext.controllers.item_variant.get_variant",
args: {
- "template": cur_frm.doc.name,
+ "template": frm.doc.name,
"args": d.get_values()
},
callback: function(r) {
@@ -296,7 +314,7 @@
frappe.call({
method:"erpnext.controllers.item_variant.create_variant",
args: {
- "item": cur_frm.doc.name,
+ "item": frm.doc.name,
"args": d.get_values()
},
callback: function(r) {
@@ -363,10 +381,3 @@
frm.fields_dict.attributes.grid.toggle_enable("attribute_value", !frm.doc.variant_of);
}
});
-
-
-cur_frm.add_fetch('attribute', 'numeric_values', 'numeric_values');
-cur_frm.add_fetch('attribute', 'from_range', 'from_range');
-cur_frm.add_fetch('attribute', 'to_range', 'to_range');
-cur_frm.add_fetch('attribute', 'increment', 'increment');
-cur_frm.add_fetch('tax_type', 'tax_rate', 'tax_rate');
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 316d35b..4a5094e 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -25,6 +25,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -54,6 +55,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -83,11 +85,12 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Code",
"length": 0,
- "no_copy": 1,
+ "no_copy": 0,
"oldfieldname": "item_code",
"oldfieldtype": "Data",
"permlevel": 0,
@@ -114,6 +117,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Variant Of",
@@ -134,7 +138,7 @@
},
{
"allow_on_submit": 0,
- "bold": 0,
+ "bold": 1,
"collapsible": 0,
"columns": 0,
"fieldname": "item_name",
@@ -142,7 +146,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -156,7 +161,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 1,
"set_only_once": 0,
"unique": 0
@@ -172,6 +177,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Barcode",
@@ -199,7 +205,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Group",
@@ -231,6 +238,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Unit of Measure",
@@ -261,6 +269,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -287,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
@@ -317,6 +327,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maintain Stock",
@@ -348,6 +359,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opening Stock",
@@ -377,6 +389,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valuation Rate",
@@ -405,6 +418,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Standard Selling Rate",
@@ -433,6 +447,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Fixed Asset",
@@ -462,6 +477,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Asset Category",
@@ -491,6 +507,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -520,6 +537,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -548,6 +566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -578,6 +597,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -609,6 +629,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Inventory",
@@ -640,6 +661,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Warehouse",
@@ -672,6 +694,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "End of Life",
@@ -703,6 +726,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Has Batch No",
@@ -735,7 +759,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Has Serial No",
@@ -768,6 +793,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial Number Series",
@@ -796,6 +822,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Material Request Type",
@@ -826,6 +853,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -856,6 +884,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Allow over delivery or receipt upto this percent",
@@ -886,6 +915,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valuation Method",
@@ -915,6 +945,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warranty Period (in days)",
@@ -946,6 +977,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Weight",
@@ -974,6 +1006,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Weight UOM",
@@ -1004,6 +1037,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Auto re-order",
@@ -1034,6 +1068,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reorder level based on Warehouse",
@@ -1063,6 +1098,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Units of Measure",
@@ -1093,6 +1129,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOMs",
@@ -1125,6 +1162,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Variants",
@@ -1156,6 +1194,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Has Variants",
@@ -1186,6 +1225,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Attributes",
@@ -1215,6 +1255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Details",
@@ -1245,6 +1286,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Purchase Item",
@@ -1276,6 +1318,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Minimum Order Qty",
@@ -1305,6 +1348,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Safety Stock",
@@ -1335,6 +1379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lead Time in days",
@@ -1366,6 +1411,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Buying Cost Center",
@@ -1398,6 +1444,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Expense Account",
@@ -1429,6 +1476,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Last Purchase Rate",
@@ -1459,6 +1507,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Details",
@@ -1488,6 +1537,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Supplier",
@@ -1516,6 +1566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivered by Supplier (Drop Ship)",
@@ -1545,6 +1596,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Manufacturer",
@@ -1574,6 +1626,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Manufacturer Part Number",
@@ -1602,6 +1655,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Code for Suppliers",
@@ -1632,6 +1686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Items",
@@ -1660,6 +1715,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Details",
@@ -1690,6 +1746,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Sales Item",
@@ -1720,6 +1777,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Publish in Hub",
@@ -1749,6 +1807,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Synced With Hub",
@@ -1778,6 +1837,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Income Account",
@@ -1807,6 +1867,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default Selling Cost Center",
@@ -1836,6 +1897,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Item Codes",
@@ -1867,6 +1929,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Items",
@@ -1896,6 +1959,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Max Discount (%)",
@@ -1925,6 +1989,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax",
@@ -1955,6 +2020,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes",
@@ -1985,6 +2051,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Inspection Criteria",
@@ -2015,6 +2082,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Inspection Required before Purchase",
@@ -2045,6 +2113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Inspection Required before Delivery",
@@ -2075,6 +2144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Parameters",
@@ -2106,6 +2176,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Manufacturing",
@@ -2136,6 +2207,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Default BOM",
@@ -2168,6 +2240,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supply Raw Materials for Purchase",
@@ -2198,6 +2271,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2224,7 +2298,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Code",
@@ -2252,6 +2327,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website",
@@ -2281,6 +2357,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Show in Website",
@@ -2309,6 +2386,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Show in Website (Variant)",
@@ -2338,6 +2416,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Route",
@@ -2368,6 +2447,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Weightage",
@@ -2397,6 +2477,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Slideshow",
@@ -2427,6 +2508,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -2455,6 +2537,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Thumbnail",
@@ -2483,6 +2566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2511,6 +2595,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website Warehouse",
@@ -2541,6 +2626,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website Item Groups",
@@ -2571,6 +2657,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website Specifications",
@@ -2599,6 +2686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Copy From Item Group",
@@ -2627,6 +2715,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website Specifications",
@@ -2656,6 +2745,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Website Description",
@@ -2683,6 +2773,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Projected Qty",
@@ -2713,7 +2804,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
- "modified": "2017-01-18 17:43:20.262925",
+ "modified": "2017-02-20 13:26:45.446617",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",
@@ -2729,7 +2820,6 @@
"export": 0,
"if_owner": 0,
"import": 1,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2750,7 +2840,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2771,7 +2860,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2792,7 +2880,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -2813,7 +2900,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -2834,7 +2920,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -2855,7 +2940,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -2876,7 +2960,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -2892,8 +2975,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item_name,description,item_group,customer_code",
+ "show_name_in_global_search": 1,
"sort_field": "idx desc, modified desc",
"sort_order": "DESC",
"title_field": "item_name",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 53faa43..0f0205b 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -7,7 +7,7 @@
import json
import itertools
from frappe import msgprint, _
-from frappe.utils import cstr, flt, cint, getdate, now_datetime, formatdate, strip
+from frappe.utils import cstr, flt, cint, getdate, now_datetime, formatdate, strip, get_timestamp
from frappe.website.website_generator import WebsiteGenerator
from erpnext.setup.doctype.item_group.item_group import invalidate_cache_for, get_parent_item_groups
from frappe.website.render import clear_cache
@@ -63,6 +63,9 @@
def validate(self):
super(Item, self).validate()
+ if not self.item_name:
+ self.item_name = self.item_code
+
if not self.description:
self.description = self.item_name
@@ -451,24 +454,32 @@
"valuation_method", "has_batch_no", "is_fixed_asset")
vals = frappe.db.get_value("Item", self.name, to_check, as_dict=True)
+ if not vals.get('valuation_method') and self.get('valuation_method'):
+ vals['valuation_method'] = frappe.db.get_single_value("Stock Settings", "valuation_method") or "FIFO"
if vals:
for key in to_check:
- if self.get(key) != vals.get(key):
- if not self.check_if_linked_document_exists():
+ if cstr(self.get(key)) != cstr(vals.get(key)):
+ if not self.check_if_linked_document_exists(key):
break # no linked document, allowed
else:
- frappe.throw(_("As there are existing transactions for this item, you can not change the value of {0}").format(frappe.bold(self.meta.get_label(key))))
+ frappe.throw(_("As there are existing transactions against item {0}, you can not change the value of {1}").format(self.name, frappe.bold(self.meta.get_label(key))))
if vals and not self.is_fixed_asset and self.is_fixed_asset != vals.is_fixed_asset:
asset = frappe.db.get_all("Asset", filters={"item_code": self.name, "docstatus": 1}, limit=1)
if asset:
frappe.throw(_('"Is Fixed Asset" cannot be unchecked, as Asset record exists against the item'))
- def check_if_linked_document_exists(self):
- for doctype in ("Sales Order Item", "Delivery Note Item", "Sales Invoice Item",
- "Material Request Item", "Purchase Order Item", "Purchase Receipt Item",
- "Purchase Invoice Item", "Stock Entry Detail", "Stock Reconciliation Item"):
+ def check_if_linked_document_exists(self, key):
+ linked_doctypes = ["Delivery Note Item", "Sales Invoice Item", "Purchase Receipt Item",
+ "Purchase Invoice Item", "Stock Entry Detail", "Stock Reconciliation Item"]
+
+ # For "Is Stock Item", following doctypes is important
+ # because reserved_qty, ordered_qty and requested_qty updated from these doctypes
+ if key == "is_stock_item":
+ linked_doctypes += ["Sales Order Item", "Purchase Order Item", "Material Request Item"]
+
+ for doctype in linked_doctypes:
if frappe.db.get_value(doctype, filters={"item_code": self.name, "docstatus": 1}) or \
frappe.db.get_value("Production Order",
filters={"production_item": self.name, "docstatus": 1}):
@@ -659,10 +670,17 @@
def get_timeline_data(doctype, name):
'''returns timeline data based on stock ledger entry'''
- return dict(frappe.db.sql('''select unix_timestamp(posting_date), count(*)
+ out = {}
+ items = dict(frappe.db.sql('''select posting_date, count(*)
from `tabStock Ledger Entry` where item_code=%s
and posting_date > date_sub(curdate(), interval 1 year)
group by posting_date''', name))
+
+ for date, count in items.iteritems():
+ timestamp = get_timestamp(date)
+ out.update({ timestamp: count })
+
+ return out
def validate_end_of_life(item_code, end_of_life=None, disabled=None, verbose=1):
if (not end_of_life) or (disabled is None):
diff --git a/erpnext/stock/doctype/item_price/item_price.json b/erpnext/stock/doctype/item_price/item_price.json
index 5f08262..0bd0009 100644
--- a/erpnext/stock/doctype/item_price/item_price.json
+++ b/erpnext/stock/doctype/item_price/item_price.json
@@ -24,6 +24,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -51,7 +52,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Price List",
@@ -74,12 +76,41 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "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": "buying",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Buying",
@@ -107,6 +138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Selling",
@@ -153,6 +185,35 @@
},
{
"allow_on_submit": 0,
+ "bold": 1,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "currency",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 1,
+ "in_standard_filter": 0,
+ "label": "Currency",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Currency",
+ "permlevel": 0,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "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,
@@ -162,6 +223,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Item Code",
@@ -192,6 +254,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate",
@@ -216,40 +279,13 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "currency",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 1,
- "in_standard_filter": 0,
- "label": "Currency",
- "length": 0,
- "no_copy": 0,
- "options": "Currency",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "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": "col_br_1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -276,6 +312,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -303,6 +340,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Description",
@@ -318,61 +356,6 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "section_break_12",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "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": "bulk_import_help",
- "fieldtype": "HTML",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Bulk Import Help",
- "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,
@@ -386,7 +369,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:52:09.842544",
+ "modified": "2017-02-20 13:27:23.896148",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Price",
@@ -402,7 +385,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -423,7 +405,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -435,10 +416,12 @@
"write": 1
}
],
- "quick_entry": 0,
+ "quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
"title_field": "item_code",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/item_supplier/item_supplier.json b/erpnext/stock/doctype/item_supplier/item_supplier.json
index ee4f869..163b427 100644
--- a/erpnext/stock/doctype/item_supplier/item_supplier.json
+++ b/erpnext/stock/doctype/item_supplier/item_supplier.json
@@ -8,18 +8,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Supplier",
"length": 0,
"no_copy": 0,
@@ -28,6 +32,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,
@@ -38,13 +43,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "supplier_part_no",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Supplier Part Number",
"length": 0,
"no_copy": 0,
@@ -53,6 +61,7 @@
"print_hide_if_no_value": 0,
"print_width": "200px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -71,7 +80,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:01.145024",
+ "modified": "2017-02-20 13:29:32.569715",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Supplier",
@@ -80,5 +89,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
index db6e402..b935acd 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
+++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipts",
@@ -108,6 +111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipt Items",
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Items From Purchase Receipts",
@@ -163,6 +168,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipt Items",
@@ -191,6 +197,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Charges",
@@ -220,6 +227,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -248,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -275,6 +284,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -303,6 +313,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -331,6 +342,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Distribute Charges Based On",
@@ -360,6 +372,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -388,6 +401,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -415,6 +429,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Landed Cost Help",
@@ -444,7 +459,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-21 01:40:13.959409",
+ "modified": "2017-02-20 13:31:34.383926",
"modified_by": "Administrator",
"module": "Stock",
"name": "Landed Cost Voucher",
@@ -461,7 +476,6 @@
"export": 1,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -476,7 +490,9 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
index 409770e..930896c 100644
--- a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
+++ b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py
@@ -12,6 +12,7 @@
class TestLandedCostVoucher(unittest.TestCase):
def test_landed_cost_voucher(self):
+ frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
set_perpetual_inventory(1)
pr = frappe.copy_doc(pr_test_records[0])
pr.submit()
diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.json b/erpnext/stock/doctype/manufacturer/manufacturer.json
index 0840e56..4e1da10 100644
--- a/erpnext/stock/doctype/manufacturer/manufacturer.json
+++ b/erpnext/stock/doctype/manufacturer/manufacturer.json
@@ -3,24 +3,30 @@
"allow_import": 1,
"allow_rename": 1,
"autoname": "field:short_name",
+ "beta": 0,
"creation": "2016-01-17 11:04:52.761731",
"custom": 0,
"description": "Manufacturers used in Items",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Limited to 12 characters",
"fieldname": "short_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Short Name",
"length": 0,
"no_copy": 0,
@@ -29,6 +35,7 @@
"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,
@@ -39,12 +46,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "full_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Full Name",
"length": 0,
"no_copy": 0,
@@ -53,6 +64,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,
@@ -63,12 +75,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "website",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Website",
"length": 0,
"no_copy": 0,
@@ -77,6 +93,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,
@@ -87,12 +104,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "data_6",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Country",
"length": 0,
"no_copy": 0,
@@ -102,6 +123,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,
@@ -112,12 +134,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "logo",
"fieldtype": "Attach Image",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Logo",
"length": 0,
"no_copy": 0,
@@ -126,6 +152,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,
@@ -136,12 +163,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "notes",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
@@ -150,6 +181,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,
@@ -161,13 +193,14 @@
"hide_toolbar": 0,
"icon": "fa fa-certificate",
"idx": 0,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-01-21 11:39:36.686949",
+ "modified": "2017-02-20 13:28:13.374242",
"modified_by": "Administrator",
"module": "Stock",
"name": "Manufacturer",
@@ -215,10 +248,14 @@
"write": 0
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"search_fields": "short_name, full_name",
+ "show_name_in_global_search": 1,
"sort_field": "",
"sort_order": "DESC",
- "title_field": "short_name"
-}
+ "title_field": "short_name",
+ "track_changes": 0,
+ "track_seen": 0
+}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/material_request/material_request.json b/erpnext/stock/doctype/material_request/material_request.json
index 926415d..2ab0907 100644
--- a/erpnext/stock/doctype/material_request/material_request.json
+++ b/erpnext/stock/doctype/material_request/material_request.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -79,6 +81,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Type",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -133,6 +137,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -163,6 +168,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -195,7 +201,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -228,6 +235,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -257,6 +265,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -287,6 +296,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -316,6 +326,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Requested For",
@@ -343,7 +354,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transaction Date",
@@ -375,6 +387,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -403,7 +416,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -437,6 +451,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Ordered",
@@ -466,6 +481,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Details",
@@ -494,6 +510,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -524,6 +541,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -553,6 +571,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -582,6 +601,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -612,6 +632,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions Content",
@@ -643,7 +664,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-12-15 14:52:32.240406",
+ "modified": "2017-02-20 13:29:56.743544",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request",
@@ -659,7 +680,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -680,7 +700,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -701,7 +720,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -722,7 +740,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -738,8 +755,10 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status,transaction_date",
+ "show_name_in_global_search": 1,
"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/stock/doctype/material_request_item/material_request_item.json b/erpnext/stock/doctype/material_request_item/material_request_item.json
index b1d6ec0..5bf3f27 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.json
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Setup",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Code",
@@ -54,6 +56,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -79,7 +82,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -111,6 +115,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -139,6 +144,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -170,6 +176,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -197,6 +204,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -225,6 +233,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quantity and Warehouse",
@@ -252,6 +261,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Quantity",
@@ -283,6 +293,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock UOM",
@@ -315,6 +326,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "For Warehouse",
@@ -347,6 +359,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -374,6 +387,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Required Date",
@@ -405,6 +419,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -432,7 +447,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -463,6 +479,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -495,6 +512,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lead Time Date",
@@ -524,6 +542,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Order",
@@ -552,6 +571,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -581,6 +601,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -607,6 +628,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Min Order Qty",
@@ -638,6 +660,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Projected Qty",
@@ -669,6 +692,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Actual Qty",
@@ -697,6 +721,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Completed Qty",
@@ -726,6 +751,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -755,7 +781,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-12-08 14:49:48.397015",
+ "modified": "2017-02-20 13:31:50.143583",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request Item",
@@ -764,6 +790,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packed_item/packed_item.json b/erpnext/stock/doctype/packed_item/packed_item.json
index 7be8e97..f9c1635 100644
--- a/erpnext/stock/doctype/packed_item/packed_item.json
+++ b/erpnext/stock/doctype/packed_item/packed_item.json
@@ -8,18 +8,22 @@
"docstatus": 0,
"doctype": "DocType",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "parent_item",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Parent Item",
"length": 0,
"no_copy": 0,
@@ -30,6 +34,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -40,13 +45,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -57,6 +65,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -67,13 +76,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -83,6 +95,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -93,13 +106,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_5",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -107,6 +123,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,
@@ -117,13 +134,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -134,6 +154,7 @@
"print_hide_if_no_value": 0,
"print_width": "300px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -145,13 +166,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_6",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -159,6 +183,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,
@@ -169,13 +194,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "warehouse",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "From Warehouse",
"length": 0,
"no_copy": 0,
@@ -186,6 +214,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,
@@ -196,13 +225,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "target_warehouse",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "To Warehouse (Optional)",
"length": 0,
"no_copy": 0,
@@ -212,6 +244,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -222,13 +255,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_9",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -236,6 +272,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,
@@ -246,13 +283,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty",
"length": 0,
"no_copy": 0,
@@ -262,6 +302,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -272,13 +313,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_9",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -286,6 +330,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,
@@ -296,13 +341,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "serial_no",
"fieldtype": "Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 0,
@@ -310,6 +358,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,
@@ -320,13 +369,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_11",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -334,6 +386,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,
@@ -344,13 +397,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "batch_no",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Batch No",
"length": 0,
"no_copy": 0,
@@ -359,6 +415,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,
@@ -369,13 +426,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break_13",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -383,6 +443,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,
@@ -393,13 +454,16 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "actual_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Qty",
"length": 0,
"no_copy": 1,
@@ -409,6 +473,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -419,13 +484,16 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "projected_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Projected Qty",
"length": 0,
"no_copy": 1,
@@ -435,6 +503,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -445,13 +514,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_16",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -459,6 +531,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,
@@ -469,13 +542,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -486,6 +562,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -496,13 +573,16 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "page_break",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 0,
@@ -512,6 +592,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -522,13 +603,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "prevdoc_doctype",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Prevdoc DocType",
"length": 0,
"no_copy": 0,
@@ -538,6 +622,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -548,13 +633,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "parent_detail_docname",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Parent Detail docname",
"length": 0,
"no_copy": 1,
@@ -564,6 +652,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -581,7 +670,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:02.979081",
+ "modified": "2017-02-20 13:27:37.569945",
"modified_by": "Administrator",
"module": "Stock",
"name": "Packed Item",
@@ -590,5 +679,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.json b/erpnext/stock/doctype/packing_slip/packing_slip.json
index 3359084..297e370 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.json
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.json
@@ -3,24 +3,29 @@
"allow_import": 0,
"allow_rename": 0,
"autoname": "PS.#######",
+ "beta": 0,
"creation": "2013-04-11 15:32:24",
"custom": 0,
"description": "Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "packing_slip_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -28,6 +33,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,
@@ -38,19 +44,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break0",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -61,6 +71,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Indicates that the package is a part of this delivery (Only Draft)",
"fieldname": "delivery_note",
"fieldtype": "Link",
@@ -68,7 +79,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Delivery Note",
"length": 0,
"no_copy": 0,
@@ -77,6 +90,7 @@
"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,
@@ -87,19 +101,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -110,13 +128,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Series",
"length": 0,
"no_copy": 0,
@@ -125,6 +146,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -135,19 +157,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "section_break0",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -158,19 +184,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -181,6 +211,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "Identification of the package for the delivery (for print)",
"fieldname": "from_case_no",
"fieldtype": "Data",
@@ -188,7 +219,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "From Package No.",
"length": 0,
"no_copy": 1,
@@ -196,6 +229,7 @@
"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,
@@ -207,19 +241,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break3",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -230,6 +268,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "If more than one package of the same type (for print)",
"fieldname": "to_case_no",
"fieldtype": "Data",
@@ -237,7 +276,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "To Package No.",
"length": 0,
"no_copy": 1,
@@ -245,6 +286,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,
@@ -256,13 +298,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "package_item_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -270,6 +315,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,
@@ -280,13 +326,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "get_items",
"fieldtype": "Button",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Get Items",
"length": 0,
"no_copy": 0,
@@ -294,6 +343,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,
@@ -304,13 +354,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "items",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Items",
"length": 0,
"no_copy": 0,
@@ -319,6 +372,7 @@
"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,
@@ -329,13 +383,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "package_weight_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Package Weight Details",
"length": 0,
"no_copy": 0,
@@ -343,6 +400,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,
@@ -353,6 +411,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "The net weight of this package. (calculated automatically as sum of net weight of items)",
"fieldname": "net_weight_pkg",
"fieldtype": "Float",
@@ -360,7 +419,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Weight",
"length": 0,
"no_copy": 1,
@@ -368,6 +429,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -378,13 +440,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "net_weight_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Net Weight UOM",
"length": 0,
"no_copy": 1,
@@ -393,6 +458,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -403,19 +469,23 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break4",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"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,
@@ -426,6 +496,7 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"description": "The gross weight of the package. Usually net weight + packaging material weight. (for print)",
"fieldname": "gross_weight_pkg",
"fieldtype": "Float",
@@ -433,7 +504,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Gross Weight",
"length": 0,
"no_copy": 1,
@@ -441,6 +514,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,
@@ -451,13 +525,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "gross_weight_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Gross Weight UOM",
"length": 0,
"no_copy": 1,
@@ -466,6 +543,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,
@@ -476,13 +554,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
@@ -491,6 +572,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,
@@ -501,13 +583,16 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
@@ -517,6 +602,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -527,13 +613,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "misc_details",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
@@ -541,6 +630,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,
@@ -551,13 +641,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
@@ -566,6 +659,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -577,13 +671,14 @@
"hide_toolbar": 0,
"icon": "fa fa-suitcase",
"idx": 1,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-03-31 06:02:41.545869",
+ "modified": "2017-02-20 13:28:31.182390",
"modified_by": "Administrator",
"module": "Stock",
"name": "Packing Slip",
@@ -690,9 +785,12 @@
"write": 1
}
],
+ "quick_entry": 0,
"read_only": 0,
"read_only_onload": 1,
"search_fields": "delivery_note",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
index 4210ef8..009244c 100644
--- a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
+++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.json
@@ -10,18 +10,22 @@
"doctype": "DocType",
"document_type": "Document",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_code",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -31,6 +35,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -42,13 +47,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_2",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -56,6 +64,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,
@@ -66,13 +75,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "item_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -81,6 +93,7 @@
"print_hide_if_no_value": 0,
"print_width": "200px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -92,13 +105,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "batch_no",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Batch No",
"length": 0,
"no_copy": 0,
@@ -108,6 +124,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,
@@ -118,13 +135,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
+ "columns": 0,
"fieldname": "desc_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -133,6 +153,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,
@@ -143,13 +164,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "description",
"fieldtype": "Text Editor",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -158,6 +182,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,
@@ -168,13 +193,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "quantity_section",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -183,6 +211,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,
@@ -193,13 +222,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -208,6 +240,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
@@ -219,13 +252,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "net_weight",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Net Weight",
"length": 0,
"no_copy": 0,
@@ -234,6 +270,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -245,13 +282,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "column_break_10",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -259,6 +299,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,
@@ -269,13 +310,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "stock_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -285,6 +329,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -296,13 +341,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "weight_uom",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Weight UOM",
"length": 0,
"no_copy": 0,
@@ -312,6 +360,7 @@
"print_hide_if_no_value": 0,
"print_width": "100px",
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -323,13 +372,16 @@
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "page_break",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Page Break",
"length": 0,
"no_copy": 0,
@@ -337,6 +389,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,
@@ -347,13 +400,16 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "columns": 0,
"fieldname": "dn_detail",
"fieldtype": "Data",
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "DN Detail",
"length": 0,
"no_copy": 0,
@@ -361,6 +417,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,
@@ -378,7 +435,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:03.145397",
+ "modified": "2017-02-20 13:30:26.818408",
"modified_by": "Administrator",
"module": "Stock",
"name": "Packing Slip Item",
@@ -387,5 +444,7 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/price_list/price_list.json b/erpnext/stock/doctype/price_list/price_list.json
index 73674ee..be6673e 100644
--- a/erpnext/stock/doctype/price_list/price_list.json
+++ b/erpnext/stock/doctype/price_list/price_list.json
@@ -25,6 +25,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Enabled",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -78,6 +80,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Name",
@@ -107,6 +110,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Currency",
@@ -135,6 +139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Buying",
@@ -162,6 +167,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Selling",
@@ -189,6 +195,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -215,6 +222,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Applicable for Countries",
@@ -245,7 +253,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
- "modified": "2016-11-07 05:32:09.570045",
+ "modified": "2017-02-20 13:27:30.431064",
"modified_by": "Administrator",
"module": "Stock",
"name": "Price List",
@@ -261,7 +269,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -282,7 +289,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -303,7 +309,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -324,7 +329,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -345,7 +349,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -361,5 +364,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "currency",
+ "show_name_in_global_search": 1,
+ "sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
index b4bad54..2e8cd1a 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -138,7 +142,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -172,6 +177,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
@@ -199,6 +205,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -228,7 +235,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Date",
@@ -261,6 +269,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Time",
@@ -292,7 +301,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Company",
@@ -325,6 +335,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Return",
@@ -354,6 +365,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Return Against Purchase Receipt",
@@ -383,6 +395,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address and Contact",
@@ -410,7 +423,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Supplier Address",
@@ -438,7 +452,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -468,6 +483,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -495,6 +511,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -522,6 +539,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -549,6 +567,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -576,6 +595,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -604,6 +624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Select Shipping Address",
@@ -633,6 +654,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Shipping Address",
@@ -661,6 +683,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency and Price List",
@@ -689,6 +712,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Currency",
@@ -720,6 +744,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Exchange Rate",
@@ -750,6 +775,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -779,6 +805,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List",
@@ -808,6 +835,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Currency",
@@ -837,6 +865,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Exchange Rate",
@@ -865,6 +894,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Ignore Pricing Rule",
@@ -892,6 +922,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -921,6 +952,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -951,6 +983,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get current stock",
@@ -980,6 +1013,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1007,6 +1041,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total (Company Currency)",
@@ -1036,6 +1071,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total (Company Currency)",
@@ -1068,6 +1104,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1094,6 +1131,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total",
@@ -1123,6 +1161,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Total",
@@ -1154,6 +1193,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1184,6 +1224,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges",
@@ -1214,6 +1255,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Taxes and Charges",
@@ -1244,6 +1286,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Calculation",
@@ -1273,6 +1316,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1302,6 +1346,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added (Company Currency)",
@@ -1332,6 +1377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted (Company Currency)",
@@ -1362,6 +1408,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges (Company Currency)",
@@ -1392,6 +1439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1420,6 +1468,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Added",
@@ -1450,6 +1499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Taxes and Charges Deducted",
@@ -1480,6 +1530,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Taxes and Charges",
@@ -1510,6 +1561,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount",
@@ -1539,6 +1591,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Apply Additional Discount On",
@@ -1568,6 +1621,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount (Company Currency)",
@@ -1597,6 +1651,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1624,6 +1679,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Percentage",
@@ -1652,6 +1708,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Discount Amount",
@@ -1681,6 +1738,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1708,6 +1766,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Grand Total (Company Currency)",
@@ -1739,6 +1798,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words (Company Currency)",
@@ -1768,6 +1828,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rounded Total (Company Currency)",
@@ -1798,6 +1859,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1825,6 +1887,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Grand Total",
@@ -1855,6 +1918,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "In Words",
@@ -1885,6 +1949,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -1914,6 +1979,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms",
@@ -1944,6 +2010,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Terms and Conditions",
@@ -1975,6 +2042,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied",
@@ -2006,6 +2074,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied",
@@ -2037,6 +2106,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Warehouse",
@@ -2069,6 +2139,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplied Items",
@@ -2099,6 +2170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill No",
@@ -2128,6 +2200,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Bill Date",
@@ -2157,6 +2230,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -2186,7 +2260,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Status",
@@ -2220,6 +2295,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Warehouse",
@@ -2250,6 +2326,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -2282,6 +2359,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Range",
@@ -2311,6 +2389,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2340,6 +2419,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "% Amount Billed",
@@ -2368,6 +2448,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -2396,6 +2477,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -2424,6 +2506,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -2454,6 +2537,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Language",
@@ -2482,6 +2566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Other Details",
@@ -2513,6 +2598,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Instructions",
@@ -2542,6 +2628,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -2570,6 +2657,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transporter Details",
@@ -2598,6 +2686,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Transporter Name",
@@ -2627,6 +2716,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -2656,6 +2746,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Vehicle Number",
@@ -2688,6 +2779,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Vehicle Date",
@@ -2721,7 +2813,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-11-07 05:57:41.746638",
+ "modified": "2017-02-20 13:30:17.979040",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt",
@@ -2737,7 +2829,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2758,7 +2849,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2779,7 +2869,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -2800,7 +2889,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -2821,7 +2909,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 1,
"print": 0,
"read": 1,
@@ -2837,9 +2924,11 @@
"read_only": 0,
"read_only_onload": 1,
"search_fields": "status, posting_date, supplier",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "supplier",
"title_field": "title",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
index 7421e01..7fe2722 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
@@ -11,6 +11,9 @@
from erpnext import set_perpetual_inventory
class TestPurchaseReceipt(unittest.TestCase):
+ def setUp(self):
+ frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
+
def test_make_purchase_invoice(self):
pr = make_purchase_receipt(do_not_save=True)
self.assertRaises(frappe.ValidationError, make_purchase_invoice, pr.name)
@@ -246,6 +249,7 @@
order by account desc""", (voucher_type, voucher_no), as_dict=1)
def make_purchase_receipt(**args):
+ frappe.db.set_value("Buying Settings", None, "allow_multiple_items", 1)
pr = frappe.new_doc("Purchase Receipt")
args = frappe._dict(args)
pr.posting_date = args.posting_date or today()
diff --git a/erpnext/stock/doctype/purchase_receipt/test_records.json b/erpnext/stock/doctype/purchase_receipt/test_records.json
index 62c6cc3..7c20991 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_records.json
+++ b/erpnext/stock/doctype/purchase_receipt/test_records.json
@@ -67,10 +67,10 @@
{
"base_amount": 250.0,
"conversion_factor": 1.0,
- "description": "_Test Item",
+ "description": "_Test Item Home Desktop 100",
"doctype": "Purchase Receipt Item",
- "item_code": "_Test Item",
- "item_name": "_Test Item",
+ "item_code": "_Test Item Home Desktop 100",
+ "item_name": "_Test Item Home Desktop 100",
"parentfield": "items",
"qty": 5.0,
"rate": 50.0,
@@ -118,4 +118,4 @@
"supplier": "_Test Supplier",
"supplier_warehouse": "_Test Warehouse - _TC"
}
-]
+]
\ No newline at end of file
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
index d8449f1..5159625 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Barcode",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -76,7 +78,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Item Code",
@@ -109,6 +112,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -136,6 +140,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -165,6 +170,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -224,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -250,6 +258,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image",
@@ -278,6 +287,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Image View",
@@ -307,6 +317,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Received and Accepted",
@@ -334,6 +345,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Recd Quantity",
@@ -365,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Accepted Quantity",
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Quantity",
@@ -427,6 +441,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -453,6 +468,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "UOM",
@@ -485,6 +501,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Stock UOM",
@@ -517,6 +534,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Conversion Factor",
@@ -548,6 +566,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate and Amount",
@@ -575,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate",
@@ -604,6 +624,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Discount on Price List Rate (%)",
@@ -631,6 +652,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -657,6 +679,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Price List Rate (Company Currency)",
@@ -685,6 +708,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -711,6 +735,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Rate",
@@ -743,6 +768,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Amount",
@@ -773,6 +799,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -799,6 +826,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rate (Company Currency)",
@@ -831,6 +859,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amount (Company Currency)",
@@ -863,6 +892,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Pricing Rule",
@@ -891,6 +921,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -918,6 +949,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate",
@@ -947,6 +979,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Net Amount",
@@ -976,6 +1009,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1003,6 +1037,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Rate (Company Currency)",
@@ -1032,6 +1067,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Net Amount (Company Currency)",
@@ -1061,6 +1097,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse and Reference",
@@ -1088,6 +1125,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Accepted Warehouse",
@@ -1120,6 +1158,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Warehouse",
@@ -1153,6 +1192,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Quality Inspection",
@@ -1183,6 +1223,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1209,7 +1250,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order",
@@ -1242,6 +1284,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Required By",
@@ -1271,6 +1314,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Qty as per Stock UOM",
@@ -1302,6 +1346,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1328,7 +1373,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Serial No",
@@ -1358,6 +1404,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Batch No",
@@ -1388,6 +1435,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -1416,6 +1464,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Rejected Serial No",
@@ -1443,6 +1492,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1469,7 +1519,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1500,6 +1551,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Cost Center",
@@ -1527,7 +1579,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order Item",
@@ -1559,6 +1612,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1575,6 +1629,35 @@
"unique": 0
},
{
+ "allow_on_submit": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "is_sample_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Sample Item",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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,
@@ -1585,6 +1668,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "BOM",
@@ -1614,6 +1698,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Billed Amt",
@@ -1642,6 +1727,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Landed Cost Voucher Amount",
@@ -1669,6 +1755,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -1699,7 +1786,8 @@
"hidden": 1,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -1730,6 +1818,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raw Materials Supplied Cost",
@@ -1762,6 +1851,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Amount",
@@ -1794,6 +1884,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Valuation Rate",
@@ -1827,6 +1918,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Tax Rate",
@@ -1856,6 +1948,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Page Break",
@@ -1885,7 +1978,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-11-16 16:04:21.778869",
+ "modified": "2017-02-20 13:31:59.778417",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt Item",
@@ -1894,7 +1987,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.json b/erpnext/stock/doctype/quality_inspection/quality_inspection.json
index 3774853..a46a3b4 100644
--- a/erpnext/stock/doctype/quality_inspection/quality_inspection.json
+++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -51,7 +52,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Report Date",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -107,7 +110,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Inspection Type",
@@ -138,6 +142,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reference Type",
@@ -167,7 +172,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Reference Name",
@@ -198,6 +204,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -224,7 +231,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Code",
@@ -255,6 +263,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Serial No",
@@ -285,6 +294,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Batch No",
@@ -315,6 +325,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sample Size",
@@ -344,6 +355,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -372,6 +384,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -399,7 +412,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -430,6 +444,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -458,6 +473,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Inspected By",
@@ -488,6 +504,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Verified By",
@@ -517,6 +534,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -544,6 +562,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -573,6 +592,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -603,6 +623,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -632,6 +653,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Specification Details",
@@ -660,6 +682,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Readings",
@@ -691,7 +714,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:53:04.785375",
+ "modified": "2017-02-20 13:31:09.483782",
"modified_by": "Administrator",
"module": "Stock",
"name": "Quality Inspection",
@@ -707,7 +730,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -723,6 +745,8 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item_code, report_date, reference_name",
+ "show_name_in_global_search": 1,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/serial_no/serial_no.json b/erpnext/stock/doctype/serial_no/serial_no.json
index c7ba178..3b65ff8 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.json
+++ b/erpnext/stock/doctype/serial_no/serial_no.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -77,6 +79,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial No",
@@ -105,7 +108,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Code",
@@ -136,7 +140,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Warehouse",
@@ -167,6 +172,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -193,6 +199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -219,7 +226,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Group",
@@ -281,6 +290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Brand",
@@ -311,6 +321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase / Manufacture Details",
@@ -338,6 +349,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -365,6 +377,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Creation Document Type",
@@ -393,6 +406,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Creation Document No",
@@ -420,7 +434,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Creation Date",
@@ -450,6 +465,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Creation Time",
@@ -477,6 +493,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Incoming Rate",
@@ -507,6 +524,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -533,7 +551,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -561,7 +580,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
@@ -589,6 +609,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Details",
@@ -616,7 +637,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Document Type",
@@ -644,7 +666,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Document No",
@@ -673,6 +696,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Date",
@@ -702,6 +726,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Time",
@@ -729,6 +754,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Is Cancelled",
@@ -759,6 +785,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -785,7 +812,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -815,7 +843,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -845,6 +874,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warranty / AMC Details",
@@ -872,6 +902,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -898,7 +929,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Maintenance Status",
@@ -930,6 +962,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warranty Period (Days)",
@@ -960,6 +993,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -986,7 +1020,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warranty Expiry Date",
@@ -1016,7 +1051,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "AMC Expiry Date",
@@ -1047,6 +1083,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1074,6 +1111,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial No Details",
@@ -1100,7 +1138,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -1130,7 +1169,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:08:48.659186",
+ "modified": "2017-02-20 13:26:55.864960",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No",
@@ -1146,7 +1185,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1167,7 +1205,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1188,7 +1225,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1204,7 +1240,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "item_code",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index b410802..cc867a8 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -2,6 +2,188 @@
frappe.provide("erpnext.stock");
+frappe.ui.form.on('Stock Entry', {
+ setup: function(frm) {
+ $.extend(frm.cscript, new erpnext.stock.StockEntry({frm: frm}));
+
+ frm.set_query('production_order', function() {
+ return {
+ filters: [
+ ['Production Order', 'docstatus', '=', 1],
+ ['Production Order', 'qty', '>','`tabProduction Order`.produced_qty'],
+ ['Production Order', 'company', '=', frm.doc.company]
+ ]
+ }
+ });
+ // },
+ // onload_post_render: function(frm) {
+
+ frm.set_query('batch_no', 'items', function(doc, cdt, cdn) {
+ var item = locals[cdt][cdn];
+ if(!item.item_code) {
+ frappe.throw(__("Please enter Item Code to get Batch Number"));
+ } else {
+ if (in_list(["Material Transfer for Manufacture", "Manufacture", "Repack", "Subcontract"], doc.purpose)) {
+ var filters = {
+ 'item_code': item.item_code,
+ 'posting_date': frm.doc.posting_date || nowdate()
+ }
+ } else {
+ var filters = {
+ 'item_code': item.item_code
+ }
+ }
+
+ if(item.s_warehouse) filters["warehouse"] = item.s_warehouse;
+ return {
+ query : "erpnext.controllers.queries.get_batch_no",
+ filters: filters
+ }
+ }
+ });
+ },
+ refresh: function(frm) {
+ if(!frm.doc.docstatus) {
+ frm.add_custom_button(__('Make Material Request'), function() {
+ frappe.model.with_doctype('Material Request', function() {
+ var mr = frappe.model.get_new_doc('Material Request');
+ var items = frm.get_field('items').grid.get_selected_children();
+ if(!items.length) {
+ items = frm.doc.items;
+ }
+ items.forEach(function(item) {
+ var mr_item = frappe.model.add_child(mr, 'items');
+ mr_item.item_code = item.item_code;
+ mr_item.item_name = item.item_name;
+ mr_item.uom = item.uom;
+ mr_item.item_group = item.item_group;
+ mr_item.description = item.description;
+ mr_item.image = item.image;
+ mr_item.qty = item.qty;
+ mr_item.warehouse = item.s_warehouse;
+ mr_item.required_date = frappe.datetime.nowdate();
+ });
+ frappe.set_route('Form', 'Material Request', mr.name);
+ });
+ });
+ }
+ },
+ purpose: function(frm) {
+ frm.fields_dict.items.grid.refresh();
+ frm.cscript.toggle_related_fields(frm.doc);
+ },
+ company: function(frm) {
+ if(frm.doc.company) {
+ var company_doc = frappe.get_doc(":Company", frm.doc.company);
+ if(company_doc.default_letter_head) {
+ frm.set_value("letter_head", company_doc.default_letter_head);
+ }
+ }
+ },
+ set_serial_no: function(frm, cdt, cdn) {
+ var d = frappe.model.get_doc(cdt, cdn);
+ if(!d.item_code && !d.s_warehouse && !d.qty) return;
+ var args = {
+ 'item_code' : d.item_code,
+ 'warehouse' : cstr(d.s_warehouse),
+ 'qty' : d.qty
+ };
+ frappe.call({
+ method: "erpnext.stock.get_item_details.get_serial_no",
+ args: {"args": args},
+ callback: function(r) {
+ if (!r.exe){
+ frappe.model.set_value(cdt, cdn, "serial_no", r.message);
+ }
+ }
+ });
+ },
+})
+
+frappe.ui.form.on('Stock Entry Detail', {
+ qty: function(frm, cdt, cdn) {
+ frm.events.set_serial_no(frm, cdt, cdn);
+ },
+
+ s_warehouse: function(frm, cdt, cdn) {
+ frm.events.set_serial_no(frm, cdt, cdn);
+ },
+ barcode: function(doc, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ if (d.barcode) {
+ frappe.call({
+ method: "erpnext.stock.get_item_details.get_item_code",
+ args: {"barcode": d.barcode },
+ callback: function(r) {
+ if (!r.exe){
+ frappe.model.set_value(cdt, cdn, "item_code", r.message);
+ }
+ }
+ });
+ }
+ },
+ uom: function(doc, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ if(d.uom && d.item_code){
+ return frappe.call({
+ method: "erpnext.stock.doctype.stock_entry.stock_entry.get_uom_details",
+ args: {
+ item_code: d.item_code,
+ uom: d.uom,
+ qty: d.qty
+ },
+ callback: function(r) {
+ if(r.message) {
+ frappe.model.set_value(cdt, cdn, r.message);
+ }
+ }
+ });
+ }
+ },
+ item_code: function(frm, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ if(d.item_code) {
+ args = {
+ 'item_code' : d.item_code,
+ 'warehouse' : cstr(d.s_warehouse) || cstr(d.t_warehouse),
+ 'transfer_qty' : d.transfer_qty,
+ 'serial_no ' : d.serial_no,
+ 'bom_no' : d.bom_no,
+ 'expense_account' : d.expense_account,
+ 'cost_center' : d.cost_center,
+ 'company' : frm.doc.company,
+ 'qty' : d.qty
+ };
+ return frappe.call({
+ doc: frm.doc,
+ method: "get_item_details",
+ args: args,
+ callback: function(r) {
+ if(r.message) {
+ var d = locals[cdt][cdn];
+ $.each(r.message, function(k, v) {
+ d[k] = v;
+ });
+ refresh_field("items");
+ }
+ }
+ });
+ }
+ },
+ expense_account: function(frm, cdt, cdn) {
+ erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "expense_account");
+ },
+ cost_center: function(doc, cdt, cdn) {
+ erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "cost_center");
+ }
+});
+
+frappe.ui.form.on('Landed Cost Taxes and Charges', {
+ amount: function(frm) {
+ frm.events.calculate_amount();
+ }
+});
+
erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
setup: function() {
var me = this;
@@ -41,13 +223,17 @@
}
}
}
+
+ this.frm.set_indicator_formatter('item_code',
+ function(doc) { return (doc.qty<=doc.actual_qty) ? "green" : "orange" })
+
},
onload_post_render: function() {
var me = this;
this.set_default_account(function() {
if(me.frm.doc.__islocal && me.frm.doc.company && !me.frm.doc.amended_from) {
- cur_frm.script_manager.trigger("company");
+ me.frm.trigger("company");
}
});
@@ -176,7 +362,7 @@
excise.voucher_type = 'Excise Entry';
frappe.set_route('Form', 'Journal Entry', excise.name);
}, __("Make"));
- cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+ this.frm.page.set_inner_btn_group_as_primary(__("Make"));
},
items_add: function(doc, cdt, cdn) {
@@ -305,204 +491,32 @@
this.frm.set_value("total_additional_costs", flt(total_additional_costs, precision("total_additional_costs")));
},
-});
-cur_frm.script_manager.make(erpnext.stock.StockEntry);
+ toggle_related_fields: function(doc) {
+ this.frm.toggle_enable("from_warehouse", doc.purpose!='Material Receipt');
+ this.frm.toggle_enable("to_warehouse", doc.purpose!='Material Issue');
-cur_frm.cscript.toggle_related_fields = function(doc) {
- cur_frm.toggle_enable("from_warehouse", doc.purpose!='Material Receipt');
- cur_frm.toggle_enable("to_warehouse", doc.purpose!='Material Issue');
+ this.frm.fields_dict["items"].grid.set_column_disp("s_warehouse", doc.purpose!='Material Receipt');
+ this.frm.fields_dict["items"].grid.set_column_disp("t_warehouse", doc.purpose!='Material Issue');
- cur_frm.fields_dict["items"].grid.set_column_disp("s_warehouse", doc.purpose!='Material Receipt');
- cur_frm.fields_dict["items"].grid.set_column_disp("t_warehouse", doc.purpose!='Material Issue');
+ this.frm.cscript.toggle_enable_bom();
- cur_frm.cscript.toggle_enable_bom();
-
- if (doc.purpose == 'Subcontract') {
- doc.customer = doc.customer_name = doc.customer_address =
- doc.delivery_note_no = doc.sales_invoice_no = null;
- } else {
- doc.customer = doc.customer_name = doc.customer_address =
- doc.delivery_note_no = doc.sales_invoice_no = doc.supplier =
- doc.supplier_name = doc.supplier_address = doc.purchase_receipt_no = null;
- }
- if(doc.purpose == "Material Receipt") {
- cur_frm.set_value("from_bom", 0);
- }
-
- // Addition costs based on purpose
- cur_frm.toggle_display(["additional_costs", "total_additional_costs", "additional_costs_section"],
- doc.purpose!='Material Issue');
-
- cur_frm.fields_dict["items"].grid.set_column_disp("additional_cost", doc.purpose!='Material Issue');
-}
-
-cur_frm.fields_dict['production_order'].get_query = function(doc) {
- return {
- filters: [
- ['Production Order', 'docstatus', '=', 1],
- ['Production Order', 'qty', '>','`tabProduction Order`.produced_qty'],
- ['Production Order', 'company', '=', cur_frm.doc.company]
- ]
- }
-}
-
-cur_frm.cscript.purpose = function(doc, cdt, cdn) {
- cur_frm.fields_dict.items.grid.refresh();
- cur_frm.cscript.toggle_related_fields(doc);
-}
-
-// Overloaded query for link batch_no
-cur_frm.fields_dict['items'].grid.get_field('batch_no').get_query = function(doc, cdt, cdn) {
- var item = locals[cdt][cdn];
- if(!item.item_code) {
- frappe.throw(__("Please enter Item Code to get batch no"));
- }
- else {
- if (in_list(["Material Transfer for Manufacture", "Manufacture", "Repack", "Subcontract"], doc.purpose)) {
- var filters = {
- 'item_code': item.item_code,
- 'posting_date': me.frm.doc.posting_date || nowdate()
- }
+ if (doc.purpose == 'Subcontract') {
+ doc.customer = doc.customer_name = doc.customer_address =
+ doc.delivery_note_no = doc.sales_invoice_no = null;
} else {
- var filters = {
- 'item_code': item.item_code
- }
+ doc.customer = doc.customer_name = doc.customer_address =
+ doc.delivery_note_no = doc.sales_invoice_no = doc.supplier =
+ doc.supplier_name = doc.supplier_address = doc.purchase_receipt_no = null;
+ }
+ if(doc.purpose == "Material Receipt") {
+ this.frm.set_value("from_bom", 0);
}
+ // Addition costs based on purpose
+ this.frm.toggle_display(["additional_costs", "total_additional_costs", "additional_costs_section"],
+ doc.purpose!='Material Issue');
- if(item.s_warehouse) filters["warehouse"] = item.s_warehouse
- return {
- query : "erpnext.controllers.queries.get_batch_no",
- filters: filters
- }
+ this.frm.fields_dict["items"].grid.set_column_disp("additional_cost", doc.purpose!='Material Issue');
}
-}
-
-cur_frm.cscript.validate = function(doc, cdt, cdn) {
- cur_frm.cscript.validate_items(doc);
-}
-
-cur_frm.cscript.validate_items = function(doc) {
- cl = doc.items || [];
- if (!cl.length) {
- msgprint(__("Item table can not be blank"));
- validated = false;
- }
-}
-
-cur_frm.cscript.expense_account = function(doc, cdt, cdn) {
- erpnext.utils.copy_value_in_all_row(doc, cdt, cdn, "items", "expense_account");
-}
-
-cur_frm.cscript.cost_center = function(doc, cdt, cdn) {
- erpnext.utils.copy_value_in_all_row(doc, cdt, cdn, "items", "cost_center");
-}
-
-
-frappe.ui.form.on('Landed Cost Taxes and Charges', {
- amount: function(frm) {
- frm.cscript.calculate_amount();
- }
-})
-
-frappe.ui.form.on('Stock Entry Detail', {
- qty: function(frm, cdt, cdn) {
- frm.events.set_serial_no(frm, cdt, cdn);
- },
-
- s_warehouse: function(frm, cdt, cdn) {
- frm.events.set_serial_no(frm, cdt, cdn);
- },
- barcode: function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- if (d.barcode) {
- frappe.call({
- method: "erpnext.stock.get_item_details.get_item_code",
- args: {"barcode": d.barcode },
- callback: function(r) {
- if (!r.exe){
- frappe.model.set_value(cdt, cdn, "item_code", r.message);
- }
- }
- });
- }
- },
- uom: function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- if(d.uom && d.item_code){
- return frappe.call({
- method: "erpnext.stock.doctype.stock_entry.stock_entry.get_uom_details",
- args: {
- item_code: d.item_code,
- uom: d.uom,
- qty: d.qty
- },
- callback: function(r) {
- if(r.message) {
- frappe.model.set_value(cdt, cdn, r.message);
- }
- }
- });
- }
- },
- item_code: function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- if(d.item_code) {
- args = {
- 'item_code' : d.item_code,
- 'warehouse' : cstr(d.s_warehouse) || cstr(d.t_warehouse),
- 'transfer_qty' : d.transfer_qty,
- 'serial_no ' : d.serial_no,
- 'bom_no' : d.bom_no,
- 'expense_account' : d.expense_account,
- 'cost_center' : d.cost_center,
- 'company' : cur_frm.doc.company,
- 'qty' : d.qty
- };
- return frappe.call({
- doc: cur_frm.doc,
- method: "get_item_details",
- args: args,
- callback: function(r) {
- if(r.message) {
- var d = locals[cdt][cdn];
- $.each(r.message, function(k, v) {
- d[k] = v;
- });
- refresh_field("items");
- }
- }
- });
- }
- }
-})
-
-frappe.ui.form.on('Stock Entry', {
- company: function(doc, cdt, cdn) {
- if(doc.company) {
- var company_doc = frappe.get_doc(":Company", doc.company);
- if(company_doc.default_letter_head) {
- cur_frm.set_value("letter_head", company_doc.default_letter_head);
- }
- }
- },
- set_serial_no: function(doc, cdt, cdn) {
- var d = frappe.model.get_doc(cdt, cdn);
- if(!d.item_code && !d.s_warehouse && !d.qty) return;
- var args = {
- 'item_code' : d.item_code,
- 'warehouse' : cstr(d.s_warehouse),
- 'qty' : d.qty
- };
- frappe.call({
- method: "erpnext.stock.get_item_details.get_serial_no",
- args: {"args": args},
- callback: function(r) {
- if (!r.exe){
- frappe.model.set_value(cdt, cdn, "serial_no", r.message);
- }
- }
- });
- },
-})
+});
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json
index ccf28fd..e0833c5 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.json
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Title",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -110,7 +113,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Purpose",
@@ -140,7 +144,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -171,7 +176,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Production Order",
@@ -203,6 +209,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Order",
@@ -233,6 +240,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Delivery Note No",
@@ -264,6 +272,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Sales Invoice No",
@@ -293,6 +302,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Purchase Receipt No",
@@ -324,6 +334,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From BOM",
@@ -352,6 +363,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -381,7 +393,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -411,6 +424,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Posting Time",
@@ -441,6 +455,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
@@ -469,6 +484,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "BOM No",
@@ -499,6 +515,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "For Quantity",
@@ -528,6 +545,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -557,6 +575,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Use Multi-Level BOM",
@@ -585,6 +604,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Get Items",
@@ -613,6 +633,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -640,6 +661,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Default Source Warehouse",
@@ -670,6 +692,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -696,6 +719,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Default Target Warehouse",
@@ -726,6 +750,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -753,6 +778,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -784,6 +810,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Update Rate and Availability",
@@ -813,6 +840,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -840,6 +868,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Incoming Value",
@@ -869,6 +898,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -896,6 +926,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Outgoing Value",
@@ -925,6 +956,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Value Difference (Out - In)",
@@ -955,6 +987,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Costs",
@@ -983,6 +1016,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Additional Costs",
@@ -1012,6 +1046,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Additional Costs",
@@ -1042,6 +1077,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer or Supplier Details",
@@ -1070,6 +1106,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier",
@@ -1101,6 +1138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Name",
@@ -1131,6 +1169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Supplier Address",
@@ -1160,6 +1199,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1188,6 +1228,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -1219,6 +1260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -1249,6 +1291,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -1278,6 +1321,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Printing Settings",
@@ -1306,6 +1350,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Print Heading",
@@ -1336,6 +1381,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Letter Head",
@@ -1365,6 +1411,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -1392,7 +1439,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -1422,6 +1470,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Remarks",
@@ -1451,6 +1500,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1480,6 +1530,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Total Amount",
@@ -1508,6 +1559,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1538,6 +1590,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Credit Note",
@@ -1568,7 +1621,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:08:23.746175",
+ "modified": "2017-02-20 13:27:59.670920",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",
@@ -1584,7 +1637,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1605,7 +1657,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1626,7 +1677,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1647,7 +1697,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1663,8 +1712,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "posting_date, from_warehouse, to_warehouse, purpose, remarks",
+ "show_name_in_global_search": 1,
"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/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
index ed1843e..9b808f0 100644
--- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
+++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
@@ -10,6 +10,7 @@
"doctype": "DocType",
"document_type": "Other",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -22,7 +23,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Barcode",
"length": 0,
"no_copy": 0,
@@ -49,7 +52,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -74,8 +79,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Source Warehouse",
"length": 0,
"no_copy": 0,
@@ -104,7 +111,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -128,8 +137,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Target Warehouse",
"length": 0,
"no_copy": 0,
@@ -158,7 +169,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -182,8 +195,10 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -212,7 +227,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -237,7 +254,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
@@ -263,7 +282,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -290,7 +311,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
@@ -320,7 +343,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -346,7 +371,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
@@ -373,7 +400,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
@@ -401,7 +430,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
@@ -420,14 +451,16 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
- "columns": 1,
+ "columns": 3,
"fieldname": "qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Qty",
"length": 0,
"no_copy": 0,
@@ -448,14 +481,16 @@
"allow_on_submit": 0,
"bold": 1,
"collapsible": 0,
- "columns": 2,
+ "columns": 0,
"fieldname": "basic_rate",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
- "in_list_view": 1,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Basic Rate (as per Stock UOM)",
"length": 0,
"no_copy": 0,
@@ -484,7 +519,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Basic Amount",
"length": 0,
"no_copy": 0,
@@ -512,7 +549,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Additional Cost",
"length": 0,
"no_copy": 0,
@@ -540,7 +579,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -569,7 +610,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Valuation Rate",
"length": 0,
"no_copy": 0,
@@ -597,7 +640,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -622,7 +667,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "UOM",
"length": 0,
"no_copy": 0,
@@ -651,7 +698,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Conversion Factor",
"length": 0,
"no_copy": 0,
@@ -679,7 +728,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
@@ -708,7 +759,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Qty as per Stock UOM",
"length": 0,
"no_copy": 0,
@@ -736,7 +789,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Serial No / Batch",
"length": 0,
"no_copy": 0,
@@ -762,7 +817,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Serial No",
"length": 0,
"no_copy": 1,
@@ -790,7 +847,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -815,7 +874,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Batch No",
"length": 0,
"no_copy": 0,
@@ -844,7 +905,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Accounting",
"length": 0,
"no_copy": 0,
@@ -871,7 +934,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Difference Account",
"length": 0,
"no_copy": 0,
@@ -898,7 +963,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -925,7 +992,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
@@ -952,7 +1021,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "More Information",
"length": 0,
"no_copy": 0,
@@ -972,13 +1043,44 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "fieldname": "is_sample_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Is Sample Item",
+ "length": 0,
+ "no_copy": 1,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "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": 1,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
"fieldname": "actual_qty",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Actual Qty (at source/target)",
"length": 0,
"no_copy": 1,
@@ -1007,7 +1109,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "BOM No",
"length": 0,
"no_copy": 0,
@@ -1034,7 +1138,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -1060,7 +1166,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request",
"length": 0,
"no_copy": 1,
@@ -1087,7 +1195,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Material Request Item",
"length": 0,
"no_copy": 1,
@@ -1114,7 +1224,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-11-27 15:19:26.597414",
+ "modified": "2017-02-20 13:31:25.233622",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry Detail",
@@ -1123,6 +1233,8 @@
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
index 9d66d4d..41a1679 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -52,6 +53,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Posting Date",
@@ -81,6 +83,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Posting Time",
@@ -110,6 +113,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -136,6 +140,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -164,6 +169,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -192,6 +198,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -219,6 +226,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Items",
@@ -248,6 +256,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -276,6 +285,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Difference Account",
@@ -305,6 +315,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Cost Center",
@@ -333,6 +344,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Reconciliation JSON",
@@ -360,6 +372,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -387,6 +400,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Difference Amount",
@@ -417,7 +431,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2016-11-07 05:59:26.309341",
+ "modified": "2017-02-20 13:31:41.489372",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Reconciliation",
@@ -433,7 +447,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -449,7 +462,9 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "posting_date",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index ba303bb..a7480e8 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -117,6 +117,10 @@
if buying_rate:
row.valuation_rate = buying_rate
+ else:
+ # get valuation rate from Item
+ row.valuation_rate = frappe.get_value('Item', row.item_code, 'valuation_rate')
+
# throw all validation messages
if self.validation_messages:
for msg in self.validation_messages:
diff --git a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
index 5452aa1..4a19108 100644
--- a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
+++ b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.json
@@ -9,6 +9,7 @@
"doctype": "DocType",
"document_type": "Other",
"editable_grid": 1,
+ "engine": "InnoDB",
"fields": [
{
"allow_on_submit": 0,
@@ -21,7 +22,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Barcode",
"length": 0,
"no_copy": 0,
@@ -30,6 +33,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -47,7 +51,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Item Code",
"length": 0,
"no_copy": 0,
@@ -57,6 +63,7 @@
"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,
@@ -74,7 +81,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Item Name",
"length": 0,
"no_copy": 1,
@@ -83,6 +92,7 @@
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -100,7 +110,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
@@ -110,6 +122,7 @@
"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,
@@ -127,7 +140,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -135,6 +150,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,
@@ -153,7 +169,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Quantity",
"length": 0,
"no_copy": 0,
@@ -162,6 +180,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,
@@ -180,7 +199,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
+ "in_standard_filter": 0,
"label": "Valuation Rate",
"length": 0,
"no_copy": 0,
@@ -189,6 +210,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,
@@ -206,7 +228,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
@@ -215,6 +239,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -232,7 +257,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Before reconciliation",
"length": 0,
"no_copy": 0,
@@ -241,6 +268,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,
@@ -259,7 +287,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Current Qty",
"length": 0,
"no_copy": 0,
@@ -268,6 +298,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -285,7 +316,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -293,6 +326,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,
@@ -311,7 +345,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Current Valuation Rate",
"length": 0,
"no_copy": 0,
@@ -320,6 +356,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -338,7 +375,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Current Amount",
"length": 0,
"no_copy": 0,
@@ -347,6 +386,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -364,7 +404,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -372,6 +414,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,
@@ -389,7 +432,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Quantity Difference",
"length": 0,
"no_copy": 0,
@@ -398,6 +443,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,
@@ -415,7 +461,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -423,6 +471,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,
@@ -440,7 +489,9 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
+ "in_standard_filter": 0,
"label": "Amount Difference",
"length": 0,
"no_copy": 0,
@@ -449,6 +500,7 @@
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
+ "remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@@ -467,7 +519,7 @@
"istable": 1,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-09-28 06:43:53.764287",
+ "modified": "2017-02-20 13:32:09.827878",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Reconciliation Item",
@@ -477,7 +529,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/doctype/warehouse/warehouse.json b/erpnext/stock/doctype/warehouse/warehouse.json
index 477041f..9beea6c 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.json
+++ b/erpnext/stock/doctype/warehouse/warehouse.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse Detail",
@@ -50,6 +51,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse Name",
@@ -80,6 +82,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Is Group",
@@ -108,7 +111,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Company",
@@ -139,6 +143,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Disabled",
@@ -166,6 +171,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -195,6 +201,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Parent Account",
@@ -224,6 +231,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warehouse Contact Info",
@@ -251,6 +259,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Email Address",
@@ -280,6 +289,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Phone No",
@@ -310,6 +320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -340,6 +351,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -367,6 +379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address Line 1",
@@ -396,6 +409,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address Line 2",
@@ -425,6 +439,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "City",
@@ -454,6 +469,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "State",
@@ -483,6 +499,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "PIN",
@@ -512,6 +529,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Tree Details",
@@ -540,6 +558,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Parent Warehouse",
@@ -569,6 +588,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "lft",
@@ -597,6 +617,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "rgt",
@@ -625,6 +646,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Old Parent",
@@ -655,7 +677,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:06:39.128312",
+ "modified": "2017-02-20 13:27:03.696714",
"modified_by": "Administrator",
"module": "Stock",
"name": "Warehouse",
@@ -671,7 +693,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -692,7 +713,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -713,7 +733,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -734,7 +753,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -755,7 +773,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -776,7 +793,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 0,
"read": 1,
@@ -791,7 +807,10 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "search_fields": "",
+ "show_name_in_global_search": 1,
"sort_order": "DESC",
"title_field": "warehouse_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 0f1e30d..b9b11a8 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -73,7 +73,7 @@
out.update(get_pricing_rule_for_item(args))
- if args.get("doctype") in ("Sales Invoice", "Delivery Note"):
+ if args.get("doctype") in ("Sales Invoice", "Delivery Note") and out.qty > 0:
out.serial_no = get_serial_no(out)
if args.transaction_date and item.lead_time_days:
@@ -387,7 +387,8 @@
def get_bin_details_and_serial_nos(item_code, warehouse, qty=None, serial_no=None):
bin_details_and_serial_nos = {}
bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse))
- bin_details_and_serial_nos.update(get_serial_no_details(item_code, warehouse, qty, serial_no))
+ if qty > 0:
+ bin_details_and_serial_nos.update(get_serial_no_details(item_code, warehouse, qty, serial_no))
return bin_details_and_serial_nos
@frappe.whitelist()
diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.json b/erpnext/stock/report/serial_no_status/serial_no_status.json
index cb4e70d..99b99f7 100644
--- a/erpnext/stock/report/serial_no_status/serial_no_status.json
+++ b/erpnext/stock/report/serial_no_status/serial_no_status.json
@@ -7,8 +7,8 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}",
- "modified": "2016-12-05 18:49:31.424300",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_type\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_type\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}",
+ "modified": "2017-02-14 18:50:31.424300",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Status",
diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py
index a4cc512..10722cc 100644
--- a/erpnext/stock/stock_ledger.py
+++ b/erpnext/stock/stock_ledger.py
@@ -258,11 +258,14 @@
if not self.valuation_rate and actual_qty > 0:
self.valuation_rate = sle.incoming_rate
+
+ # Get valuation rate from previous SLE or Item master, if item is not a sample item
+ if not self.valuation_rate and sle.voucher_detail_no:
+ is_sample_item = self.check_if_sample_item(sle.voucher_type, sle.voucher_detail_no)
+ if not is_sample_item:
+ self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
+ sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
- if not self.valuation_rate:
- self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
- sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
-
def get_fifo_values(self, sle):
incoming_rate = flt(sle.incoming_rate)
actual_qty = flt(sle.actual_qty)
@@ -286,8 +289,13 @@
while qty_to_pop:
if not self.stock_queue:
# Get valuation rate from last sle if exists or from valuation rate field in item master
- _rate = get_valuation_rate(sle.item_code, sle.warehouse,
- sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
+ is_sample_item = self.check_if_sample_item(sle.voucher_type, sle.voucher_detail_no)
+ if not is_sample_item:
+ _rate = get_valuation_rate(sle.item_code, sle.warehouse,
+ sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
+ else:
+ _rate = 0
+
self.stock_queue.append([0, _rate])
index = None
@@ -333,7 +341,11 @@
if not self.stock_queue:
self.stock_queue.append([0, sle.incoming_rate or sle.outgoing_rate or self.valuation_rate])
-
+
+ def check_if_sample_item(self, voucher_type, voucher_detail_no):
+ ref_item_dt = voucher_type + (" Detail" if voucher_type == "Stock Entry" else " Item")
+ return frappe.db.get_value(ref_item_dt, voucher_detail_no, "is_sample_item")
+
def get_sle_before_datetime(self):
"""get previous stock ledger entry before current time-bucket"""
return get_stock_ledger_entries(self.args, "<", "desc", "limit 1", for_update=False)
@@ -432,7 +444,6 @@
if not allow_zero_rate and not valuation_rate \
and cint(frappe.db.get_value("Accounts Settings", None, "auto_accounting_for_stock")):
- 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}")
- .format(item_code, voucher_type, voucher_no))
+ frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a sample item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no))
return valuation_rate
diff --git a/erpnext/support/doctype/issue/issue.json b/erpnext/support/doctype/issue/issue.json
index 8994ef8..476e3a8 100644
--- a/erpnext/support/doctype/issue/issue.json
+++ b/erpnext/support/doctype/issue/issue.json
@@ -23,6 +23,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subject",
@@ -51,6 +52,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -78,7 +80,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Subject",
@@ -106,6 +109,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mins to First Response",
@@ -134,6 +138,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -161,6 +166,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -191,7 +197,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Raised By (Email)",
@@ -221,7 +228,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer",
@@ -252,6 +260,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Details",
@@ -281,6 +290,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -310,6 +320,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -338,6 +349,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolution Date",
@@ -367,6 +379,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "First Responded On",
@@ -394,6 +407,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -422,6 +436,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Lead",
@@ -450,6 +465,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -478,6 +494,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -504,7 +521,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -534,6 +552,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Project",
@@ -563,6 +582,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolution",
@@ -592,6 +612,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolution Details",
@@ -622,6 +643,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -650,6 +672,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opening Date",
@@ -679,6 +702,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Opening Time",
@@ -708,6 +732,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -736,6 +761,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Content Type",
@@ -763,6 +789,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Attachment",
@@ -792,7 +819,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-11-07 05:30:07.182340",
+ "modified": "2017-02-20 13:32:31.898423",
"modified_by": "Administrator",
"module": "Support",
"name": "Issue",
@@ -808,7 +835,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -824,8 +850,10 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,customer,subject,raised_by",
+ "show_name_in_global_search": 0,
"sort_order": "ASC",
"timeline_field": "customer",
"title_field": "subject",
+ "track_changes": 0,
"track_seen": 1
}
\ No newline at end of file
diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py
index f2d8bd5..a1f8077 100644
--- a/erpnext/support/doctype/issue/issue.py
+++ b/erpnext/support/doctype/issue/issue.py
@@ -81,9 +81,16 @@
st.save()
def auto_close_tickets():
- frappe.db.sql("""update `tabIssue` set status = 'Closed'
- where status = 'Replied'
- and date_sub(curdate(),interval 15 Day) > modified""")
+ """ auto close the replied support tickets after 7 days """
+ auto_close_after_days = frappe.db.get_value("Support Settings", "Support Settings", "close_issue_after_days") or 7
+
+ issues = frappe.db.sql(""" select name from tabIssue where status='Replied' and
+ modified<DATE_SUB(CURDATE(), INTERVAL %s DAY) """, (auto_close_after_days), as_dict=True)
+
+ for issue in issues:
+ doc = frappe.get_doc("Issue", issue.get("name"))
+ doc.status = "Closed"
+ doc.save(ignore_permissions=True)
@frappe.whitelist()
def set_multiple_status(names, status):
diff --git a/erpnext/schools/doctype/announcement/__init__.py b/erpnext/support/doctype/support_settings/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/announcement/__init__.py
copy to erpnext/support/doctype/support_settings/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/support/doctype/support_settings/support_settings.js
similarity index 77%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
copy to erpnext/support/doctype/support_settings/support_settings.js
index 5e0269b..1d1069d 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/support/doctype/support_settings/support_settings.js
@@ -1,7 +1,7 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Support Settings', {
refresh: function(frm) {
}
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json b/erpnext/support/doctype/support_settings/support_settings.json
similarity index 72%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
copy to erpnext/support/doctype/support_settings/support_settings.json
index f830abe..1ca03c7 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
+++ b/erpnext/support/doctype/support_settings/support_settings.json
@@ -1,10 +1,9 @@
{
"allow_copy": 0,
- "allow_import": 1,
+ "allow_import": 0,
"allow_rename": 0,
- "autoname": "field:evaluation_criteria",
"beta": 0,
- "creation": "2016-12-14 16:40:15.144115",
+ "creation": "2017-02-17 13:07:35.686409",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
@@ -17,15 +16,18 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "evaluation_criteria",
- "fieldtype": "Data",
+ "default": "7",
+ "description": "Auto close Issue after 7 days",
+ "fieldname": "close_issue_after_days",
+ "fieldtype": "Int",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Evaluation Criteria",
+ "label": "Close Issue After Days",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -35,7 +37,7 @@
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
- "reqd": 1,
+ "reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
@@ -48,13 +50,13 @@
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
- "issingle": 0,
+ "issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-14 16:40:36.351183",
+ "modified": "2017-02-17 13:07:46.049536",
"modified_by": "Administrator",
- "module": "Schools",
- "name": "Evaluation Criteria",
+ "module": "Support",
+ "name": "Support Settings",
"name_case": "",
"owner": "Administrator",
"permissions": [
@@ -65,15 +67,14 @@
"create": 1,
"delete": 1,
"email": 1,
- "export": 1,
+ "export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
- "report": 1,
- "role": "Academics User",
+ "report": 0,
+ "role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 0,
@@ -83,7 +84,9 @@
"quick_entry": 1,
"read_only": 0,
"read_only_onload": 0,
+ "show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
+ "track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/support/doctype/support_settings/support_settings.py
similarity index 86%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/support/doctype/support_settings/support_settings.py
index 85c1b32..bb3c53a 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/support/doctype/support_settings/support_settings.py
@@ -6,5 +6,5 @@
import frappe
from frappe.model.document import Document
-class EvaluationCriteria(Document):
+class SupportSettings(Document):
pass
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.json b/erpnext/support/doctype/warranty_claim/warranty_claim.json
index fde52ea..652927e 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.json
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.json
@@ -22,6 +22,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Series",
@@ -52,7 +53,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Status",
@@ -83,7 +85,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Issue Date",
@@ -113,6 +116,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -142,6 +146,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Serial No",
@@ -169,7 +174,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Customer",
@@ -200,6 +206,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -227,6 +234,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Issue",
@@ -256,6 +264,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item and Warranty Details",
@@ -284,7 +293,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Item Code",
@@ -316,6 +326,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Item Name",
@@ -346,6 +357,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Description",
@@ -376,6 +388,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -403,7 +416,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warranty / AMC Status",
@@ -432,6 +446,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Warranty Expiry Date",
@@ -459,6 +474,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "AMC Expiry Date",
@@ -487,6 +503,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolution",
@@ -515,7 +532,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolution Date",
@@ -544,7 +562,8 @@
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolved By",
@@ -575,6 +594,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Resolution Details",
@@ -605,6 +625,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Details",
@@ -634,6 +655,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Name",
@@ -661,6 +683,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Person",
@@ -690,6 +713,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact",
@@ -718,6 +742,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Mobile No",
@@ -746,6 +771,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Contact Email",
@@ -774,7 +800,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Territory",
@@ -807,6 +834,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Group",
@@ -835,6 +863,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -862,6 +891,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Customer Address",
@@ -891,6 +921,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Address",
@@ -920,6 +951,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Service Address",
@@ -949,6 +981,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "More Information",
@@ -976,7 +1009,8 @@
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
- "in_filter": 1,
+ "in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company",
@@ -1007,6 +1041,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"length": 0,
@@ -1034,6 +1069,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Raised By",
@@ -1063,6 +1099,7 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "From Company",
@@ -1092,6 +1129,7 @@
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
+ "in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
@@ -1124,7 +1162,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-12-15 14:53:43.384773",
+ "modified": "2017-02-20 13:33:02.669154",
"modified_by": "Administrator",
"module": "Support",
"name": "Warranty Claim",
@@ -1140,7 +1178,6 @@
"export": 0,
"if_owner": 0,
"import": 0,
- "is_custom": 0,
"permlevel": 0,
"print": 1,
"read": 1,
@@ -1156,9 +1193,11 @@
"read_only": 0,
"read_only_onload": 0,
"search_fields": "status,customer,customer_name,territory",
+ "show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"timeline_field": "customer",
"title_field": "customer_name",
+ "track_changes": 0,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/templates/generators/bom.html b/erpnext/templates/generators/bom.html
new file mode 100644
index 0000000..84b3aab
--- /dev/null
+++ b/erpnext/templates/generators/bom.html
@@ -0,0 +1,115 @@
+{% extends "templates/web.html" %}
+
+{% block title %} {{ title }} {% endblock %}
+
+{% block breadcrumbs %}
+ {% include "templates/includes/breadcrumbs.html" %}
+{% endblock %}
+
+{% block page_content %}
+{% from "erpnext/templates/includes/macros.html" import product_image %}
+{% from "erpnext/templates/includes/macros.html" import media_image %}
+<div class="bom-content" style="margin-top:20px;">
+ <div class="bom-page-content" itemscope itemtype="http://schema.org/Product">
+ <div class="row">
+ <div class="col-sm-12">
+ <h1 itemprop="name" style="margin-top: 0px;">{{ name }}</h1>
+
+ <p class="text-muted">
+ {{ _("Item") }}: <span itemprop="itemName">{{ item_name }}</span></p>
+ <br>
+
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-sm-4">
+ {{ media_image(website_image, item_name, "product-full-image") }}
+ <br>
+ </div>
+ <div class="col-sm-offset-1 col-sm-4">
+ <p>{{ _("Quantity") }}: <span itemprop="productID">{{ quantity }}</span></p>
+ <br>
+ </div>
+ </div>
+
+ {% if show_items -%}
+ <div class="row items" style="margin-top: 40px">
+ <div class="col-md-12">
+ <h3>{{ _("Items") }}</h3>
+ <hr>
+ {% for d in items -%}
+ <div class="row">
+ <div class="col-sm-4">{{ media_image(d.image, d.item_name, "product-full-image") }}</div>
+ <div class="col-sm-4"><div><b>{{ d.item_name }}</b></div>
+ {% if d.item_name != d.item_code -%}
+ <div class="text-muted">{{ d.item_code }}</div>
+ {%- endif %}
+ <br>
+ {{ d.description }}
+ </div>
+ <div class="col-sm-4">{{ _("Qty") }}: {{ d.qty }}</div>
+ </div>
+ <hr>
+ {%- endfor %}
+ </div>
+ </div>
+ {%- endif %}
+
+ {% if show_operations -%}
+ <div class="row operations" style="margin-top: 40px">
+ <div class="col-md-12">
+ <h3>{{ _("Operations") }}</h3>
+ <hr>
+ {% for d in operations -%}
+ <div class="row">
+ <div class="col-sm-3 bom-spec">{{ media_image(d.image, d.operation, "product-full-image") }}</div>
+ <div class="col-sm-3 bom-spec"><div>{{ d.operation }}</div>
+ <div class="text-muted">{{ d.description }}</div>
+ </div>
+
+ <div class="col-sm-3 bom-spec"><b>{{ _("Workstation") }}</b><br>{{ d.workstation }}</div>
+ <div class="col-sm-3 bom-spec"><b>{{ _("Time(in mins)") }}</b><br><div class="duration"><span class="duration-bar">
+ <span class="duration-value">{{ d.time_in_mins }}</span></span></div></div>
+ </div>
+ <hr>
+ {%- endfor %}
+ </div>
+ </div>
+ {%- endif %}
+
+ <div class="row" style="margin-top: 30px;">
+ <div class="col-sm-12">
+ <br>
+ <div class="h6 text-uppercase">{{ _("Description") }}</div>
+ <div itemprop="description" class="item-desc">
+ {{ web_long_description or _("No description given") }}</div>
+ <br>
+ </div>
+ </div>
+
+ </div>
+</div>
+<script>
+ frappe.ready(function() {
+ var max_width = $(".duration").width() * 0.8;
+ var durations = [];
+ $(".duration .duration-bar").each(function() {
+ durations.push($(this).find(".duration-value").html());
+ });
+ var max_duration = Math.max(...durations);
+ var width_factor = max_width/max_duration;
+
+ $(".duration .duration-bar").each(function() {
+ var duration = $(this).find(".duration-value").html();
+ $(this).width(duration * width_factor);
+ if($(this).width() < $(this).find(".duration-value").width()) {
+ var html = $($(this).html());
+ html.addClass("duration-bar");
+ html.addClass("bar-outer-text");
+ $(this).find(".duration-value").removeClass("duration-value").addClass("duration-invisible");
+ $(this).closest(".duration").append(html);
+ }
+ });
+ })
+</script>
+{% endblock %}
diff --git a/erpnext/templates/generators/job_opening.html b/erpnext/templates/generators/job_opening.html
index 5998e3f..f92e72e 100644
--- a/erpnext/templates/generators/job_opening.html
+++ b/erpnext/templates/generators/job_opening.html
@@ -15,7 +15,7 @@
{% endif %}
<p style='margin-top: 30px'>
<a class='btn btn-primary'
- href='/job_application?job_title={{ doc.name }}'>
+ href='/job_application?new=1&job_title={{ doc.name }}'>
{{ _("Apply Now") }}</a>
</p>
diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html
index 675b7af..863d48e 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -19,3 +19,17 @@
{%- endif %}
</div>
{% endmacro %}
+
+{% macro media_image(website_image, name, css_class="") %}
+ <div class="product-image sidebar-image-wrapper {{ css_class }}">
+ {% if not website_image -%}
+ <div class="sidebar-standard-image"> <div class="standard-image" style="background-color: rgb(250, 251, 252);">{{name}}</div> </div>
+ {%- endif %}
+ {% if website_image -%}
+ <a href="{{ frappe.utils.quoted(website_image) }}">
+ <img itemprop="image" src="{{ frappe.utils.quoted(website_image) | abs_url }}"
+ class="img-responsive img-thumbnail sidebar-image" style="min-height:100%; min-width:100%;">
+ </a>
+ {%- endif %}
+ </div>
+{% endmacro %}
diff --git a/erpnext/templates/pages/announcements.html b/erpnext/templates/pages/announcements.html
deleted file mode 100644
index d6e0d73..0000000
--- a/erpnext/templates/pages/announcements.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "templates/web.html" %}
-
-{% block header %}
- <h1> {{doc.subject}} </h1>
-{% endblock %}
-
-{% block page_content %}
-
-<p class="post-description"> {{doc.description}} </p>
-<p class="post-by text-muted small">
- {% for file in attached_files%}
- <a href="{{file.file_url}}" target="_new">{{file.file_name}}</a>
- <br>
- {% endfor %}
- <br>
- <i>{{ doc.posted_by }}</i>
- <i class="blog-dot"></i> {{ frappe.format_date(doc.modified) }}
-</p>
-
-{% endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/pages/announcements.py b/erpnext/templates/pages/announcements.py
deleted file mode 100644
index 4a61fc8..0000000
--- a/erpnext/templates/pages/announcements.py
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-def get_context(context):
- announcement = frappe.get_doc('Announcement', frappe.form_dict.announcement)
- context.no_cache = 1
- context.show_sidebar = True
- announcement.has_permission('read')
- context.doc = announcement
- attachments = frappe.db.sql("""select file_url, file_name from tabFile as file
- where file.attached_to_name=%s """,(announcement.name), as_dict = True)
-
- context.attached_files = attachments
-
-
diff --git a/erpnext/templates/pages/courses.py b/erpnext/templates/pages/courses.py
index 5b1410e..c80d8e7 100644
--- a/erpnext/templates/pages/courses.py
+++ b/erpnext/templates/pages/courses.py
@@ -15,14 +15,6 @@
course = frappe.get_doc('Course', frappe.form_dict.course)
course.has_permission('read')
context.doc = course
- portal_items = [{'reference_doctype': u'Topic', 'route': u"/topic?course=" + str(course.name), 'show_always': 0L, 'title': u'Topics'},
- {'reference_doctype': u'Discussion', 'route': u"/discussion?course=" + str(course.name), 'show_always': 0L, 'title': u'Discussions'},
-
- ]
-
- context.sidebar_items = portal_items
-
context.sidebar_title = sidebar_title
-
context.intro = course.course_intro
diff --git a/erpnext/templates/pages/discussions.html b/erpnext/templates/pages/discussions.html
deleted file mode 100644
index 28eb01f..0000000
--- a/erpnext/templates/pages/discussions.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends "templates/web.html" %}
-
-{% block header %}
- <h2> {{doc.subject}} </h2>
- <p> {{doc.description}} </p>
- <p class="text-muted small">Started by: {{doc.owner}} </p>
-{% endblock %}
-
-{% block page_content %}
-
-<div>
- {% include 'templates/includes/comments/comments.html' %}
-</div>
-
-{% endblock %}
diff --git a/erpnext/templates/pages/discussions.py b/erpnext/templates/pages/discussions.py
deleted file mode 100644
index 22a1bef..0000000
--- a/erpnext/templates/pages/discussions.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.website.utils import get_comment_list
-
-def get_context(context):
- context.doc = frappe.get_doc('Discussion', frappe.form_dict.discussion)
- portal_items = [{'reference_doctype': u'Topic', 'route': u"/topic?course=" + str(context.doc.course), 'show_always': 0L, 'title': u'Topics'},
- {'reference_doctype': u'Discussion', 'route': u"/discussion?course=" + str(context.doc.course), 'show_always': 0L, 'title': u'Discussions'},
-
- ]
- context.show_sidebar = True
- context.sidebar_items = portal_items
- context.no_cache = 1
- context.doc.has_permission('read')
- context.sidebar_title = context.doc.course
- context.reference_doctype = "Discussion"
- context.reference_name = context.doc.name
- context.comment_list = get_comment_list(context.doc.doctype,context.doc.name)
\ No newline at end of file
diff --git a/erpnext/templates/pages/home.html b/erpnext/templates/pages/home.html
index b91cd73..750fa38 100644
--- a/erpnext/templates/pages/home.html
+++ b/erpnext/templates/pages/home.html
@@ -18,7 +18,7 @@
<a class="product-link" href="{{ item.route|abs_url }}">
<div class="col-sm-4 col-xs-4 product-image-wrapper">
<div class="product-image-img">
- {{ product_image_square(item.thumbnail or item.image) }}
+ {{ product_image_square(item.thumbnail or item.image) }}
<div class="product-text" itemprop="name">{{ item.item_name }}</div>
</div>
</div>
diff --git a/erpnext/templates/pages/topics.html b/erpnext/templates/pages/topics.html
deleted file mode 100644
index 94d7a17..0000000
--- a/erpnext/templates/pages/topics.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{% extends "templates/web.html" %}
-
-
-{% block header %}
- <h2> {{ doc.introduction }} </h1>
-{% endblock %}
-
-{% block page_content %}
-
-<p class="post-description"> {{ doc.content }} </p>
-
-{% endblock %}
\ No newline at end of file
diff --git a/erpnext/templates/pages/topics.py b/erpnext/templates/pages/topics.py
deleted file mode 100644
index 8a55b64..0000000
--- a/erpnext/templates/pages/topics.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-
-def get_context(context):
- topic = frappe.get_doc('Topic', frappe.form_dict.topic)
- context.no_cache = 1
- context.show_sidebar = True
- context.doc = topic
- attachments = frappe.db.sql("""select file_url, file_name from tabFile as file
- where file.attached_to_name=%s """,(topic.name), as_dict = True)
-
- context.attached_files = attachments
diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py
index c1405c3..81dbdc9 100644
--- a/erpnext/templates/utils.py
+++ b/erpnext/templates/utils.py
@@ -9,47 +9,50 @@
@frappe.whitelist(allow_guest=True)
def send_message(subject="Website Query", message="", sender="", status="Open"):
- from frappe.www.contact import send_message as website_send_message
- lead = customer = None
+ from frappe.www.contact import send_message as website_send_message
+ lead = customer = None
- website_send_message(subject, message, sender)
+ website_send_message(subject, message, sender)
- customer = frappe.db.get_value('Contact', dict(email_id=sender), 'customer')
- if not customer:
- lead = frappe.db.get_value('Lead', dict(email_id=sender))
- if not lead:
- new_lead = frappe.get_doc(dict(
- doctype='Lead',
- email_id = sender,
- lead_name = sender.split('@')[0].title()
- )).insert(ignore_permissions=True)
+ customer = frappe.db.sql("""select distinct dl.link_name from `tabDynamic Link` dl
+ left join `tabContact` c on dl.parent=c.name where dl.link_doctype='Customer'
+ and c.email_id='{email_id}'""".format(email_id=sender))
- opportunity = frappe.get_doc(dict(
- doctype='Opportunity',
- enquiry_from = 'Customer' if customer else 'Lead',
- status = 'Open',
- title = subject,
- to_discuss=message
- ))
+ if not customer:
+ lead = frappe.db.get_value('Lead', dict(email_id=sender))
+ if not lead:
+ new_lead = frappe.get_doc(dict(
+ doctype='Lead',
+ email_id = sender,
+ lead_name = sender.split('@')[0].title()
+ )).insert(ignore_permissions=True)
- if customer:
- opportunity.customer = customer
- elif lead:
- opportunity.lead = lead
- else:
- opportunity.lead = new_lead.name
+ opportunity = frappe.get_doc(dict(
+ doctype='Opportunity',
+ enquiry_from = 'Customer' if customer else 'Lead',
+ status = 'Open',
+ title = subject,
+ to_discuss=message
+ ))
- opportunity.insert(ignore_permissions=True)
+ if customer:
+ opportunity.customer = customer[0][0]
+ elif lead:
+ opportunity.lead = lead
+ else:
+ opportunity.lead = new_lead.name
- comm = frappe.get_doc({
- "doctype":"Communication",
- "subject": subject,
- "content": message,
- "sender": sender,
- "sent_or_received": "Received",
- 'reference_doctype': 'Opportunity',
- 'reference_name': opportunity.name
- })
- comm.insert(ignore_permissions=True)
+ opportunity.insert(ignore_permissions=True)
- return "okay"
+ comm = frappe.get_doc({
+ "doctype":"Communication",
+ "subject": subject,
+ "content": message,
+ "sender": sender,
+ "sent_or_received": "Received",
+ 'reference_doctype': 'Opportunity',
+ 'reference_name': opportunity.name
+ })
+ comm.insert(ignore_permissions=True)
+
+ return "okay"
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index bba21e6..b94061c 100644
--- a/erpnext/utilities/__init__.py
+++ b/erpnext/utilities/__init__.py
@@ -1,6 +1,7 @@
## temp utility
import frappe
+from erpnext.utilities.activation import get_level
def update_doctypes():
for d in frappe.db.sql("""select df.parent, df.fieldname
@@ -29,5 +30,6 @@
return {
'company': company,
- 'domain': domain
+ 'domain': domain,
+ 'activation': get_level()
}
diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py
new file mode 100644
index 0000000..563f71e
--- /dev/null
+++ b/erpnext/utilities/activation.py
@@ -0,0 +1,36 @@
+import frappe
+
+def get_level():
+ activation_level = 0
+ if frappe.db.get_single_value('System Settings', 'setup_complete'):
+ activation_level = 1
+
+ if frappe.db.count('Item') > 5:
+ activation_level += 1
+
+ if frappe.db.count('Customer') > 5:
+ activation_level += 1
+
+ if frappe.db.count('Sales Order') > 2:
+ activation_level += 1
+
+ if frappe.db.count('Purchase Order') > 2:
+ activation_level += 1
+
+ if frappe.db.count('Employee') > 3:
+ activation_level += 1
+
+ if frappe.db.count('Payment Entry') > 2:
+ activation_level += 1
+
+ if frappe.db.count('Communication', dict(communication_medium='Email')) > 10:
+ activation_level += 1
+
+ if frappe.db.count('User') > 5:
+ activation_level += 1
+
+ # recent login
+ if frappe.db.sql('select name from tabUser where last_login > date_sub(now(), interval 2 day) limit 1'):
+ activation_level += 1
+
+ return activation_level
\ No newline at end of file
diff --git a/erpnext/utilities/address_and_contact.py b/erpnext/utilities/address_and_contact.py
deleted file mode 100644
index 12ceb5b..0000000
--- a/erpnext/utilities/address_and_contact.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-import frappe
-
-def load_address_and_contact(doc, key):
- """Loads address list and contact list in `__onload`"""
- from frappe.geo.doctype.address.address import get_address_display
-
- address_list = [frappe.get_value('Address', a.parent, '*')
- for a in frappe.get_all('Dynamic Link', fields='parent',
- filters=dict(parenttype='Address', link_doctype=doc.doctype, link_name=doc.name))]
-
- address_list = [a.update({"display": get_address_display(a)})
- for a in address_list]
-
- address_list = sorted(address_list,
- lambda a, b:
- (int(a.is_primary_address - b.is_primary_address)) or
- (1 if a.modified - b.modified else 0))
-
- doc.set_onload('addr_list', address_list)
-
- if doc.doctype != "Lead":
- contact_list = [frappe.get_value('Contact', a.parent, '*')
- for a in frappe.get_all('Dynamic Link', fields='parent',
- filters=dict(parenttype='Contact', link_doctype=doc.doctype, link_name=doc.name))]
-
- contact_list = sorted(contact_list,
- lambda a, b:
- (int(a.is_primary_contact - b.is_primary_contact)) or
- (1 if a.modified - b.modified else 0))
-
- doc.set_onload('contact_list', contact_list)
-
-def set_default_role(doc, method):
- '''Set customer, supplier, student based on email'''
- if frappe.flags.setting_role:
- return
- contact_name = frappe.get_value('Contact', dict(email_id=doc.email))
- if contact_name:
- contact = frappe.get_doc('Contact', contact_name)
- for link in contact.links:
- frappe.flags.setting_role = True
- if link.link_doctype=='Customer':
- doc.add_roles('Customer')
- elif link.link_doctype=='Supplier':
- doc.add_roles('Supplier')
- elif frappe.get_value('Student', dict(student_email_id=doc.email)):
- doc.add_roles('Student')
-
-def has_permission(doc, ptype, user):
- links = get_permitted_and_not_permitted_links(doc.doctype)
- if not links.get("not_permitted_links"):
- # optimization: don't determine permissions based on link fields
- return True
-
- # True if any one is True or all are empty
- names = []
- for df in (links.get("permitted_links") + links.get("not_permitted_links")):
- doctype = df.options
- name = doc.get(df.fieldname)
- names.append(name)
-
- if name and frappe.has_permission(doctype, ptype, doc=name):
- return True
-
- if not any(names):
- return True
- return False
-
-def get_permission_query_conditions_for_contact(user):
- return get_permission_query_conditions("Contact")
-
-def get_permission_query_conditions_for_address(user):
- return get_permission_query_conditions("Address")
-
-def get_permission_query_conditions(doctype):
- links = get_permitted_and_not_permitted_links(doctype)
-
- if not links.get("not_permitted_links"):
- # when everything is permitted, don't add additional condition
- return ""
-
- elif not links.get("permitted_links"):
- conditions = []
-
- # when everything is not permitted
- for df in links.get("not_permitted_links"):
- # like ifnull(customer, '')='' and ifnull(supplier, '')=''
- conditions.append("ifnull(`tab{doctype}`.`{fieldname}`, '')=''".format(doctype=doctype, fieldname=df.fieldname))
-
- return "( " + " and ".join(conditions) + " )"
-
- else:
- conditions = []
-
- for df in links.get("permitted_links"):
- # like ifnull(customer, '')!='' or ifnull(supplier, '')!=''
- conditions.append("ifnull(`tab{doctype}`.`{fieldname}`, '')!=''".format(doctype=doctype, fieldname=df.fieldname))
-
- return "( " + " or ".join(conditions) + " )"
-
-def get_permitted_and_not_permitted_links(doctype):
- permitted_links = []
- not_permitted_links = []
-
- meta = frappe.get_meta(doctype)
-
- for df in meta.get_link_fields():
- if df.options not in ("Customer", "Supplier", "Company", "Sales Partner"):
- continue
-
- if frappe.has_permission(df.options):
- permitted_links.append(df)
- else:
- not_permitted_links.append(df)
-
- return {
- "permitted_links": permitted_links,
- "not_permitted_links": not_permitted_links
- }
-
-def delete_contact_and_address(doctype, name):
- for parenttype in ('Contact', 'Address'):
- items = frappe.db.sql("""select parent from `tabDynamic Link`
- where parenttype=%s and link_doctype=%s and link_name=%s""",
- (parenttype, doctype, name))
-
- for name in items:
- doc = frappe.get_doc(parenttype, name)
- if len(doc.links)==1:
- doc.delete()