From 8ac56b26e06ec30d7541bbdb7f4d325bd49c6d66 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 29 Sep 2017 16:15:15 +0530 Subject: [PATCH 01/85] [Enhancement] Allow Multiple users in POS Profile --- .../doctype/pos_profile/pos_profile.json | 99 ++++++++++++++++++- .../doctype/pos_profile/pos_profile.py | 43 +++++++- .../add_user_to_child_table_in_pos_profile.py | 21 ++++ .../page/point_of_sale/point_of_sale.js | 61 +++++++++--- 4 files changed, 207 insertions(+), 17 deletions(-) create mode 100644 erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index 187454ef33..a7c2c3df37 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, - "autoname": "hash", + "autoname": "field:pos_profile_name", "beta": 0, "creation": "2013-05-24 12:15:51", "custom": 0, @@ -11,6 +11,36 @@ "doctype": "DocType", "editable_grid": 0, "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "pos_profile_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": "POS Profile 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_bulk_edit": 0, "allow_on_submit": 0, @@ -416,6 +446,67 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 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": "Applicable for Users", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "applicable_for_users", + "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": "Applicable for Users", + "length": 0, + "no_copy": 0, + "options": "POS Profile User", + "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_bulk_edit": 0, "allow_on_submit": 0, @@ -1322,8 +1413,8 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-09-01 15:55:14.890452", - "modified_by": "Administrator", + "modified": "2017-09-29 14:39:22.280700", + "modified_by": "faris@erpnext.com", "module": "Accounts", "name": "POS Profile", "owner": "Administrator", @@ -1375,7 +1466,7 @@ "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", - "title_field": "user", + "title_field": "pos_profile_name", "track_changes": 0, "track_seen": 0 } \ No newline at end of file diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 8d6a2db470..3e3728592c 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -11,7 +11,7 @@ from frappe.model.document import Document class POSProfile(Document): def validate(self): - self.check_for_duplicate() + # self.check_for_duplicate() self.validate_all_link_fields() self.validate_duplicate_groups() self.check_default_payment() @@ -94,3 +94,44 @@ class POSProfile(Document): @frappe.whitelist() def get_series(): return frappe.get_meta("Sales Invoice").get_field("naming_series").options or "" + +@frappe.whitelist() +def get_pos_profiles_for_user(user=None): + out = [] + if not user: + user = frappe.session.user + + res = frappe.db.sql(''' + select + parent + from + `tabPOS Profile User` + where + user = %s + ''', (user), as_dict=1) + + if not res: + company = frappe.defaults.get_user_default('company') + res = frappe.db.sql(''' + select + pos_profile_name + from + `tabPOS Profile` + where + company = %s + ''', (company), as_dict=1) + + out = [r.pos_profile_name for r in res] + + return out + + for r in res: + name = frappe.db.get_value('POS Profile', r.parent, 'pos_profile_name') + out.append(name) + + return out + +@frappe.whitelist() +def get_pos_profile(pos_profile_name): + name = frappe.db.get_value('POS Profile', { 'pos_profile_name': pos_profile_name }) + return frappe.get_doc('POS Profile', name) diff --git a/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py b/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py new file mode 100644 index 0000000000..b2093c6c6f --- /dev/null +++ b/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py @@ -0,0 +1,21 @@ +# Copyright (c) 2017, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + doctype = 'POS Profile' + frappe.reload_doctype(doctype) + + for doc in frappe.get_all(doctype): + _doc = frappe.get_doc(doctype, doc.name) + user = frappe.db.get_value(doctype, doc.name, 'user') + + if not user: continue + + _doc.append('applicable_for_users', { + 'user': user + }) + _doc.pos_profile_name = user + ' - ' + _doc.company + _doc.save() diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 1b67ff2b72..a8093fd4f1 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -261,20 +261,57 @@ erpnext.pos.PointOfSale = class PointOfSale { } setup_pos_profile() { - return frappe.call({ - method: 'erpnext.stock.get_item_details.get_pos_profile', - args: { - company: frappe.sys_defaults.company - } - }).then(r => { - this.pos_profile = r.message; + return new Promise((resolve) => { + const on_submit = ({ pos_profile }) => { + this.get_pos_profile_doc(pos_profile) + .then(doc => { + this.pos_profile = doc; - if (!this.pos_profile) { - this.pos_profile = { - currency: frappe.defaults.get_default('currency'), - selling_price_list: frappe.defaults.get_default('selling_price_list') - }; + if (!this.pos_profile) { + this.pos_profile = { + currency: frappe.defaults.get_default('currency'), + selling_price_list: frappe.defaults.get_default('selling_price_list') + }; + } + + resolve(); + }); } + + frappe.call({ + method: 'erpnext.accounts.doctype.pos_profile.pos_profile.get_pos_profiles_for_user' + }) + .then((r) => { + if (r && r.message) { + const pos_profiles = r.message; + + if(pos_profiles.length === 1) { + // load profile directly + on_submit({pos_profile: pos_profiles[0]}); + } else { + // ask prompt + frappe.prompt( + [{ fieldtype: 'Select', label: 'POS Profile', options: pos_profiles }], + on_submit, + __('Select POS Profile') + ) + } + } + }); + }); + } + + get_pos_profile_doc(pos_profile_name) { + return new Promise(resolve => { + frappe.call({ + method: 'erpnext.accounts.doctype.pos_profile.pos_profile.get_pos_profile', + args: { + pos_profile_name + }, + callback: (r) => { + resolve(r.message); + } + }); }); } From bbce7b7e5d436ea1f9cee4d17ef0272ff501f598 Mon Sep 17 00:00:00 2001 From: tunde Date: Thu, 26 Oct 2017 14:30:18 +0100 Subject: [PATCH 02/85] get attribute with get method --- erpnext/stock/doctype/item/item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 4b4f15bf41..bf8eaba0a2 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -57,7 +57,7 @@ class Item(WebsiteGenerator): if not self.description: self.description = self.item_name - if self.is_sales_item and not self.is_item_from_hub: + if self.is_sales_item and not self.get('is_item_from_hub'): self.publish_in_hub = 1 def after_insert(self): From 8c1099d2362bbf25a093d34666b2e7e4391729af Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 27 Oct 2017 16:48:07 +0530 Subject: [PATCH 03/85] Add POS Profile User DocType --- .../doctype/pos_profile_user/__init__.py | 0 .../pos_profile_user/pos_profile_user.js | 8 ++ .../pos_profile_user/pos_profile_user.json | 93 +++++++++++++++++++ .../pos_profile_user/pos_profile_user.py | 10 ++ 4 files changed, 111 insertions(+) create mode 100644 erpnext/accounts/doctype/pos_profile_user/__init__.py create mode 100644 erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js create mode 100644 erpnext/accounts/doctype/pos_profile_user/pos_profile_user.json create mode 100644 erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py diff --git a/erpnext/accounts/doctype/pos_profile_user/__init__.py b/erpnext/accounts/doctype/pos_profile_user/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js new file mode 100644 index 0000000000..2f482d6952 --- /dev/null +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js @@ -0,0 +1,8 @@ +// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('POS Profile User', { + refresh: function(frm) { + + } +}); diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.json b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.json new file mode 100644 index 0000000000..22c7f722e2 --- /dev/null +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.json @@ -0,0 +1,93 @@ +{ + "allow_copy": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2017-10-27 16:46:06.060930", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "user", + "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": "User", + "length": 0, + "no_copy": 0, + "options": "User", + "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 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2017-10-27 16:46:12.784244", + "modified_by": "Administrator", + "module": "Accounts", + "name": "POS Profile User", + "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 + } + ], + "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/pos_profile_user/pos_profile_user.py b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py new file mode 100644 index 0000000000..755b1e99ff --- /dev/null +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, 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 POSProfileUser(Document): + pass From e741b91f1def90380ec61d3b2a43036c4add5c98 Mon Sep 17 00:00:00 2001 From: ci2014 Date: Mon, 30 Oct 2017 05:43:05 +0100 Subject: [PATCH 04/85] Update issue.js (#11381) Make the close / reopen button more flexible for customized user status. For example, if the user has several status, it will now show the Close button every time the ticket is not closed! It will show Reopen only, if the ticket is closed, and not if it's on hold for example. This will make it more flexible. --- erpnext/support/doctype/issue/issue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/support/doctype/issue/issue.js b/erpnext/support/doctype/issue/issue.js index 306736f3dc..77c59f4edc 100644 --- a/erpnext/support/doctype/issue/issue.js +++ b/erpnext/support/doctype/issue/issue.js @@ -4,7 +4,7 @@ frappe.ui.form.on("Issue", { }, "refresh": function(frm) { - if(frm.doc.status==="Open") { + if(frm.doc.status!=="Closed") { frm.add_custom_button(__("Close"), function() { frm.set_value("status", "Closed"); frm.save(); From 79be8f969fe9501bc7155226f96d7fed954e5ebf Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 30 Oct 2017 14:46:09 +0530 Subject: [PATCH 05/85] Add to patches.txt --- erpnext/patches.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e75c490a36..1e9d529b30 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -448,3 +448,4 @@ erpnext.patches.v8_9.remove_employee_from_salary_structure_parent erpnext.patches.v8_9.delete_gst_doctypes_for_outside_india_accounts erpnext.patches.v8_9.set_default_fields_in_variant_settings erpnext.patches.v8_9.update_billing_gstin_for_indian_account +erpnext.patches.v9_0.add_user_to_child_table_in_pos_profile From 895aa7b7ac8aeccccb59f9ebd0e81d5bab617d6c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 30 Oct 2017 17:12:50 +0530 Subject: [PATCH 06/85] fix codacy --- .../doctype/pos_profile_user/pos_profile_user.js | 2 -- .../doctype/pos_profile_user/pos_profile_user.py | 1 - .../selling/page/point_of_sale/point_of_sale.js | 16 +++++++--------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js index 2f482d6952..f0884ebef5 100644 --- a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.js @@ -2,7 +2,5 @@ // For license information, please see license.txt frappe.ui.form.on('POS Profile User', { - refresh: function(frm) { - } }); diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py index 755b1e99ff..d77cddea61 100644 --- a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py @@ -3,7 +3,6 @@ # For license information, please see license.txt from __future__ import unicode_literals -import frappe from frappe.model.document import Document class POSProfileUser(Document): diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 6f1cd9ff5e..ee6a633fac 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -290,21 +290,19 @@ erpnext.pos.PointOfSale = class PointOfSale { this.pos_profile = doc; if (!this.pos_profile) { - this.pos_profile = { - company: this.company, - currency: frappe.defaults.get_default('currency'), - selling_price_list: frappe.defaults.get_default('selling_price_list') - }; - } - + this.pos_profile = { + company: this.company, + currency: frappe.defaults.get_default('currency'), + selling_price_list: frappe.defaults.get_default('selling_price_list') + }; + } resolve(); }); } frappe.call({ method: 'erpnext.accounts.doctype.pos_profile.pos_profile.get_pos_profiles_for_user' - }) - .then((r) => { + }).then((r) => { if (r && r.message) { const pos_profiles = r.message; From 6b26e391b8036b1910a421f2fd86bb978dca282c Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Tue, 31 Oct 2017 12:58:48 +0530 Subject: [PATCH 07/85] use the new frappe charts :D (#11391) --- .eslintrc | 3 ++- .../accounts_receivable/accounts_receivable.py | 12 +++++++----- .../production_analytics/production_analytics.js | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.eslintrc b/.eslintrc index c9cd552cd1..4dd1216853 100644 --- a/.eslintrc +++ b/.eslintrc @@ -132,6 +132,7 @@ "get_url_arg": true, "get_server_fields": true, "set_multiple": true, - "QUnit": true + "QUnit": true, + "Chart": true } } diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 56db392800..ba5b7f2d4a 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -309,14 +309,16 @@ class ReceivablePayableReport(object): rows = [] for d in data: - rows.append(d[self.ageing_col_idx_start : self.ageing_col_idx_start+4]) - - if rows: - rows.insert(0, [[d.get("label")] for d in ageing_columns]) + rows.append( + { + 'values': d[self.ageing_col_idx_start : self.ageing_col_idx_start+4] + } + ) return { "data": { - 'labels': rows + 'labels': [d.get("label") for d in ageing_columns], + 'datasets': rows }, "type": 'percentage' } diff --git a/erpnext/manufacturing/page/production_analytics/production_analytics.js b/erpnext/manufacturing/page/production_analytics/production_analytics.js index 39168b7206..efbd0a5f63 100644 --- a/erpnext/manufacturing/page/production_analytics/production_analytics.js +++ b/erpnext/manufacturing/page/production_analytics/production_analytics.js @@ -64,7 +64,7 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({ var chart_data = this.get_chart_data ? this.get_chart_data() : null; - this.chart = new frappe.chart.FrappeChart({ + this.chart = new Chart({ parent: ".chart", data: chart_data, type: 'line' From 21f946f3655dcd2dd50c5eaf42e1d5bef7778a26 Mon Sep 17 00:00:00 2001 From: KanchanChauhan Date: Tue, 31 Oct 2017 12:59:45 +0530 Subject: [PATCH 08/85] [Minor] Source Warehouse should be filtered by Company in Production Order (#11376) --- .../doctype/production_order/production_order.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index c3e6f20b64..226ebfc6bb 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.js +++ b/erpnext/manufacturing/doctype/production_order/production_order.js @@ -17,6 +17,14 @@ frappe.ui.form.on("Production Order", { } }); + frm.set_query("source_warehouse", function() { + return { + filters: { + 'company': frm.doc.company, + } + } + }); + frm.set_query("source_warehouse", "required_items", function() { return { filters: { From 40611e4f69ddeffcfe005ab3348fa0acb98cfeb6 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 31 Oct 2017 13:00:09 +0530 Subject: [PATCH 09/85] [fix] hub get_item_details (#11383) --- erpnext/hub_node/__init__.py | 4 +++- erpnext/hub_node/page/hub/hub.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/hub_node/__init__.py b/erpnext/hub_node/__init__.py index 686fe8d202..8efbed8f7e 100644 --- a/erpnext/hub_node/__init__.py +++ b/erpnext/hub_node/__init__.py @@ -34,7 +34,9 @@ def get_categories(): return response @frappe.whitelist() -def get_item_details(hub_sync_id): +def get_item_details(hub_sync_id=None): + if not hub_sync_id: + return connection = get_connection() return connection.get_doc('Hub Item', hub_sync_id) diff --git a/erpnext/hub_node/page/hub/hub.js b/erpnext/hub_node/page/hub/hub.js index 143f55444f..297a4d1291 100644 --- a/erpnext/hub_node/page/hub/hub.js +++ b/erpnext/hub_node/page/hub/hub.js @@ -382,6 +382,7 @@ erpnext.hub.Hub = class Hub { }, method: "erpnext.hub_node.get_item_details", callback: (r) => { + if (!r || !r.message) return; let item = r.message; this.item_cache[item_code] = item; this.render_item_page(item); From 160e710ebf6e3d5e24d852f8688c24feb8abea8f Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Tue, 31 Oct 2017 13:04:02 +0530 Subject: [PATCH 10/85] set bank account only if there is single bank type account (#11363) * set bank account only if there is single bank type account * Update journal_entry.py --- .../accounts/doctype/journal_entry/journal_entry.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 790003c301..6864305c44 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -569,14 +569,18 @@ def get_default_bank_cash_account(company, account_type=None, mode_of_payment=No if account_type=="Bank": account = frappe.db.get_value("Company", company, "default_bank_account") if not account: - account = frappe.db.get_value("Account", - {"company": company, "account_type": "Bank", "is_group": 0}) + account_list = frappe.get_all("Account", filters = {"company": company, + "account_type": "Bank", "is_group": 0}) + if len(account_list) > 0: + account = account_list[0].name elif account_type=="Cash": account = frappe.db.get_value("Company", company, "default_cash_account") if not account: - account = frappe.db.get_value("Account", - {"company": company, "account_type": "Cash", "is_group": 0}) + account_list = frappe.get_all("Account", filters = {"company": company, + "account_type": "Cash", "is_group": 0}) + if len(account_list) > 0: + account = account_list[0].name if account: account_details = frappe.db.get_value("Account", account, From 6d41a9a647c5f006fb66d072a0d3a45f9c0e8f95 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Tue, 31 Oct 2017 13:10:55 +0530 Subject: [PATCH 11/85] Converting Task to a Tree structure (#11117) * added support for tree view * nestedset added to handle tree based structure * treeview ui added * removed is_group dependency * added validation while editing a group-task * codacy fix * BOM like filter added * Added ui-test for treeview-task --- erpnext/config/projects.py | 1 + erpnext/projects/doctype/task/task.js | 80 +++++--- erpnext/projects/doctype/task/task.json | 185 +++++++++++++++++- erpnext/projects/doctype/task/task.py | 69 ++++++- erpnext/projects/doctype/task/task_tree.js | 59 ++++++ .../doctype/task/{ => tests}/test_task.js | 0 .../doctype/task/tests/test_task_tree.js | 99 ++++++++++ erpnext/tests/ui/tests.txt | 1 + 8 files changed, 457 insertions(+), 37 deletions(-) create mode 100644 erpnext/projects/doctype/task/task_tree.js rename erpnext/projects/doctype/task/{ => tests}/test_task.js (100%) create mode 100644 erpnext/projects/doctype/task/tests/test_task_tree.js diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index a8514b26ff..b97e097f08 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -15,6 +15,7 @@ def get_data(): { "type": "doctype", "name": "Task", + "route": "Tree/Task", "description": _("Project activity / task."), }, { diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js index df38cfe1bd..b8f324a85f 100644 --- a/erpnext/projects/doctype/task/task.js +++ b/erpnext/projects/doctype/task/task.js @@ -19,38 +19,47 @@ frappe.ui.form.on("Task", { }, refresh: function(frm) { - var doc = frm.doc; - if(doc.__islocal) { - if(!frm.doc.exp_end_date) { - frm.set_value("exp_end_date", frappe.datetime.add_days(new Date(), 7)); + frm.fields_dict['parent_task'].get_query = function() { + return { + filters: { + "is_group": 1, + } } } - - if(!doc.__islocal) { - if(frappe.model.can_read("Timesheet")) { - frm.add_custom_button(__("Timesheet"), function() { - frappe.route_options = {"project": doc.project, "task": doc.name} - frappe.set_route("List", "Timesheet"); - }, __("View"), true); - } - if(frappe.model.can_read("Expense Claim")) { - frm.add_custom_button(__("Expense Claims"), function() { - frappe.route_options = {"project": doc.project, "task": doc.name} - frappe.set_route("List", "Expense Claim"); - }, __("View"), true); + if(!frm.is_group){ + var doc = frm.doc; + if(doc.__islocal) { + if(!frm.doc.exp_end_date) { + frm.set_value("exp_end_date", frappe.datetime.add_days(new Date(), 7)); + } } - if(frm.perm[0].write) { - if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") { - frm.add_custom_button(__("Close"), function() { - frm.set_value("status", "Closed"); - frm.save(); - }); - } else { - frm.add_custom_button(__("Reopen"), function() { - frm.set_value("status", "Open"); - frm.save(); - }); + if(!doc.__islocal) { + if(frappe.model.can_read("Timesheet")) { + frm.add_custom_button(__("Timesheet"), function() { + frappe.route_options = {"project": doc.project, "task": doc.name} + frappe.set_route("List", "Timesheet"); + }, __("View"), true); + } + if(frappe.model.can_read("Expense Claim")) { + frm.add_custom_button(__("Expense Claims"), function() { + frappe.route_options = {"project": doc.project, "task": doc.name} + frappe.set_route("List", "Expense Claim"); + }, __("View"), true); + } + + if(frm.perm[0].write) { + if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") { + frm.add_custom_button(__("Close"), function() { + frm.set_value("status", "Closed"); + frm.save(); + }); + } else { + frm.add_custom_button(__("Reopen"), function() { + frm.set_value("status", "Open"); + frm.save(); + }); + } } } } @@ -71,6 +80,21 @@ frappe.ui.form.on("Task", { } }, + is_group: function(frm) { + frappe.call({ + method:"erpnext.projects.doctype.task.task.check_if_child_exists", + args: { + name: frm.doc.name + }, + callback: function(r){ + if(r.message){ + frappe.msgprint(__('Cannot convert it to non-group. Child Tasks exist.')); + frm.reload_doc(); + } + } + }) + }, + validate: function(frm) { frm.doc.project && frappe.model.remove_from_locals("Project", frm.doc.project); diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json index e4ab5a71e6..41950a381b 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, - "autoname": "TASK.#####", + "autoname": "field:subject", "beta": 0, "creation": "2013-01-29 19:25:50", "custom": 0, @@ -30,9 +30,8 @@ "label": "Subject", "length": 0, "no_copy": 0, - "oldfieldname": "subject", - "oldfieldtype": "Data", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -75,6 +74,37 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "default": "0", + "fieldname": "is_group", + "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": "Is Group", + "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_bulk_edit": 0, "allow_on_submit": 0, @@ -173,9 +203,42 @@ { "allow_bulk_edit": 0, "allow_on_submit": 0, - "bold": 0, + "bold": 1, "collapsible": 0, "columns": 0, + "fieldname": "parent_task", + "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": "Parent Task", + "length": 0, + "no_copy": 0, + "options": "Task", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "collapsible_depends_on": "", + "columns": 0, + "depends_on": "", "fieldname": "section_break_10", "fieldtype": "Section Break", "hidden": 0, @@ -205,6 +268,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "exp_start_date", "fieldtype": "Date", "hidden": 0, @@ -237,6 +301,7 @@ "collapsible": 0, "columns": 0, "default": "0", + "depends_on": "", "description": "", "fieldname": "expected_time", "fieldtype": "Float", @@ -269,6 +334,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "task_weight", "fieldtype": "Float", "hidden": 0, @@ -328,6 +394,7 @@ "bold": 1, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "exp_end_date", "fieldtype": "Date", "hidden": 0, @@ -359,6 +426,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "progress", "fieldtype": "Percent", "hidden": 0, @@ -389,6 +457,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "is_milestone", "fieldtype": "Check", "hidden": 0, @@ -418,7 +487,9 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "collapsible_depends_on": "", "columns": 0, + "depends_on": "", "fieldname": "section_break0", "fieldtype": "Section Break", "hidden": 0, @@ -449,6 +520,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "description", "fieldtype": "Text Editor", "hidden": 0, @@ -481,7 +553,9 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "collapsible_depends_on": "", "columns": 0, + "depends_on": "", "fieldname": "section_break", "fieldtype": "Section Break", "hidden": 0, @@ -512,6 +586,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "depends_on", "fieldtype": "Table", "hidden": 0, @@ -543,6 +618,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "depends_on_tasks", "fieldtype": "Data", "hidden": 1, @@ -572,7 +648,9 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "collapsible_depends_on": "", "columns": 0, + "depends_on": "", "description": "", "fieldname": "actual", "fieldtype": "Section Break", @@ -606,6 +684,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "act_start_date", "fieldtype": "Date", "hidden": 0, @@ -638,6 +717,7 @@ "collapsible": 0, "columns": 0, "default": "", + "depends_on": "", "description": "", "fieldname": "actual_time", "fieldtype": "Float", @@ -699,6 +779,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "act_end_date", "fieldtype": "Date", "hidden": 0, @@ -730,6 +811,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "section_break_17", "fieldtype": "Section Break", "hidden": 0, @@ -759,6 +841,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "total_costing_amount", "fieldtype": "Currency", "hidden": 0, @@ -791,6 +874,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "total_expense_claim", "fieldtype": "Currency", "hidden": 0, @@ -851,6 +935,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "total_billing_amount", "fieldtype": "Currency", "hidden": 0, @@ -1025,6 +1110,96 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_bulk_edit": 0, + "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": 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_bulk_edit": 0, + "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": 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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "old_parent", + "fieldtype": "Data", + "hidden": 1, + "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": 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 } ], "has_web_view": 0, @@ -1039,7 +1214,7 @@ "istable": 0, "max_attachments": 5, "menu_index": 0, - "modified": "2017-05-23 11:28:28.161600", + "modified": "2017-10-06 03:57:37.901446", "modified_by": "Administrator", "module": "Projects", "name": "Task", diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 52ae132078..5937f97f02 100644 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -5,13 +5,14 @@ from __future__ import unicode_literals import frappe, json from frappe.utils import getdate, date_diff, add_days, cstr -from frappe import _ - -from frappe.model.document import Document +from frappe import _, throw +from frappe.utils.nestedset import NestedSet, rebuild_tree class CircularReferenceError(frappe.ValidationError): pass -class Task(Document): +class Task(NestedSet): + nsm_parent_field = 'parent_task' + def get_feed(self): return '{0}: {1}'.format(_(self.status), self.subject) @@ -59,11 +60,16 @@ class Task(Document): depends_on_tasks += d.task + "," self.depends_on_tasks = depends_on_tasks + def update_nsm_model(self): + frappe.utils.nestedset.update_nsm(self) + def on_update(self): + self.update_nsm_model() self.check_recursion() self.reschedule_dependent_tasks() self.update_project() self.unassign_todo() + rebuild_tree("Task", "parent_task") def unassign_todo(self): if self.status == "Closed" or self.status == "Cancelled": @@ -128,6 +134,17 @@ class Task(Document): if project_user: return True + def on_trash(self): + if check_if_child_exists(self.name): + throw(_("Child Task exists for this Task. You can not delete this Task.")) + + self.update_nsm_model() + +@frappe.whitelist() +def check_if_child_exists(name): + return frappe.db.sql("""select name from `tabTask` + where parent_task = %s""", name) + @frappe.whitelist() def get_events(start, end, filters=None): """Returns events for Gantt / Calendar view rendering. @@ -177,4 +194,48 @@ def set_tasks_as_overdue(): and exp_end_date < CURDATE() and `status` not in ('Closed', 'Cancelled')""") +@frappe.whitelist() +def get_children(): + doctype = frappe.local.form_dict.get('doctype') + parent_field = 'parent_' + doctype.lower().replace(' ', '_') + parent = frappe.form_dict.get("parent") or "" + + if parent == "task": + parent = "" + + tasks = frappe.db.sql("""select name as value, + is_group as expandable + from `tab{doctype}` + where docstatus < 2 + and ifnull(`{parent_field}`,'') = %s + order by name""".format(doctype=frappe.db.escape(doctype), + parent_field=frappe.db.escape(parent_field)), (parent), as_dict=1) + + # return tasks + return tasks + +@frappe.whitelist() +def add_node(): + from frappe.desk.treeview import make_tree_args + args = frappe.form_dict + args.update({ + "name_field": "subject" + }) + args = make_tree_args(**args) + + if args.parent_task == 'task': + args.parent_task = None + + frappe.get_doc(args).insert() + +@frappe.whitelist() +def add_multiple_tasks(data, parent): + data = json.loads(data)['tasks'] + tasks = data.split('\n') + new_doc = {'doctype': 'Task', 'parent_task': parent} + + for d in tasks: + new_doc['subject'] = d + new_task = frappe.get_doc(new_doc) + new_task.insert() diff --git a/erpnext/projects/doctype/task/task_tree.js b/erpnext/projects/doctype/task/task_tree.js new file mode 100644 index 0000000000..f11c34f448 --- /dev/null +++ b/erpnext/projects/doctype/task/task_tree.js @@ -0,0 +1,59 @@ +frappe.provide("frappe.treeview_settings"); + +frappe.treeview_settings['Task'] = { + get_tree_nodes: "erpnext.projects.doctype.task.task.get_children", + add_tree_node: "erpnext.projects.doctype.task.task.add_node", + filters: [ + { + fieldname: "task", + fieldtype:"Link", + options: "Task", + label: __("Task"), + get_query: function(){ + return { + filters: [["Task", 'is_group', '=', 1]] + }; + } + } + ], + title: "Task", + breadcrumb: "Projects", + get_tree_root: false, + root_label: "task", + ignore_fields:["parent_task"], + get_label: function(node) { + return node.data.value; + }, + onload: function(me){ + me.make_tree(); + me.set_root = true; + }, + toolbar: [ + { + label:__("Add Multiple"), + condition: function(node) { + return node.expandable; + }, + click: function(node) { + var d = new frappe.ui.Dialog({ + 'fields': [ + {'fieldname': 'tasks', 'label': 'Tasks', 'fieldtype': 'Text'}, + ], + primary_action: function(){ + d.hide(); + return frappe.call({ + method: "erpnext.projects.doctype.task.task.add_multiple_tasks", + args: { + data: d.get_values(), + parent: node.data.value + }, + callback: function() { } + }); + } + }); + d.show(); + } + } + ], + extend_toolbar: true +}; \ No newline at end of file diff --git a/erpnext/projects/doctype/task/test_task.js b/erpnext/projects/doctype/task/tests/test_task.js similarity index 100% rename from erpnext/projects/doctype/task/test_task.js rename to erpnext/projects/doctype/task/tests/test_task.js diff --git a/erpnext/projects/doctype/task/tests/test_task_tree.js b/erpnext/projects/doctype/task/tests/test_task_tree.js new file mode 100644 index 0000000000..9cbcf851e3 --- /dev/null +++ b/erpnext/projects/doctype/task/tests/test_task_tree.js @@ -0,0 +1,99 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Task Tree", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(5); + + frappe.run_serially([ + // insert a new Task + () => frappe.set_route('Tree', 'Task'), + () => frappe.timeout(0.5), + + // Checking adding child without selecting any Node + () => frappe.tests.click_button('New'), + () => frappe.timeout(0.5), + () => {assert.equal($(`.msgprint`).text(), "Select a group node first.", "Error message success");}, + () => frappe.tests.click_button('Close'), + () => frappe.timeout(0.5), + + // Creating child nodes + () => frappe.tests.click_link('task'), + () => frappe.map_group.make('Test-1'), + () => frappe.map_group.make('Test-2'), + () => frappe.map_group.make('Test-3', 1), + () => frappe.timeout(1), + () => frappe.tests.click_link('Test-3'), + () => frappe.map_group.make('Test-4', 0), + + // Checking Edit button + () => frappe.timeout(0.5), + () => frappe.tests.click_link('Test-1'), + () => frappe.tests.click_button('Edit'), + () => frappe.timeout(0.5), + () => {assert.deepEqual(frappe.get_route(), ["Form", "Task", "Test-1"], "Edit route checks");}, + + // Deleting child Node + () => frappe.set_route('Tree', 'Task'), + () => frappe.timeout(0.5), + () => frappe.tests.click_link('Test-1'), + () => frappe.tests.click_button('Delete'), + () => frappe.timeout(0.5), + () => frappe.tests.click_button('Yes'), + + // Deleting Group Node that has child nodes in it + () => frappe.timeout(0.5), + () => frappe.tests.click_link('Test-3'), + () => frappe.tests.click_button('Delete'), + () => frappe.timeout(0.5), + () => frappe.tests.click_button('Yes'), + () => frappe.timeout(1), + () => {assert.equal(cur_dialog.title, 'Message', 'Error thrown correctly');}, + () => frappe.tests.click_button('Close'), + + // Renaming Child node + () => frappe.timeout(0.5), + () => frappe.tests.click_link('Test-2'), + () => frappe.tests.click_button('Rename'), + () => frappe.timeout(1), + () => cur_dialog.set_value('new_name', 'Test-5'), + () => frappe.timeout(1.5), + () => cur_dialog.get_primary_btn().click(), + () => frappe.timeout(1), + () => {assert.equal($(`a:contains("Test-5"):visible`).length, 1, 'Rename successfull');}, + + // Add multiple child tasks + () => frappe.tests.click_link('Test-3'), + () => frappe.timeout(0.5), + () => frappe.click_button('Add Multiple'), + () => frappe.timeout(1), + () => cur_dialog.set_value('tasks', 'Test-6\nTest-7'), + () => frappe.timeout(0.5), + () => frappe.click_button('Submit'), + () => frappe.timeout(2), + () => frappe.click_button('Expand All'), + () => frappe.timeout(1), + () => { + let count = $(`a:contains("Test-6"):visible`).length + $(`a:contains("Test-7"):visible`).length; + assert.equal(count, 2, "Multiple Tasks added successfully"); + }, + + () => done() + ]); +}); + +frappe.map_group = { + make:function(subject, is_group = 0){ + return frappe.run_serially([ + () => frappe.click_button('Add Child'), + () => frappe.timeout(1), + () => cur_dialog.set_value('is_group', is_group), + () => cur_dialog.set_value('subject', subject), + () => frappe.click_button('Create New'), + () => frappe.timeout(1.5) + ]); + } +}; diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt index e7de60439a..24858f3646 100644 --- a/erpnext/tests/ui/tests.txt +++ b/erpnext/tests/ui/tests.txt @@ -133,3 +133,4 @@ erpnext/restaurant/doctype/restaurant/test_restaurant.js erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.js erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.js erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.js +erpnext/projects/doctype/task/tests/test_task_tree.js From 96f167573b062df82fe135b965455ae456803f6e Mon Sep 17 00:00:00 2001 From: Jay Parikh Date: Tue, 31 Oct 2017 01:07:09 -0700 Subject: [PATCH 12/85] POS - Add % to the Discount Field #9749 --- erpnext/public/js/pos/pos_selected_item.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/pos/pos_selected_item.html b/erpnext/public/js/pos/pos_selected_item.html index 6f2772be21..085e048184 100644 --- a/erpnext/public/js/pos/pos_selected_item.html +++ b/erpnext/public/js/pos/pos_selected_item.html @@ -8,7 +8,7 @@
-
{{ __("Discount") }}:
+
{{ __("Discount") }}: %
From 5ec9f6930be5bbe43509f1fcd1b1642ffa9ed379 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 31 Oct 2017 15:26:56 +0530 Subject: [PATCH 13/85] [Fix] Getting an error while making delivery note from sales order and sales order has no item code --- erpnext/selling/doctype/sales_order/sales_order.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index fa21a3d7ee..747a3c062c 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -477,9 +477,11 @@ def make_delivery_note(source_name, target_doc=None): target.qty = flt(source.qty) - flt(source.delivered_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 \ - or frappe.db.get_value("Item Group", item.item_group, "default_cost_center") + + if item: + target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \ + or item.selling_cost_center \ + or frappe.db.get_value("Item Group", item.item_group, "default_cost_center") target_doc = get_mapped_doc("Sales Order", source_name, { "Sales Order": { From a941a394ba498d93547fe2fb899d29033f1b2a41 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Tue, 31 Oct 2017 17:34:50 +0530 Subject: [PATCH 14/85] set the naming series and independent dob validation --- .../student_applicant/student_applicant.py | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.py b/erpnext/schools/doctype/student_applicant/student_applicant.py index 465b4e474a..d0db658341 100644 --- a/erpnext/schools/doctype/student_applicant/student_applicant.py +++ b/erpnext/schools/doctype/student_applicant/student_applicant.py @@ -13,9 +13,12 @@ class StudentApplicant(Document): from frappe.model.naming import set_name_by_naming_series if self.student_admission: if self.program: + # set the naming series from the student admission if provided. student_admission = get_student_admission_data(self.student_admission, self.program) if student_admission: naming_series = student_admission.get("applicant_naming_series") + else: + naming_series = None else: frappe.throw(_("Select the program first")) @@ -40,15 +43,16 @@ class StudentApplicant(Document): def validation_from_student_admission(self): student_admission = get_student_admission_data(self.student_admission, self.program) - if student_admission: - if (( - student_admission.minimum_age - and getdate(student_admission.minimum_age) > getdate(self.date_of_birth) - ) or ( - student_admission.maximum_age - and getdate(student_admission.maximum_age) < getdate(self.date_of_birth) - )): - frappe.throw(_("Not eligible for the admission in this program as per DOB")) + + # different validation for minimum and maximum age so that either min/max can also work independently. + if student_admission and student_admission.minimum_age and \ + getdate(student_admission.minimum_age) < getdate(self.date_of_birth): + frappe.throw(_("Not eligible for the admission in this program as per DOB")) + + if student_admission and student_admission.maximum_age and \ + getdate(student_admission.maximum_age) > getdate(self.date_of_birth): + frappe.throw(_("Not eligible for the admission in this program as per DOB")) + def on_payment_authorized(self, *args, **kwargs): self.db_set('paid', 1) From 3d591792052910c6d97c77f7f056ee788aa10316 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 31 Oct 2017 21:56:16 +0530 Subject: [PATCH 15/85] Load default pos profile if not found --- .../doctype/pos_profile/pos_profile.py | 3 ++- .../page/point_of_sale/point_of_sale.js | 23 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index 3e3728592c..6b7d99f7f1 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -132,6 +132,7 @@ def get_pos_profiles_for_user(user=None): return out @frappe.whitelist() -def get_pos_profile(pos_profile_name): +def get_pos_profile(pos_profile_name=None): + if not pos_profile_name: return name = frappe.db.get_value('POS Profile', { 'pos_profile_name': pos_profile_name }) return frappe.get_doc('POS Profile', name) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index ee6a633fac..c9893f1ce8 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -284,17 +284,22 @@ erpnext.pos.PointOfSale = class PointOfSale { setup_pos_profile() { return new Promise((resolve) => { + + const load_default = () => { + this.pos_profile = { + company: this.company, + currency: frappe.defaults.get_default('currency'), + selling_price_list: frappe.defaults.get_default('selling_price_list') + }; + resolve(); + } + const on_submit = ({ pos_profile }) => { this.get_pos_profile_doc(pos_profile) .then(doc => { this.pos_profile = doc; - if (!this.pos_profile) { - this.pos_profile = { - company: this.company, - currency: frappe.defaults.get_default('currency'), - selling_price_list: frappe.defaults.get_default('selling_price_list') - }; + load_default(); } resolve(); }); @@ -304,9 +309,11 @@ erpnext.pos.PointOfSale = class PointOfSale { method: 'erpnext.accounts.doctype.pos_profile.pos_profile.get_pos_profiles_for_user' }).then((r) => { if (r && r.message) { - const pos_profiles = r.message; + const pos_profiles = r.message.filter(a => a); - if(pos_profiles.length === 1) { + if (pos_profiles.length === 0) { + load_default(); + } else if(pos_profiles.length === 1) { // load profile directly on_submit({pos_profile: pos_profiles[0]}); } else { From 31287b00a6de13d56ed01475c4002cff57749d15 Mon Sep 17 00:00:00 2001 From: tunde Date: Tue, 31 Oct 2017 18:10:17 +0100 Subject: [PATCH 16/85] call get_employee_loan_application only when appropriate --- .../hr/doctype/employee_loan/employee_loan.js | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.js b/erpnext/hr/doctype/employee_loan/employee_loan.js index 33d3a85db6..1f38105c4d 100644 --- a/erpnext/hr/doctype/employee_loan/employee_loan.js +++ b/erpnext/hr/doctype/employee_loan/employee_loan.js @@ -87,22 +87,24 @@ frappe.ui.form.on('Employee Loan', { }, employee_loan_application: function (frm) { - return frappe.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); - } - } - }) + if(frm.doc.employee_loan_application){ + return frappe.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) { From 99748dbacf99ba8ba03186b04caaa54ef1cfb132 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 1 Nov 2017 11:45:02 +0530 Subject: [PATCH 17/85] [Fix] Wrong difference amount in the payment entry for the internal transfer type --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 17ac1f7056..52d8a2d5ce 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -648,13 +648,13 @@ frappe.ui.form.on('Payment Entry', { set_difference_amount: function(frm) { var unallocated_amount = 0; + var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [], + function(d) { return flt(d.amount) })); + if(frm.doc.party) { var party_amount = frm.doc.payment_type=="Receive" ? frm.doc.paid_amount : frm.doc.received_amount; - var total_deductions = frappe.utils.sum($.map(frm.doc.deductions || [], - function(d) { return flt(d.amount) })); - if(frm.doc.total_allocated_amount < party_amount) { if(frm.doc.payment_type == "Receive") { unallocated_amount = party_amount - (frm.doc.total_allocated_amount - total_deductions); From 816ce33daf4e5a27ec548d04ee11499980062f1b Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 1 Nov 2017 18:56:43 +0530 Subject: [PATCH 18/85] [Fix] Customer is manadatory even if customer has selected in the Issue --- erpnext/support/doctype/issue/issue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index ab73b3427d..6a18f1153b 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -32,7 +32,7 @@ class Issue(Document): if email_id: if not self.lead: self.lead = frappe.db.get_value("Lead", {"email_id": email_id}) - if not self.contact: + if not self.contact and not self.customer: self.contact = frappe.db.get_value("Contact", {"email_id": email_id}) if self.contact: From 870ce3cfea3f761ae62aac16e75611fd70bc60a1 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 2 Nov 2017 12:44:40 +0600 Subject: [PATCH 19/85] bumped to version 9.2.3 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index b245f56172..0dcb23f232 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.2' +__version__ = '9.2.3' def get_default_company(user=None): '''Get default company for user''' From 7677ff00a271c761b024e77d51f25cd59553bcc2 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 2 Nov 2017 18:12:14 +0530 Subject: [PATCH 20/85] [hotfix] User not able to edit exchange rate even if Allow Stale Exchange Rates is disabled in the accounts settings (#11409) --- erpnext/public/js/utils.js | 2 +- erpnext/startup/boot.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index efb04d1c09..47cda19298 100644 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -38,7 +38,7 @@ $.extend(erpnext, { }, stale_rate_allowed: () => { - return cint(frappe.boot.sysdefaults.allow_stale) || 1; + return cint(frappe.boot.sysdefaults.allow_stale); }, setup_serial_no: function() { diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index 2080224a70..e940f94046 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe +from frappe.utils import cint def boot_session(bootinfo): """boot session - send website info if guest""" @@ -19,8 +20,8 @@ def boot_session(bootinfo): 'territory') bootinfo.sysdefaults.customer_group = frappe.db.get_single_value('Selling Settings', 'customer_group') - bootinfo.sysdefaults.allow_stale = frappe.db.get_single_value('Accounts Settings', - 'allow_stale') or 1 + bootinfo.sysdefaults.allow_stale = cint(frappe.db.get_single_value('Accounts Settings', + 'allow_stale')) bootinfo.notification_settings = frappe.get_doc("Notification Control", "Notification Control") From 76ce074c63ea38025d2021300f46b6e6800f5e73 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Thu, 2 Nov 2017 18:12:47 +0530 Subject: [PATCH 21/85] return the account details if and only if there is single account of that type (#11407) --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 6864305c44..cc356529ab 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -566,12 +566,17 @@ def get_default_bank_cash_account(company, account_type=None, mode_of_payment=No account = get_bank_cash_account(mode_of_payment, company).get("account") if not account: + ''' + Set the default account first. If the user hasn't set any default account then, he doesn't + want us to set any random account. In this case set the account only if there is single + account (of that type), otherwise return empty dict. + ''' if account_type=="Bank": account = frappe.db.get_value("Company", company, "default_bank_account") if not account: account_list = frappe.get_all("Account", filters = {"company": company, "account_type": "Bank", "is_group": 0}) - if len(account_list) > 0: + if len(account_list) == 1: account = account_list[0].name elif account_type=="Cash": @@ -579,7 +584,7 @@ def get_default_bank_cash_account(company, account_type=None, mode_of_payment=No if not account: account_list = frappe.get_all("Account", filters = {"company": company, "account_type": "Cash", "is_group": 0}) - if len(account_list) > 0: + if len(account_list) == 1: account = account_list[0].name if account: From cbaa0e629cc47e665993438f23c97bb03dfd40ab Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 3 Nov 2017 11:35:49 +0530 Subject: [PATCH 22/85] fix codacy --- erpnext/selling/page/point_of_sale/point_of_sale.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index c9893f1ce8..2f6ccdb7b7 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -322,7 +322,7 @@ erpnext.pos.PointOfSale = class PointOfSale { [{ fieldtype: 'Select', label: 'POS Profile', options: pos_profiles }], on_submit, __('Select POS Profile') - ) + ); } } }); @@ -341,7 +341,7 @@ erpnext.pos.PointOfSale = class PointOfSale { } }); }); - } + } setup_company() { this.company = frappe.sys_defaults.company; From 56cb0aa9c15e7ca45992ef8ac59c4d555b97d906 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 3 Nov 2017 17:26:23 +0600 Subject: [PATCH 23/85] bumped to version 9.2.4 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 0dcb23f232..2812fa7a0b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.3' +__version__ = '9.2.4' def get_default_company(user=None): '''Get default company for user''' From f15a8409eb232171ec490069bfb94ba123a398af Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 6 Nov 2017 11:11:34 +0530 Subject: [PATCH 24/85] [tests] Test case fixes for task and project (#11445) * [tests] Test case fixes for task and project * Removed hard-coded dates from test cases * Codacy fix --- erpnext/projects/doctype/task/task.py | 13 +- .../projects/doctype/task/test_records.json | 15 -- erpnext/projects/doctype/task/test_task.py | 159 ++++++------------ 3 files changed, 57 insertions(+), 130 deletions(-) delete mode 100644 erpnext/projects/doctype/task/test_records.json diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 5937f97f02..5b1bcaf266 100644 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -69,7 +69,6 @@ class Task(NestedSet): self.reschedule_dependent_tasks() self.update_project() self.unassign_todo() - rebuild_tree("Task", "parent_task") def unassign_todo(self): if self.status == "Closed" or self.status == "Cancelled": @@ -111,16 +110,20 @@ class Task(NestedSet): frappe.throw(_("Circular Reference Error"), CircularReferenceError) if b[0]: task_list.append(b[0]) + if count == 15: break def reschedule_dependent_tasks(self): end_date = self.exp_end_date or self.act_end_date if end_date: - for task_name in frappe.db.sql("""select name from `tabTask` as parent where parent.project = %(project)s and parent.name in \ - (select parent from `tabTask Depends On` as child where child.task = %(task)s and child.project = %(project)s)""", - {'project': self.project, 'task':self.name }, as_dict=1): - + for task_name in frappe.db.sql(""" + select name from `tabTask` as parent + where parent.project = %(project)s + and parent.name in ( + select parent from `tabTask Depends On` as child + where child.task = %(task)s and child.project = %(project)s) + """, {'project': self.project, 'task':self.name }, as_dict=1): task = frappe.get_doc("Task", task_name.name) if task.exp_start_date and task.exp_end_date and task.exp_start_date < getdate(end_date) and task.status == "Open": task_duration = date_diff(task.exp_end_date, task.exp_start_date) diff --git a/erpnext/projects/doctype/task/test_records.json b/erpnext/projects/doctype/task/test_records.json deleted file mode 100644 index 42ca0e77ea..0000000000 --- a/erpnext/projects/doctype/task/test_records.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "status": "Open", - "subject": "_Test Task", - "name": "task001" - }, - { - "status": "Open", - "subject": "_Test Task 1" - }, - { - "status": "Open", - "subject": "_Test Task 2" - } -] \ No newline at end of file diff --git a/erpnext/projects/doctype/task/test_task.py b/erpnext/projects/doctype/task/test_task.py index 2e64b7367d..1d9461846e 100644 --- a/erpnext/projects/doctype/task/test_task.py +++ b/erpnext/projects/doctype/task/test_task.py @@ -5,137 +5,61 @@ import frappe import unittest from frappe.utils import getdate, nowdate, add_days -# test_records = frappe.get_test_records('Task') - from erpnext.projects.doctype.task.task import CircularReferenceError class TestTask(unittest.TestCase): def test_circular_reference(self): + task1 = create_task("_Test Task 1", nowdate(), add_days(nowdate(), 10)) + task2 = create_task("_Test Task 2", add_days(nowdate(), 11), add_days(nowdate(), 15), task1.name) + task3 = create_task("_Test Task 3", add_days(nowdate(), 11), add_days(nowdate(), 15), task2.name) - task1 = frappe.new_doc('Task') - task1.update({ - "status": "Open", - "subject": "_Test Task 1", - "project": "_Test Project", - "exp_start_date": "2015-1-1", - "exp_end_date": "2015-1-10" - }) - task1.save() - - task2 = frappe.new_doc('Task') - task2.update({ - "status": "Open", - "subject": "_Test Task 2", - "project": "_Test Project", - "exp_start_date": "2015-1-11", - "exp_end_date": "2015-1-15", - "depends_on":[ - { - "task": task1.name - } - ] - }) - task2.save() - - task3 = frappe.new_doc('Task') - task3.update({ - "status": "Open", - "subject": "_Test Task 2", - "project": "_Test Project", - "exp_start_date": "2015-1-11", - "exp_end_date": "2015-1-15", - "depends_on":[ - { - "task": task2.name - } - ] - }) - task3.save() - + task1.reload() task1.append("depends_on", { "task": task3.name }) + self.assertRaises(CircularReferenceError, task1.save) task1.set("depends_on", []) task1.save() - task4 = frappe.new_doc('Task') - task4.update({ - "status": "Open", - "subject": "_Test Task 1", - "exp_start_date": "2015-1-1", - "exp_end_date": "2015-1-15", - "depends_on":[ - { - "task": task1.name - } - ] - }) - task4.save() + task4 = create_task("_Test Task 4", nowdate(), add_days(nowdate(), 15), task1.name) task3.append("depends_on", { "task": task4.name }) def test_reschedule_dependent_task(self): - task1 = frappe.new_doc('Task') - task1.update({ - "status": "Open", - "subject": "_Test Task 1", - "project": "_Test Project", - "exp_start_date": "2015-1-1", - "exp_end_date": "2015-1-10" - }) - task1.save() + task1 = create_task("_Test Task 1", nowdate(), add_days(nowdate(), 10)) - task2 = frappe.new_doc('Task') - task2.update({ - "status": "Open", - "subject": "_Test Task 2", - "project": "_Test Project", - "exp_start_date": "2015-1-11", - "exp_end_date": "2015-1-15", - "depends_on":[ - { - "task": task1.name, - "project": "_Test Project" - } - ] - }) + task2 = create_task("_Test Task 2", add_days(nowdate(), 11), add_days(nowdate(), 15), task1.name) + task2.get("depends_on")[0].project = "_Test Project" task2.save() - task3 = frappe.new_doc('Task') - task3.update({ - "status": "Open", - "subject": "_Test Task 3", - "project": "_Test Project", - "exp_start_date": "2015-1-16", - "exp_end_date": "2015-1-18", - "depends_on":[ - { - "task": task2.name, - "project": "_Test Project" - } - ] - }) + task3 = create_task("_Test Task 3", add_days(nowdate(), 11), add_days(nowdate(), 15), task2.name) + task3.get("depends_on")[0].project = "_Test Project" task3.save() task1.update({ - "exp_end_date": "2015-1-20" + "exp_end_date": add_days(nowdate(), 20) }) task1.save() - self.assertEqual(frappe.db.get_value("Task", task2.name, "exp_start_date"), getdate('2015-1-21')) - self.assertEqual(frappe.db.get_value("Task", task2.name, "exp_end_date"), getdate('2015-1-25')) + self.assertEqual(frappe.db.get_value("Task", task2.name, "exp_start_date"), + getdate(add_days(nowdate(), 21))) + self.assertEqual(frappe.db.get_value("Task", task2.name, "exp_end_date"), + getdate(add_days(nowdate(), 25))) - self.assertEqual(frappe.db.get_value("Task", task3.name, "exp_start_date"), getdate('2015-1-26')) - self.assertEqual(frappe.db.get_value("Task", task3.name, "exp_end_date"), getdate('2015-1-28')) + self.assertEqual(frappe.db.get_value("Task", task3.name, "exp_start_date"), + getdate(add_days(nowdate(), 26))) + self.assertEqual(frappe.db.get_value("Task", task3.name, "exp_end_date"), + getdate(add_days(nowdate(), 30))) def test_close_assignment(self): - task = frappe.new_doc("Task") - task.subject = "Test Close Assignment" - task.insert() + if not frappe.db.exists("Task", "Test Close Assignment"): + task = frappe.new_doc("Task") + task.subject = "Test Close Assignment" + task.insert() def assign(): from frappe.desk.form import assign_to @@ -147,8 +71,10 @@ class TestTask(unittest.TestCase): }) def get_owner_and_status(): - return frappe.db.get_value("ToDo", filters={"reference_type": task.doctype, "reference_name": task.name, - "description": "Close this task"}, fieldname=("owner", "status"), as_dict=True) + return frappe.db.get_value("ToDo", + filters={"reference_type": task.doctype, "reference_name": task.name, + "description": "Close this task"}, + fieldname=("owner", "status"), as_dict=True) assign() todo = get_owner_and_status() @@ -164,16 +90,29 @@ class TestTask(unittest.TestCase): self.assertEquals(todo.status, "Closed") def test_overdue(self): - task = frappe.get_doc({ - "doctype":"Task", - "subject": "Testing Overdue", - "status": "Open", - "exp_end_date": add_days(nowdate(), -1) - }) - - task.insert() + task = create_task("Testing Overdue", add_days(nowdate(), -10), add_days(nowdate(), -5)) from erpnext.projects.doctype.task.task import set_tasks_as_overdue set_tasks_as_overdue() self.assertEquals(frappe.db.get_value("Task", task.name, "status"), "Overdue") + +def create_task(subject, start=None, end=None, depends_on=None, project=None): + if not frappe.db.exists("Task", subject): + task = frappe.new_doc('Task') + task.status = "Open" + task.subject = subject + task.exp_start_date = start or nowdate() + task.exp_end_date = end or nowdate() + task.project = project or "_Test Project" + task.save() + else: + task = frappe.get_doc("Task", subject) + + if depends_on: + task.append("depends_on", { + "task": depends_on + }) + task.save() + + return task \ No newline at end of file From 3f0dfd720fb9457422d76e6649725bced97ee3ab Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Fri, 27 Oct 2017 15:20:33 +0530 Subject: [PATCH 25/85] set the pos profile in the sales invoice --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 1c4fe3d084..888520ac76 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -305,6 +305,7 @@ class SalesInvoice(SellingController): self.account_for_change_amount = frappe.db.get_value('Company', self.company, 'default_cash_account') if pos: + self.pos_profile = pos.name if not for_validate and not self.customer: self.customer = pos.customer self.mode_of_payment = pos.mode_of_payment From b1616a0cb3d7ff078044204ddcf8dd3b054b2bb5 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Fri, 27 Oct 2017 16:18:21 +0530 Subject: [PATCH 26/85] changes in thepos profile --- .../doctype/pos_profile/pos_profile.json | 324 ++++++++++++------ 1 file changed, 210 insertions(+), 114 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index 187454ef33..8136c98686 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, - "autoname": "hash", + "autoname": "field:pos_profile_name", "beta": 0, "creation": "2013-05-24 12:15:51", "custom": 0, @@ -11,6 +11,96 @@ "doctype": "DocType", "editable_grid": 0, "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "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, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_2", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "pos_profile_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": "POS Profile 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_bulk_edit": 0, "allow_on_submit": 0, @@ -112,9 +202,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "depends_on": "update_stock", - "fieldname": "warehouse", - "fieldtype": "Link", + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -122,13 +211,11 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Warehouse", + "label": "Ignore Pricing Rule", "length": 0, "no_copy": 0, - "oldfieldname": "warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -145,8 +232,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "campaign", - "fieldtype": "Link", + "fieldname": "allow_delete", + "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -154,10 +241,39 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Campaign", + "label": "Allow Delete", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "allow_user_to_edit_rate", + "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": "Allow user to edit Rate", "length": 0, "no_copy": 0, - "options": "Campaign", "permlevel": 0, "precision": "", "print_hide": 0, @@ -300,7 +416,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "currency", + "depends_on": "update_stock", + "fieldname": "warehouse", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, @@ -309,19 +426,19 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Currency", + "label": "Warehouse", "length": 0, "no_copy": 0, - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", + "oldfieldname": "warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", "permlevel": 0, "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 @@ -332,8 +449,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", + "fieldname": "campaign", + "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -341,69 +458,10 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Ignore Pricing Rule", - "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "allow_delete", - "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": "Allow Delete", - "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "allow_user_to_edit_rate", - "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": "Allow user to edit Rate", + "label": "Campaign", "length": 0, "no_copy": 0, + "options": "Campaign", "permlevel": 0, "precision": "", "print_hide": 0, @@ -422,6 +480,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "section_break_11", "fieldtype": "Section Break", "hidden": 0, @@ -482,6 +541,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "section_break_14", "fieldtype": "Section Break", "hidden": 0, @@ -602,6 +662,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "section_break_16", "fieldtype": "Section Break", "hidden": 0, @@ -882,6 +943,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "offline_pos_section", "fieldtype": "Section Break", "hidden": 0, @@ -1037,6 +1099,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "depends_on": "", "fieldname": "section_break_19", "fieldtype": "Section Break", "hidden": 0, @@ -1046,6 +1109,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, + "label": "Accounting", "length": 0, "no_copy": 0, "permlevel": 0, @@ -1060,6 +1124,38 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "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": 0, + "in_standard_filter": 0, + "label": "Currency", + "length": 0, + "no_copy": 0, + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "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_bulk_edit": 0, "allow_on_submit": 0, @@ -1154,38 +1250,6 @@ "set_only_once": 0, "unique": 0 }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "taxes_and_charges", - "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": "Taxes and Charges", - "length": 0, - "no_copy": 0, - "oldfieldname": "charge", - "oldfieldtype": "Link", - "options": "Sales Taxes and Charges Template", - "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_bulk_edit": 0, "allow_on_submit": 0, @@ -1309,6 +1373,38 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "taxes_and_charges", + "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": "Taxes and Charges", + "length": 0, + "no_copy": 0, + "oldfieldname": "charge", + "oldfieldtype": "Link", + "options": "Sales Taxes and Charges Template", + "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 } ], "has_web_view": 0, @@ -1322,7 +1418,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-09-01 15:55:14.890452", + "modified": "2017-10-27 06:45:32.957674", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", From 40ef7e70392237d7d3e4d50669cb020f100588a0 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Thu, 2 Nov 2017 16:04:16 +0530 Subject: [PATCH 27/85] patch for renaming the pos profile and setting the pos profile name --- erpnext/patches.txt | 1 + erpnext/patches/v9_0/set_pos_profile_name.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 erpnext/patches/v9_0/set_pos_profile_name.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index fd7a1b4da6..486cd7cbed 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -455,3 +455,4 @@ erpnext.patches.v9_0.add_healthcare_domain erpnext.patches.v9_0.set_variant_item_description erpnext.patches.v9_0.set_uoms_in_variant_field erpnext.patches.v9_0.copy_old_fees_field_data +erpnext.patches.v9_0.set_pos_profile_name diff --git a/erpnext/patches/v9_0/set_pos_profile_name.py b/erpnext/patches/v9_0/set_pos_profile_name.py new file mode 100644 index 0000000000..bc6e50e6b3 --- /dev/null +++ b/erpnext/patches/v9_0/set_pos_profile_name.py @@ -0,0 +1,19 @@ +# Copyright (c) 2017, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + doctype = 'POS Profile' + frappe.reload_doctype(doctype) + + for pos in frappe.get_all(doctype): + doc = frappe.get_doc(doctype, pos.name) + + if not doc.user: continue + + doc.pos_profile_name = doc.user + ' - ' + doc.company + doc.save() + + frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True) \ No newline at end of file From 6ba2eda04a85cbc818ad28e09969644a444d2dc8 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Mon, 6 Nov 2017 17:22:14 +0530 Subject: [PATCH 28/85] fixes for the chart (#11460) --- .../course_wise_assessment_report.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py b/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py index 9bdf621a61..492d738448 100644 --- a/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py +++ b/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py @@ -173,14 +173,16 @@ def get_column(assessment_criteria, total_maximum_score): def get_chart_data(grades, assessment_criteria_list, kounter): grades = sorted(grades) datasets = [] + for grade in grades: - tmp = [] - for ac in assessment_criteria_list: - if grade in kounter[ac]: - tmp.append(kounter[ac][grade]) + tmp = frappe._dict({"values":[], "title": grade}) + for criteria in assessment_criteria_list: + if grade in kounter[criteria]: + tmp["values"].append(kounter[criteria][grade]) else: - tmp.append(0) + tmp["values"].append(0) datasets.append(tmp) + return { "data": { "labels": assessment_criteria_list, From e61a275651910eea16346012759a1f2a31beea06 Mon Sep 17 00:00:00 2001 From: pawan Date: Thu, 2 Nov 2017 17:53:24 +0530 Subject: [PATCH 29/85] [fix] #11427 --- .../daily_sales_payment_summary/__init__.py | 0 .../daily_sales_payment_summary.js | 62 +++++ .../daily_sales_payment_summary.json | 26 ++ .../daily_sales_payment_summary.py | 233 ++++++++++++++++++ erpnext/config/accounts.py | 6 + 5 files changed, 327 insertions(+) create mode 100644 erpnext/accounts/report/daily_sales_payment_summary/__init__.py create mode 100644 erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js create mode 100644 erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json create mode 100644 erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py diff --git a/erpnext/accounts/report/daily_sales_payment_summary/__init__.py b/erpnext/accounts/report/daily_sales_payment_summary/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js new file mode 100644 index 0000000000..0426e0a286 --- /dev/null +++ b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js @@ -0,0 +1,62 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.query_reports["Daily Sales Payment Summary"] = { + "filters": [ + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today(), + "width": "80" + }, + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today() + }, + { + "fieldname":"customer", + "label": __("Customer"), + "fieldtype": "Link", + "options": "Customer" + }, + { + "fieldname":"company", + "label": __("Company"), + "fieldtype": "Link", + "options": "Company", + "default": frappe.defaults.get_user_default("Company") + }, + { + "fieldname":"mode_of_payment", + "label": __("Mode of Payment"), + "fieldtype": "Link", + "options": "Mode of Payment" + }, + { + "fieldname":"owner", + "label": __("Owner"), + "fieldtype": "Link", + "options": "User" + }, + { + "fieldname":"cost_center", + "label": __("Cost Center"), + "fieldtype": "Link", + "options": "Cost Center" + }, + { + "fieldname":"warehouse", + "label": __("Warehouse"), + "fieldtype": "Link", + "options": "Warehouse" + }, + { + "fieldname":"is_pos", + "label": __("POS?"), + "fieldtype": "Check" + } + ] +} diff --git a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json new file mode 100644 index 0000000000..0d43fd1cfd --- /dev/null +++ b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json @@ -0,0 +1,26 @@ +{ + "add_total_row": 0, + "apply_user_permissions": 1, + "creation": "2017-11-02 00:28:38.519057", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "modified": "2017-11-02 10:39:56.984273", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Daily Sales Payment Summary", + "owner": "Administrator", + "ref_doctype": "Sales Invoice", + "report_name": "Daily Sales Payment Summary", + "report_type": "Script Report", + "roles": [ + { + "role": "Accounts Manager" + }, + { + "role": "Accounts User" + } + ] +} \ No newline at end of file diff --git a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py new file mode 100644 index 0000000000..76d25d09cb --- /dev/null +++ b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py @@ -0,0 +1,233 @@ +# 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 flt +from frappe import msgprint, _ + +def execute(filters=None): + return _execute(filters) + +def _execute(filters, additional_table_columns=None, additional_query_columns=None): + if not filters: filters = frappe._dict({}) + + invoice_list = get_invoices(filters, additional_query_columns) + columns, income_accounts, tax_accounts = get_columns(invoice_list, additional_table_columns) + + if not invoice_list: + msgprint(_("No record found")) + return columns, invoice_list + + invoice_income_map = get_invoice_income_map(invoice_list) + invoice_income_map, invoice_tax_map = get_invoice_tax_map(invoice_list, + invoice_income_map, income_accounts) + #Cost Center & Warehouse Map + invoice_cc_wh_map = get_invoice_cc_wh_map(invoice_list) + customers = list(set([inv.customer for inv in invoice_list])) + customer_map = get_customer_details(customers) + company_currency = frappe.db.get_value("Company", filters.get("company"), "default_currency") + mode_of_payments = get_mode_of_payments([inv.name for inv in invoice_list]) + + data = [] + for inv in invoice_list: + # invoice details + cost_center = list(set(invoice_cc_wh_map.get(inv.name, {}).get("cost_center", []))) + warehouse = list(set(invoice_cc_wh_map.get(inv.name, {}).get("warehouse", []))) + + customer_details = customer_map.get(inv.customer, {}) + row = [ + inv.name, inv.posting_date, inv.customer, inv.customer_name + ] + + if additional_query_columns: + for col in additional_query_columns: + row.append(inv.get(col)) + + row +=[ + ", ".join(mode_of_payments.get(inv.name, [])), + inv.owner, + ", ".join(cost_center), ", ".join(warehouse), company_currency + ] + # map income values + base_net_total = 0 + for income_acc in income_accounts: + income_amount = flt(invoice_income_map.get(inv.name, {}).get(income_acc)) + base_net_total += income_amount + row.append(income_amount) + + # net total + row.append(base_net_total or inv.base_net_total) + # tax account + total_tax = 0 + for tax_acc in tax_accounts: + if tax_acc not in income_accounts: + tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc)) + total_tax += tax_amount + row.append(tax_amount) + + # total tax, grand total, outstanding amount & rounded total + row += [total_tax, inv.base_grand_total,inv.paid_amount, inv.outstanding_amount] + + data.append(row) + + return columns, data + +def get_columns(invoice_list, additional_table_columns): + """return columns based on filters""" + columns = [ + _("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", + _("Customer") + ":Link/Customer:120", _("Customer Name") + "::120" + ] + + if additional_table_columns: + columns += additional_table_columns + + columns +=[ + _("Mode of Payment") + "::120", + _("Owner") + "::150", + _("Cost Center") + ":Link/Cost Center:100", _("Warehouse") + ":Link/Warehouse:100", + { + "fieldname": "currency", + "label": _("Currency"), + "fieldtype": "Data", + "width": 80 + } + ] + + income_accounts = tax_accounts = income_columns = tax_columns = [] + + if invoice_list: + income_accounts = frappe.db.sql_list("""select distinct income_account + from `tabSales Invoice Item` where docstatus = 1 and parent in (%s) + order by income_account""" % + ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list])) + + tax_accounts = frappe.db.sql_list("""select distinct account_head + from `tabSales Taxes and Charges` where parenttype = 'Sales Invoice' + and docstatus = 1 and base_tax_amount_after_discount_amount != 0 + and parent in (%s) order by account_head""" % + ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list])) + + income_columns = [(account + ":Currency/currency:120") for account in income_accounts] + for account in tax_accounts: + if account not in income_accounts: + tax_columns.append(account + ":Currency/currency:120") + + columns = columns + income_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \ + [_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120", + _("Paid Amount") + ":Currency/currency:120", + _("Outstanding Amount") + ":Currency/currency:120"] + + return columns, income_accounts, tax_accounts + +def get_conditions(filters): + conditions = "" + + if filters.get("company"): conditions += " and company=%(company)s" + if filters.get("customer"): conditions += " and customer = %(customer)s" + if filters.get("owner"): conditions += " and owner = %(owner)s" + + if filters.get("from_date"): conditions += " and posting_date >= %(from_date)s" + if filters.get("to_date"): conditions += " and posting_date <= %(to_date)s" + + if filters.get("mode_of_payment"): + conditions += """ and exists(select name from `tabSales Invoice Payment` + where parent=`tabSales Invoice`.name + and ifnull(`tabSales Invoice Payment`.mode_of_payment, '') = %(mode_of_payment)s)""" + + if filters.get("cost_center"): + conditions += """ and exists(select name from `tabSales Invoice Item` + where parent=`tabSales Invoice`.name + and ifnull(`tabSales Invoice Item`.cost_center, '') = %(cost_center)s)""" + + if filters.get("warehouse"): + conditions += """ and exists(select name from `tabSales Invoice Item` + where parent=`tabSales Invoice`.name + and ifnull(`tabSales Invoice Item`.warehouse, '') = %(warehouse)s)""" + + if filters.get("is_pos"): conditions += " and is_pos = %(is_pos)s" + + return conditions + +def get_invoices(filters, additional_query_columns): + if additional_query_columns: + additional_query_columns = ', ' + ', '.join(additional_query_columns) + + conditions = get_conditions(filters) + return frappe.db.sql("""select name, posting_date, customer, customer_name, owner, + base_net_total, base_grand_total, paid_amount, outstanding_amount {0} + from `tabSales Invoice` + where docstatus = 1 %s order by posting_date desc, name desc""".format(additional_query_columns or '') % + conditions, filters, as_dict=1) + +def get_invoice_income_map(invoice_list): + income_details = frappe.db.sql("""select parent, income_account, sum(base_net_amount) as amount + from `tabSales Invoice Item` where parent in (%s) group by parent, income_account""" % + ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) + + invoice_income_map = {} + for d in income_details: + invoice_income_map.setdefault(d.parent, frappe._dict()).setdefault(d.income_account, []) + invoice_income_map[d.parent][d.income_account] = flt(d.amount) + + return invoice_income_map + +def get_invoice_tax_map(invoice_list, invoice_income_map, income_accounts): + tax_details = frappe.db.sql("""select parent, account_head, + sum(base_tax_amount_after_discount_amount) as tax_amount + from `tabSales Taxes and Charges` where parent in (%s) group by parent, account_head""" % + ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) + + invoice_tax_map = {} + for d in tax_details: + if d.account_head in income_accounts: + if invoice_income_map[d.parent].has_key(d.account_head): + invoice_income_map[d.parent][d.account_head] += flt(d.tax_amount) + else: + invoice_income_map[d.parent][d.account_head] = flt(d.tax_amount) + else: + invoice_tax_map.setdefault(d.parent, frappe._dict()).setdefault(d.account_head, []) + invoice_tax_map[d.parent][d.account_head] = flt(d.tax_amount) + + return invoice_income_map, invoice_tax_map + +def get_invoice_cc_wh_map(invoice_list): + + si_items = frappe.db.sql("""select parent, cost_center, warehouse + from `tabSales Invoice Item` where parent in (%s) + and (ifnull(cost_center, '') != '' or ifnull(warehouse, '') != '')""" % + ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]),as_dict=1) + + invoice_cc_wh_map = {} + for d in si_items: + if d.cost_center: + invoice_cc_wh_map.setdefault(d.parent, frappe._dict()).setdefault( + "cost_center", []).append(d.cost_center) + + if d.warehouse: + invoice_cc_wh_map.setdefault(d.parent, frappe._dict()).setdefault( + "warehouse", []).append(d.warehouse) + + return invoice_cc_wh_map + +def get_customer_details(customers): + customer_map = {} + for cust in frappe.db.sql("""select name from `tabCustomer` + where name in (%s)""" % ", ".join(["%s"]*len(customers)), tuple(customers), as_dict=1): + customer_map.setdefault(cust.name, cust) + + return customer_map + + +def get_mode_of_payments(invoice_list): + mode_of_payments = {} + if invoice_list: + inv_mop = frappe.db.sql("""select parent, mode_of_payment + from `tabSales Invoice Payment` where parent in (%s) group by parent, mode_of_payment""" % + ', '.join(['%s']*len(invoice_list)), tuple(invoice_list), as_dict=1) + + for d in inv_mop: + mode_of_payments.setdefault(d.parent, []).append(d.mode_of_payment) + + return mode_of_payments diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index cdce13ba35..ef5350bd8b 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -468,6 +468,12 @@ def get_data(): "name": "Customer Credit Balance", "doctype": "Customer" }, + { + "type": "report", + "is_query_report": True, + "name": "Daily Sales Payment Summary", + "doctype": "Sales Invoice" + } ] }, { From 8d1d64aa2979c9dc2f996fc28c1c7c520d653ae2 Mon Sep 17 00:00:00 2001 From: pawan Date: Fri, 3 Nov 2017 21:52:07 +0530 Subject: [PATCH 30/85] [fix] #11449 --- .../report/sales_payment_summary/__init__.py | 0 .../sales_payment_summary.js | 56 +++++++++++++++++ .../sales_payment_summary.json | 26 ++++++++ .../sales_payment_summary.py | 60 +++++++++++++++++++ erpnext/config/accounts.py | 2 +- 5 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 erpnext/accounts/report/sales_payment_summary/__init__.py create mode 100644 erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js create mode 100644 erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json create mode 100644 erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py diff --git a/erpnext/accounts/report/sales_payment_summary/__init__.py b/erpnext/accounts/report/sales_payment_summary/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js new file mode 100644 index 0000000000..e599fcdba3 --- /dev/null +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js @@ -0,0 +1,56 @@ +// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +// License: GNU General Public License v3. See license.txt + +frappe.query_reports["Sales Payment Summary"] = { + "filters": [ + { + "fieldname":"from_date", + "label": __("From Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today(), + "width": "80" + }, + { + "fieldname":"to_date", + "label": __("To Date"), + "fieldtype": "Date", + "default": frappe.datetime.get_today() + }, + { + "fieldname":"company", + "label": __("Company"), + "fieldtype": "Link", + "options": "Company", + "default": frappe.defaults.get_user_default("Company") + }, + { + "fieldname":"mode_of_payment", + "label": __("Mode of Payment"), + "fieldtype": "Link", + "options": "Mode of Payment" + }, + { + "fieldname":"owner", + "label": __("Owner"), + "fieldtype": "Link", + "options": "User" + }, + { + "fieldname":"cost_center", + "label": __("Cost Center"), + "fieldtype": "Link", + "options": "Cost Center" + }, + { + "fieldname":"warehouse", + "label": __("Warehouse"), + "fieldtype": "Link", + "options": "Warehouse" + }, + { + "fieldname":"is_pos", + "label": __("POS?"), + "fieldtype": "Check" + } + ] +}; diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json new file mode 100644 index 0000000000..1ff56d3184 --- /dev/null +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json @@ -0,0 +1,26 @@ +{ + "add_total_row": 0, + "apply_user_permissions": 1, + "creation": "2017-11-03 16:31:45.757516", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "modified": "2017-11-03 17:00:37.871577", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Sales Payment Summary", + "owner": "Administrator", + "ref_doctype": "Sales Invoice", + "report_name": "Sales Payment Summary", + "report_type": "Script Report", + "roles": [ + { + "role": "Accounts Manager" + }, + { + "role": "Accounts User" + } + ] +} \ No newline at end of file diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py new file mode 100644 index 0000000000..3e761b104d --- /dev/null +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -0,0 +1,60 @@ +# 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 msgprint, _ + +def execute(filters=None): + + columns, data = [], [] + columns=get_columns() + data=get_sales_payment_data(filters, columns) + return columns, data + +def get_columns(): + + return [ + _("Date") + ":Date:80", + _("Owner") + "::150", + _("Payment Mode") + "::120", + _("Warehouse") + ":Link/Cost Center:100", + _("Cost Center") + ":Link/Warehouse:100", + _("Sales and Returns") + ":Currency/currency:120", + _("Taxes") + ":Currency/currency:120", + _("Payments") + ":Currency/currency:120", + _("Reconciliation") + ":Currency/currency:120" + ] + +def get_sales_payment_data(filters, columns): + + sales_invoice_data = get_sales_invoice_data(filters) + data = [] + for inv in sales_invoice_data: + row = [inv.posting_date, inv.owner, inv.mode_of_payment,inv.warehouse, inv.cost_center,inv.net_total, inv.total_taxes, inv.paid_amount, inv.net_total + inv.total_taxes - inv.paid_amount] + data.append(row) + return data + +def get_conditions(filters): + + conditions = "" + if filters.get("company"): conditions += " a.company=%(company)s" + if filters.get("customer"): conditions += " and a.customer = %(customer)s" + if filters.get("owner"): conditions += " and a.owner = %(owner)s" + if filters.get("from_date"): conditions += " and a.posting_date >= %(from_date)s" + if filters.get("to_date"): conditions += " and a.posting_date <= %(to_date)s" + if filters.get("mode_of_payment"): conditions += " and c.mode_of_payment >= %(mode_of_payment)s" + if filters.get("warehouse"): conditions += " and b.warehouse <= %(warehouse)s" + if filters.get("cost_center"): conditions += " and b.cost_center <= %(cost_center)s" + if filters.get("is_pos"): conditions += " and a.is_pos = %(is_pos)s" + + return conditions + +def get_sales_invoice_data(filters): + + conditions = get_conditions(filters) + return frappe.db.sql("""select a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center, + sum(a.net_total) as "net_total",sum(a.total_taxes_and_charges) as "total_taxes", sum(a.base_paid_amount) as "paid_amount" + from `tabSales Invoice` a, `tabSales Invoice Item` b, `tabSales Invoice Payment` c + where a.name = b.parent and a.name = c.parent and {conditions} + group by a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center""".format(conditions=conditions),filters, as_dict=1) \ No newline at end of file diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index ef5350bd8b..58fb2f0b32 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -471,7 +471,7 @@ def get_data(): { "type": "report", "is_query_report": True, - "name": "Daily Sales Payment Summary", + "name": "Sales Payment Summary", "doctype": "Sales Invoice" } ] From b699b86b7685071fa72ce220b151c611134fb239 Mon Sep 17 00:00:00 2001 From: pawan Date: Sat, 4 Nov 2017 05:20:24 +0530 Subject: [PATCH 31/85] Add Total Row --- .../report/sales_payment_summary/sales_payment_summary.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json index 1ff56d3184..8c6242f0a4 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "apply_user_permissions": 1, "creation": "2017-11-03 16:31:45.757516", "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 0, "is_standard": "Yes", - "modified": "2017-11-03 17:00:37.871577", + "modified": "2017-11-04 05:15:35.892659", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Payment Summary", From d59225635d3ea62dc602cb41aceb3df83b477173 Mon Sep 17 00:00:00 2001 From: pawan Date: Sat, 4 Nov 2017 05:36:39 +0530 Subject: [PATCH 32/85] remove old report --- .../daily_sales_payment_summary/__init__.py | 0 .../daily_sales_payment_summary.js | 62 ----- .../daily_sales_payment_summary.json | 26 -- .../daily_sales_payment_summary.py | 233 ------------------ 4 files changed, 321 deletions(-) delete mode 100644 erpnext/accounts/report/daily_sales_payment_summary/__init__.py delete mode 100644 erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js delete mode 100644 erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json delete mode 100644 erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py diff --git a/erpnext/accounts/report/daily_sales_payment_summary/__init__.py b/erpnext/accounts/report/daily_sales_payment_summary/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js deleted file mode 100644 index 0426e0a286..0000000000 --- a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors -// License: GNU General Public License v3. See license.txt - -frappe.query_reports["Daily Sales Payment Summary"] = { - "filters": [ - { - "fieldname":"from_date", - "label": __("From Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today(), - "width": "80" - }, - { - "fieldname":"to_date", - "label": __("To Date"), - "fieldtype": "Date", - "default": frappe.datetime.get_today() - }, - { - "fieldname":"customer", - "label": __("Customer"), - "fieldtype": "Link", - "options": "Customer" - }, - { - "fieldname":"company", - "label": __("Company"), - "fieldtype": "Link", - "options": "Company", - "default": frappe.defaults.get_user_default("Company") - }, - { - "fieldname":"mode_of_payment", - "label": __("Mode of Payment"), - "fieldtype": "Link", - "options": "Mode of Payment" - }, - { - "fieldname":"owner", - "label": __("Owner"), - "fieldtype": "Link", - "options": "User" - }, - { - "fieldname":"cost_center", - "label": __("Cost Center"), - "fieldtype": "Link", - "options": "Cost Center" - }, - { - "fieldname":"warehouse", - "label": __("Warehouse"), - "fieldtype": "Link", - "options": "Warehouse" - }, - { - "fieldname":"is_pos", - "label": __("POS?"), - "fieldtype": "Check" - } - ] -} diff --git a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json deleted file mode 100644 index 0d43fd1cfd..0000000000 --- a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "add_total_row": 0, - "apply_user_permissions": 1, - "creation": "2017-11-02 00:28:38.519057", - "disabled": 0, - "docstatus": 0, - "doctype": "Report", - "idx": 0, - "is_standard": "Yes", - "modified": "2017-11-02 10:39:56.984273", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Daily Sales Payment Summary", - "owner": "Administrator", - "ref_doctype": "Sales Invoice", - "report_name": "Daily Sales Payment Summary", - "report_type": "Script Report", - "roles": [ - { - "role": "Accounts Manager" - }, - { - "role": "Accounts User" - } - ] -} \ No newline at end of file diff --git a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py b/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py deleted file mode 100644 index 76d25d09cb..0000000000 --- a/erpnext/accounts/report/daily_sales_payment_summary/daily_sales_payment_summary.py +++ /dev/null @@ -1,233 +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 flt -from frappe import msgprint, _ - -def execute(filters=None): - return _execute(filters) - -def _execute(filters, additional_table_columns=None, additional_query_columns=None): - if not filters: filters = frappe._dict({}) - - invoice_list = get_invoices(filters, additional_query_columns) - columns, income_accounts, tax_accounts = get_columns(invoice_list, additional_table_columns) - - if not invoice_list: - msgprint(_("No record found")) - return columns, invoice_list - - invoice_income_map = get_invoice_income_map(invoice_list) - invoice_income_map, invoice_tax_map = get_invoice_tax_map(invoice_list, - invoice_income_map, income_accounts) - #Cost Center & Warehouse Map - invoice_cc_wh_map = get_invoice_cc_wh_map(invoice_list) - customers = list(set([inv.customer for inv in invoice_list])) - customer_map = get_customer_details(customers) - company_currency = frappe.db.get_value("Company", filters.get("company"), "default_currency") - mode_of_payments = get_mode_of_payments([inv.name for inv in invoice_list]) - - data = [] - for inv in invoice_list: - # invoice details - cost_center = list(set(invoice_cc_wh_map.get(inv.name, {}).get("cost_center", []))) - warehouse = list(set(invoice_cc_wh_map.get(inv.name, {}).get("warehouse", []))) - - customer_details = customer_map.get(inv.customer, {}) - row = [ - inv.name, inv.posting_date, inv.customer, inv.customer_name - ] - - if additional_query_columns: - for col in additional_query_columns: - row.append(inv.get(col)) - - row +=[ - ", ".join(mode_of_payments.get(inv.name, [])), - inv.owner, - ", ".join(cost_center), ", ".join(warehouse), company_currency - ] - # map income values - base_net_total = 0 - for income_acc in income_accounts: - income_amount = flt(invoice_income_map.get(inv.name, {}).get(income_acc)) - base_net_total += income_amount - row.append(income_amount) - - # net total - row.append(base_net_total or inv.base_net_total) - # tax account - total_tax = 0 - for tax_acc in tax_accounts: - if tax_acc not in income_accounts: - tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc)) - total_tax += tax_amount - row.append(tax_amount) - - # total tax, grand total, outstanding amount & rounded total - row += [total_tax, inv.base_grand_total,inv.paid_amount, inv.outstanding_amount] - - data.append(row) - - return columns, data - -def get_columns(invoice_list, additional_table_columns): - """return columns based on filters""" - columns = [ - _("Invoice") + ":Link/Sales Invoice:120", _("Posting Date") + ":Date:80", - _("Customer") + ":Link/Customer:120", _("Customer Name") + "::120" - ] - - if additional_table_columns: - columns += additional_table_columns - - columns +=[ - _("Mode of Payment") + "::120", - _("Owner") + "::150", - _("Cost Center") + ":Link/Cost Center:100", _("Warehouse") + ":Link/Warehouse:100", - { - "fieldname": "currency", - "label": _("Currency"), - "fieldtype": "Data", - "width": 80 - } - ] - - income_accounts = tax_accounts = income_columns = tax_columns = [] - - if invoice_list: - income_accounts = frappe.db.sql_list("""select distinct income_account - from `tabSales Invoice Item` where docstatus = 1 and parent in (%s) - order by income_account""" % - ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list])) - - tax_accounts = frappe.db.sql_list("""select distinct account_head - from `tabSales Taxes and Charges` where parenttype = 'Sales Invoice' - and docstatus = 1 and base_tax_amount_after_discount_amount != 0 - and parent in (%s) order by account_head""" % - ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list])) - - income_columns = [(account + ":Currency/currency:120") for account in income_accounts] - for account in tax_accounts: - if account not in income_accounts: - tax_columns.append(account + ":Currency/currency:120") - - columns = columns + income_columns + [_("Net Total") + ":Currency/currency:120"] + tax_columns + \ - [_("Total Tax") + ":Currency/currency:120", _("Grand Total") + ":Currency/currency:120", - _("Paid Amount") + ":Currency/currency:120", - _("Outstanding Amount") + ":Currency/currency:120"] - - return columns, income_accounts, tax_accounts - -def get_conditions(filters): - conditions = "" - - if filters.get("company"): conditions += " and company=%(company)s" - if filters.get("customer"): conditions += " and customer = %(customer)s" - if filters.get("owner"): conditions += " and owner = %(owner)s" - - if filters.get("from_date"): conditions += " and posting_date >= %(from_date)s" - if filters.get("to_date"): conditions += " and posting_date <= %(to_date)s" - - if filters.get("mode_of_payment"): - conditions += """ and exists(select name from `tabSales Invoice Payment` - where parent=`tabSales Invoice`.name - and ifnull(`tabSales Invoice Payment`.mode_of_payment, '') = %(mode_of_payment)s)""" - - if filters.get("cost_center"): - conditions += """ and exists(select name from `tabSales Invoice Item` - where parent=`tabSales Invoice`.name - and ifnull(`tabSales Invoice Item`.cost_center, '') = %(cost_center)s)""" - - if filters.get("warehouse"): - conditions += """ and exists(select name from `tabSales Invoice Item` - where parent=`tabSales Invoice`.name - and ifnull(`tabSales Invoice Item`.warehouse, '') = %(warehouse)s)""" - - if filters.get("is_pos"): conditions += " and is_pos = %(is_pos)s" - - return conditions - -def get_invoices(filters, additional_query_columns): - if additional_query_columns: - additional_query_columns = ', ' + ', '.join(additional_query_columns) - - conditions = get_conditions(filters) - return frappe.db.sql("""select name, posting_date, customer, customer_name, owner, - base_net_total, base_grand_total, paid_amount, outstanding_amount {0} - from `tabSales Invoice` - where docstatus = 1 %s order by posting_date desc, name desc""".format(additional_query_columns or '') % - conditions, filters, as_dict=1) - -def get_invoice_income_map(invoice_list): - income_details = frappe.db.sql("""select parent, income_account, sum(base_net_amount) as amount - from `tabSales Invoice Item` where parent in (%s) group by parent, income_account""" % - ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) - - invoice_income_map = {} - for d in income_details: - invoice_income_map.setdefault(d.parent, frappe._dict()).setdefault(d.income_account, []) - invoice_income_map[d.parent][d.income_account] = flt(d.amount) - - return invoice_income_map - -def get_invoice_tax_map(invoice_list, invoice_income_map, income_accounts): - tax_details = frappe.db.sql("""select parent, account_head, - sum(base_tax_amount_after_discount_amount) as tax_amount - from `tabSales Taxes and Charges` where parent in (%s) group by parent, account_head""" % - ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1) - - invoice_tax_map = {} - for d in tax_details: - if d.account_head in income_accounts: - if invoice_income_map[d.parent].has_key(d.account_head): - invoice_income_map[d.parent][d.account_head] += flt(d.tax_amount) - else: - invoice_income_map[d.parent][d.account_head] = flt(d.tax_amount) - else: - invoice_tax_map.setdefault(d.parent, frappe._dict()).setdefault(d.account_head, []) - invoice_tax_map[d.parent][d.account_head] = flt(d.tax_amount) - - return invoice_income_map, invoice_tax_map - -def get_invoice_cc_wh_map(invoice_list): - - si_items = frappe.db.sql("""select parent, cost_center, warehouse - from `tabSales Invoice Item` where parent in (%s) - and (ifnull(cost_center, '') != '' or ifnull(warehouse, '') != '')""" % - ', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]),as_dict=1) - - invoice_cc_wh_map = {} - for d in si_items: - if d.cost_center: - invoice_cc_wh_map.setdefault(d.parent, frappe._dict()).setdefault( - "cost_center", []).append(d.cost_center) - - if d.warehouse: - invoice_cc_wh_map.setdefault(d.parent, frappe._dict()).setdefault( - "warehouse", []).append(d.warehouse) - - return invoice_cc_wh_map - -def get_customer_details(customers): - customer_map = {} - for cust in frappe.db.sql("""select name from `tabCustomer` - where name in (%s)""" % ", ".join(["%s"]*len(customers)), tuple(customers), as_dict=1): - customer_map.setdefault(cust.name, cust) - - return customer_map - - -def get_mode_of_payments(invoice_list): - mode_of_payments = {} - if invoice_list: - inv_mop = frappe.db.sql("""select parent, mode_of_payment - from `tabSales Invoice Payment` where parent in (%s) group by parent, mode_of_payment""" % - ', '.join(['%s']*len(invoice_list)), tuple(invoice_list), as_dict=1) - - for d in inv_mop: - mode_of_payments.setdefault(d.parent, []).append(d.mode_of_payment) - - return mode_of_payments From 438dfc081b6f795ac3fd7e5db5bdc4e4bcf5ac3e Mon Sep 17 00:00:00 2001 From: pawan Date: Sat, 4 Nov 2017 05:55:50 +0530 Subject: [PATCH 33/85] fix codacy issues --- .../report/sales_payment_summary/sales_payment_summary.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py index 3e761b104d..e1c8c52716 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals import frappe -from frappe import msgprint, _ def execute(filters=None): @@ -18,7 +17,7 @@ def get_columns(): _("Date") + ":Date:80", _("Owner") + "::150", _("Payment Mode") + "::120", - _("Warehouse") + ":Link/Cost Center:100", + _("Warehouse") + ":Link/Cost Center:100", _("Cost Center") + ":Link/Warehouse:100", _("Sales and Returns") + ":Currency/currency:120", _("Taxes") + ":Currency/currency:120", @@ -34,7 +33,7 @@ def get_sales_payment_data(filters, columns): row = [inv.posting_date, inv.owner, inv.mode_of_payment,inv.warehouse, inv.cost_center,inv.net_total, inv.total_taxes, inv.paid_amount, inv.net_total + inv.total_taxes - inv.paid_amount] data.append(row) return data - + def get_conditions(filters): conditions = "" @@ -53,7 +52,7 @@ def get_conditions(filters): def get_sales_invoice_data(filters): conditions = get_conditions(filters) - return frappe.db.sql("""select a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center, + return frappe.db.sql("""select a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center, sum(a.net_total) as "net_total",sum(a.total_taxes_and_charges) as "total_taxes", sum(a.base_paid_amount) as "paid_amount" from `tabSales Invoice` a, `tabSales Invoice Item` b, `tabSales Invoice Payment` c where a.name = b.parent and a.name = c.parent and {conditions} From 436f7b980c18f4ab6ae230b62709312550cd3d54 Mon Sep 17 00:00:00 2001 From: pawan Date: Sat, 4 Nov 2017 07:53:52 +0530 Subject: [PATCH 34/85] codacy issues --- .../report/sales_payment_summary/sales_payment_summary.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py index e1c8c52716..1cc2f93d8e 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import frappe +from frappe import _ def execute(filters=None): From e552a51266a41420264e6732fe05a879b90f40a1 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 6 Nov 2017 17:38:44 +0530 Subject: [PATCH 35/85] Minor cleanups --- .../sales_payment_summary.js | 3 +- .../sales_payment_summary.py | 28 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js index e599fcdba3..6b462144cd 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.js @@ -33,7 +33,8 @@ frappe.query_reports["Sales Payment Summary"] = { "fieldname":"owner", "label": __("Owner"), "fieldtype": "Link", - "options": "User" + "options": "User", + "defaults": user }, { "fieldname":"cost_center", diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py index 1cc2f93d8e..bb80955a6b 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -6,14 +6,12 @@ import frappe from frappe import _ def execute(filters=None): - columns, data = [], [] columns=get_columns() data=get_sales_payment_data(filters, columns) return columns, data def get_columns(): - return [ _("Date") + ":Date:80", _("Owner") + "::150", @@ -27,16 +25,16 @@ def get_columns(): ] def get_sales_payment_data(filters, columns): - sales_invoice_data = get_sales_invoice_data(filters) data = [] for inv in sales_invoice_data: - row = [inv.posting_date, inv.owner, inv.mode_of_payment,inv.warehouse, inv.cost_center,inv.net_total, inv.total_taxes, inv.paid_amount, inv.net_total + inv.total_taxes - inv.paid_amount] + row = [inv.posting_date, inv.owner, inv.mode_of_payment,inv.warehouse, + inv.cost_center,inv.net_total, inv.total_taxes, inv.paid_amount, + (inv.net_total + inv.total_taxes - inv.paid_amount)] data.append(row) return data def get_conditions(filters): - conditions = "" if filters.get("company"): conditions += " a.company=%(company)s" if filters.get("customer"): conditions += " and a.customer = %(customer)s" @@ -51,10 +49,18 @@ def get_conditions(filters): return conditions def get_sales_invoice_data(filters): - conditions = get_conditions(filters) - return frappe.db.sql("""select a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center, - sum(a.net_total) as "net_total",sum(a.total_taxes_and_charges) as "total_taxes", sum(a.base_paid_amount) as "paid_amount" - from `tabSales Invoice` a, `tabSales Invoice Item` b, `tabSales Invoice Payment` c - where a.name = b.parent and a.name = c.parent and {conditions} - group by a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center""".format(conditions=conditions),filters, as_dict=1) \ No newline at end of file + return frappe.db.sql(""" + select + a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center, + sum(a.net_total) as "net_total", + sum(a.total_taxes_and_charges) as "total_taxes", + sum(a.base_paid_amount) as "paid_amount" + from `tabSales Invoice` a, `tabSales Invoice Item` b, `tabSales Invoice Payment` c + where + a.name = b.parent + and a.name = c.parent + and {conditions} + group by + a.owner, a.posting_date, c.mode_of_payment, b.warehouse, b.cost_center + """.format(conditions=conditions), filters, as_dict=1) \ No newline at end of file From 36e2fb8d589492be9bc50c51a15982178de2a9d5 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Mon, 6 Nov 2017 17:44:59 +0530 Subject: [PATCH 36/85] minor fixes in the fee module for print and permission, delete redundant doctype (#11430) --- erpnext/patches.txt | 2 + .../doctype/fee_category/fee_category.json | 42 ++++++- .../doctype/fee_schedule/fee_schedule.json | 47 +++++++- .../doctype/fee_structure/fee_structure.json | 49 ++++++++- erpnext/schools/doctype/fees/fees.json | 104 +++++++++++++++--- erpnext/schools/doctype/program/program.json | 63 +---------- 6 files changed, 220 insertions(+), 87 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 5f5b46ba40..0589b4b037 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -456,3 +456,5 @@ erpnext.patches.v9_0.add_healthcare_domain erpnext.patches.v9_0.set_variant_item_description erpnext.patches.v9_0.set_uoms_in_variant_field erpnext.patches.v9_0.copy_old_fees_field_data +execute:frappe.delete_doc_if_exists("DocType", "Program Fee") + diff --git a/erpnext/schools/doctype/fee_category/fee_category.json b/erpnext/schools/doctype/fee_category/fee_category.json index c51027a389..2b55f8d87a 100644 --- a/erpnext/schools/doctype/fee_category/fee_category.json +++ b/erpnext/schools/doctype/fee_category/fee_category.json @@ -90,7 +90,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-06-30 08:21:47.851347", + "modified": "2017-11-02 17:57:18.069158", "modified_by": "Administrator", "module": "Schools", "name": "Fee Category", @@ -116,6 +116,46 @@ "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, diff --git a/erpnext/schools/doctype/fee_schedule/fee_schedule.json b/erpnext/schools/doctype/fee_schedule/fee_schedule.json index d2b5c52227..ab609112a1 100644 --- a/erpnext/schools/doctype/fee_schedule/fee_schedule.json +++ b/erpnext/schools/doctype/fee_schedule/fee_schedule.json @@ -25,7 +25,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Fee Structure", @@ -1029,7 +1029,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-09-19 16:24:17.266071", + "modified": "2017-11-02 17:55:22.851581", "modified_by": "Administrator", "module": "Schools", "name": "Fee Schedule", @@ -1039,7 +1039,7 @@ { "amend": 1, "apply_user_permissions": 0, - "cancel": 1, + "cancel": 0, "create": 1, "delete": 1, "email": 1, @@ -1053,6 +1053,46 @@ "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": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "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": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, "submit": 1, "write": 1 } @@ -1060,6 +1100,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "restrict_to_domain": "Education", "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/schools/doctype/fee_structure/fee_structure.json b/erpnext/schools/doctype/fee_structure/fee_structure.json index d93a667bd3..2ae0a488bb 100644 --- a/erpnext/schools/doctype/fee_structure/fee_structure.json +++ b/erpnext/schools/doctype/fee_structure/fee_structure.json @@ -165,7 +165,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, @@ -197,7 +197,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 @@ -577,7 +577,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-09-11 15:18:27.975666", + "modified": "2017-11-02 17:43:16.796845", "modified_by": "Administrator", "module": "Schools", "name": "Fee Structure", @@ -587,7 +587,7 @@ { "amend": 1, "apply_user_permissions": 0, - "cancel": 1, + "cancel": 0, "create": 1, "delete": 1, "email": 1, @@ -601,6 +601,46 @@ "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": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "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": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, "submit": 1, "write": 1 } @@ -609,6 +649,7 @@ "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Education", + "search_fields": "program, student_category, academic_year", "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/schools/doctype/fees/fees.json b/erpnext/schools/doctype/fees/fees.json index ab9a792c68..f34caf77c4 100644 --- a/erpnext/schools/doctype/fees/fees.json +++ b/erpnext/schools/doctype/fees/fees.json @@ -1,7 +1,7 @@ { "allow_copy": 0, "allow_guest_to_view": 0, - "allow_import": 0, + "allow_import": 1, "allow_rename": 0, "autoname": "naming_series:", "beta": 1, @@ -87,7 +87,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Student Name", @@ -118,7 +118,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Fee Schedule", @@ -158,7 +158,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -249,7 +249,7 @@ "options": "Company", "permlevel": 0, "precision": "", - "print_hide": 1, + "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 1, @@ -310,7 +310,7 @@ "no_copy": 1, "permlevel": 0, "precision": "", - "print_hide": 1, + "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -494,7 +494,7 @@ "options": "Student Batch Name", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -708,7 +708,7 @@ "options": "Currency", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, "remember_last_selected_value": 0, @@ -739,7 +739,7 @@ "options": "Fee Structure", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1011,7 +1011,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1132,7 +1132,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1163,7 +1163,7 @@ "options": "Account", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1194,7 +1194,7 @@ "options": "Account", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1223,7 +1223,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1254,6 +1254,35 @@ "options": "Cost Center", "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "data_42", + "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, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1276,13 +1305,53 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-09-20 23:17:09.819606", + "modified": "2017-11-02 17:31:47.155873", "modified_by": "Administrator", "module": "Schools", "name": "Fees", "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": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, { "amend": 0, "apply_user_permissions": 0, @@ -1297,7 +1366,7 @@ "print": 1, "read": 1, "report": 1, - "role": "Academics User", + "role": "Accounts Manager", "set_user_permissions": 0, "share": 1, "submit": 1, @@ -1308,7 +1377,8 @@ "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Education", - "show_name_in_global_search": 0, + "search_fields": "student, student_name", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "student_name", diff --git a/erpnext/schools/doctype/program/program.json b/erpnext/schools/doctype/program/program.json index 95ef166cb9..46581a16ca 100644 --- a/erpnext/schools/doctype/program/program.json +++ b/erpnext/schools/doctype/program/program.json @@ -223,67 +223,6 @@ "search_index": 0, "set_only_once": 0, "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fee_schedule", - "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": "Fee 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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fees", - "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": "Fees", - "length": 0, - "no_copy": 0, - "options": "Program Fee", - "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 } ], "has_web_view": 0, @@ -297,7 +236,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-06-30 08:21:49.176708", + "modified": "2017-11-02 18:08:20.823972", "modified_by": "Administrator", "module": "Schools", "name": "Program", From 57cc924d29988a9e9de5b4a31375261e184c279e Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 6 Nov 2017 18:42:37 +0530 Subject: [PATCH 37/85] [Fix] Fast clicking on an item, showing invalid grand total and quantity in the POS cart --- erpnext/selling/page/point_of_sale/point_of_sale.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 196bb960df..a0f8598ef8 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -43,6 +43,7 @@ erpnext.pos.PointOfSale = class PointOfSale { make() { return frappe.run_serially([ + () => frappe.dom.freeze(), () => { this.prepare_dom(); this.prepare_menu(); @@ -55,6 +56,7 @@ erpnext.pos.PointOfSale = class PointOfSale { frappe.timeout(1); this.make_items(); this.bind_events(); + frappe.dom.unfreeze(); }, () => this.page.set_title(__('Point of Sale')) ]); @@ -156,6 +158,7 @@ erpnext.pos.PointOfSale = class PointOfSale { } update_item_in_cart(item_code, field='qty', value=1) { + frappe.dom.freeze(); if(this.cart.exists(item_code)) { const item = this.frm.doc.items.find(i => i.item_code === item_code); frappe.flags.hide_serial_batch_dialog = false; @@ -220,6 +223,7 @@ erpnext.pos.PointOfSale = class PointOfSale { this.cart.add_item(item); this.cart.update_taxes_and_totals(); this.cart.update_grand_total(); + frappe.dom.unfreeze(); } update_item_in_frm(item, field, value) { @@ -232,8 +236,6 @@ erpnext.pos.PointOfSale = class PointOfSale { return frappe.model.set_value(item.doctype, item.name, field, value) .then(() => this.frm.script_manager.trigger('qty', item.doctype, item.name)) .then(() => { - console.log(item.qty, item.amount); - if (field === 'qty' && item.qty === 0) { frappe.model.clear_doc(item.doctype, item.name); } From 35fc45eff939b515ef07feadafa034a5d1eea798 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 6 Nov 2017 22:52:41 +0530 Subject: [PATCH 38/85] [fix] POS Profile test cases --- erpnext/accounts/doctype/pos_profile/test_pos_profile.py | 1 + erpnext/accounts/page/pos/test_pos.js | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/pos_profile/test_pos_profile.py b/erpnext/accounts/doctype/pos_profile/test_pos_profile.py index 803ee8e6c6..1e431739b5 100644 --- a/erpnext/accounts/doctype/pos_profile/test_pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/test_pos_profile.py @@ -41,6 +41,7 @@ def make_pos_profile(): "expense_account": "_Test Account Cost for Goods Sold - _TC", "income_account": "Sales - _TC", "name": "_Test POS Profile", + "pos_profile_name": "_Test POS Profile", "naming_series": "_T-POS Profile-", "selling_price_list": "_Test Price List", "territory": "_Test Territory", diff --git a/erpnext/accounts/page/pos/test_pos.js b/erpnext/accounts/page/pos/test_pos.js index 8913a9e1cc..e5524a2d92 100644 --- a/erpnext/accounts/page/pos/test_pos.js +++ b/erpnext/accounts/page/pos/test_pos.js @@ -6,6 +6,7 @@ QUnit.test("test:Sales Invoice", function(assert) { () => { return frappe.tests.make("POS Profile", [ {naming_series: "SINV"}, + {pos_profile_name: "_Test POS Profile"}, {country: "India"}, {currency: "INR"}, {write_off_account: "Write Off - FT"}, From 7fd20f303f492e552eab3d9af050eac02ddc0764 Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Wed, 8 Nov 2017 11:33:24 +0530 Subject: [PATCH 39/85] moved from MySQLdb to pymysql (#11462) --- erpnext/patches/v5_4/cleanup_journal_entry.py | 4 ++-- erpnext/patches/v5_7/item_template_attributes.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v5_4/cleanup_journal_entry.py b/erpnext/patches/v5_4/cleanup_journal_entry.py index a0c332324d..9100b8f4a8 100644 --- a/erpnext/patches/v5_4/cleanup_journal_entry.py +++ b/erpnext/patches/v5_4/cleanup_journal_entry.py @@ -1,5 +1,5 @@ import frappe -from MySQLdb import OperationalError +from pymysql import InternalError def execute(): frappe.reload_doctype("Journal Entry Account") @@ -15,6 +15,6 @@ def execute(): frappe.db.sql("""update `tabJournal Entry Account` set reference_type=%s, reference_name={0} where ifnull({0}, '') != '' """.format(fieldname), doctype) - except OperationalError: + except InternalError: # column not found pass diff --git a/erpnext/patches/v5_7/item_template_attributes.py b/erpnext/patches/v5_7/item_template_attributes.py index 22b15d32ae..6aa81f79b2 100644 --- a/erpnext/patches/v5_7/item_template_attributes.py +++ b/erpnext/patches/v5_7/item_template_attributes.py @@ -3,7 +3,7 @@ from __future__ import print_function, unicode_literals import frappe -import MySQLdb +from frappe.exceptions import SQLError def execute(): """ @@ -31,7 +31,7 @@ def execute(): try: migrate_item_variants() - except MySQLdb.ProgrammingError: + except SQLError: print("`tabItem Variant` not found") def rename_and_reload_doctypes(): From f688af3809f9a763859fd3e8590032ef989a969e Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 8 Nov 2017 11:33:39 +0530 Subject: [PATCH 40/85] [fix] Offline pos name is not defined issue in the POS (#11469) --- erpnext/accounts/doctype/sales_invoice/pos.py | 1 + .../doctype/sales_invoice/sales_invoice.py | 7 -- erpnext/accounts/page/pos/pos.js | 80 +++++++------------ 3 files changed, 28 insertions(+), 60 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 6856f62d0c..36c2365357 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -92,6 +92,7 @@ def update_pos_profile_data(doc, pos_profile, company_data): doc.customer_group = pos_profile.get('customer_group') or get_root('Customer Group') doc.territory = pos_profile.get('territory') or get_root('Territory') doc.terms = frappe.db.get_value('Terms and Conditions', pos_profile.get('tc_name'), 'terms') or doc.terms or '' + doc.offline_pos_name = '' def get_root(table): root = frappe.db.sql(""" select name from `tab%(table)s` having diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 888520ac76..995a333eba 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -70,7 +70,6 @@ class SalesInvoice(SellingController): self.clear_unallocated_advances("Sales Invoice Advance", "advances") self.add_remarks() self.validate_write_off_account() - self.validate_duplicate_offline_pos_entry() self.validate_account_for_change_amount() self.validate_fixed_asset() self.set_income_account_for_fixed_assets() @@ -464,12 +463,6 @@ class SalesInvoice(SellingController): if flt(self.write_off_amount) and not self.write_off_account: msgprint(_("Please enter Write Off Account"), raise_exception=1) - def validate_duplicate_offline_pos_entry(self): - if self.is_pos and self.offline_pos_name \ - and frappe.db.get_value('Sales Invoice', - {'offline_pos_name': self.offline_pos_name, 'docstatus': 1}): - frappe.throw(_("Duplicate offline pos sales invoice {0}").format(self.offline_pos_name)) - def validate_account_for_change_amount(self): if flt(self.change_amount) and not self.account_for_change_amount: msgprint(_("Please enter Account for Change Amount"), raise_exception=1) diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index c442062ab6..6b58033526 100644 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -179,41 +179,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ } }, - dialog_actions: function () { - var me = this; - - $(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) { - me.removed_items.push(key) - } - }) - } - - me.toggle_delete_button(); - }) - - $(this.list_body).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_delete_button(); - }) - }, - edit_record: function () { var me = this; doc_data = this.get_invoice_doc(this.si_docs); if (doc_data) { - this.frm.doc = doc_data[0][this.name]; + this.frm.doc = doc_data[0][this.frm.doc.offline_pos_name]; this.set_missing_values(); this.refresh(false); this.toggle_input_field(); @@ -226,16 +197,15 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.validate_list() this.remove_doc_from_localstorage() this.update_localstorage(); - // this.dialog_actions(); this.toggle_delete_button(); }, validate_list: function() { var me = this; this.si_docs = this.get_submitted_invoice() - $.each(this.removed_items, function(index, name){ + $.each(this.removed_items, function(index, pos_name){ $.each(me.si_docs, function(key, data){ - if(me.si_docs[key][name] && me.si_docs[key][name].offline_pos_name == name ){ + if(me.si_docs[key][pos_name] && me.si_docs[key][pos_name].offline_pos_name == pos_name ){ frappe.throw(__("Submitted orders can not be deleted")) } }) @@ -294,7 +264,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ return $.grep(this.si_docs, function (data) { for (key in data) { - return key == me.name + return key == me.frm.doc.offline_pos_name; } }) }, @@ -348,7 +318,6 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ create_new: function () { var me = this; this.frm = {} - this.name = null; this.load_data(true); this.setup(); this.set_default_customer() @@ -362,6 +331,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ if (load_doc) { this.frm.doc = JSON.parse(localStorage.getItem('doc')); + this.frm.doc.offline_pos_name = null; } $.each(this.meta, function (i, data) { @@ -629,6 +599,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ // this.list_customers.empty(); this.si_docs = this.get_doc_from_localstorage(); if (!this.si_docs.length) { + this.list_customers.find('.list-customers-table').html(""); return; } @@ -655,7 +626,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ me.list_customers_btn.toggleClass("view_customer"); me.pos_bill.show(); me.list_customers_btn.show(); - me.name = $(this).parents().attr('invoice-name') + me.frm.doc.offline_pos_name = $(this).parents().attr('invoice-name') me.edit_record(); }) @@ -675,11 +646,11 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ }); $(this.wrapper).find('.list-delete').click(function () { - me.name = $(this).parent().parent().attr('invoice-name'); + me.frm.doc.offline_pos_name = $(this).parent().parent().attr('invoice-name'); if ($(this).is(":checked")) { - me.removed_items.push(me.name); + me.removed_items.push(me.frm.doc.offline_pos_name); } else { - me.removed_items.pop(me.name) + me.removed_items.pop(me.frm.doc.offline_pos_name) } me.toggle_delete_button(); @@ -1435,7 +1406,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ }, update_paid_amount_status: function (update_paid_amount) { - if (this.name) { + if (this.frm.doc.offline_pos_name) { update_paid_amount = update_paid_amount ? false : true; } @@ -1643,18 +1614,17 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ create_invoice: function () { var me = this; - var invoice_data = {} + var invoice_data = {}; this.si_docs = this.get_doc_from_localstorage(); - if (this.name) { - this.update_invoice() + if (this.frm.doc.offline_pos_name) { + this.update_invoice(); } else { - this.name = $.now(); - this.frm.doc.offline_pos_name = this.name; + this.frm.doc.offline_pos_name = $.now(); this.frm.doc.posting_date = frappe.datetime.get_today(); this.frm.doc.posting_time = frappe.datetime.now_time(); this.frm.doc.pos_profile = this.pos_profile_data['name']; - invoice_data[this.name] = this.frm.doc - this.si_docs.push(invoice_data) + invoice_data[this.frm.doc.offline_pos_name] = this.frm.doc; + this.si_docs.push(invoice_data); this.update_localstorage(); this.set_primary_action(); } @@ -1666,12 +1636,12 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.si_docs = this.get_doc_from_localstorage(); $.each(this.si_docs, function (index, data) { for (var key in data) { - if (key == me.name) { + if (key == me.frm.doc.offline_pos_name) { me.si_docs[index][key] = me.frm.doc; me.update_localstorage(); } } - }) + }); }, update_localstorage: function () { @@ -1710,6 +1680,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ freeze_screen = this.freeze_screen || false; if ((this.si_docs.length || this.email_queue_list || this.customers_list) && !this.freeze) { + this.freeze = true; + frappe.call({ method: "erpnext.accounts.doctype.sales_invoice.pos.make_invoice", freeze: freeze_screen, @@ -1720,17 +1692,19 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ }, callback: function (r) { if (r.message) { + me.freeze = false; me.customers = r.message.synced_customers_list; me.address = r.message.synced_address; me.contacts = r.message.synced_contacts; me.removed_items = r.message.invoice; - me.removed_email = r.message.email_queue - me.removed_customers = r.message.customers + me.removed_email = r.message.email_queue; + me.removed_customers = r.message.customers; me.remove_doc_from_localstorage(); me.remove_email_queue_from_localstorage(); me.remove_customer_from_localstorage(); - me.prepare_customer_mapper() - me.autocomplete_customers() + me.prepare_customer_mapper(); + me.autocomplete_customers(); + me.render_list_customers(); } } }) From d9e2b24535feadde43ec53fdea9be32cf5319cce Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Wed, 8 Nov 2017 11:35:19 +0530 Subject: [PATCH 41/85] task name in gantt view - clickable (#11459) --- erpnext/projects/doctype/task/task_list.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/projects/doctype/task/task_list.js b/erpnext/projects/doctype/task/task_list.js index ee224d9ebe..887bd4281b 100644 --- a/erpnext/projects/doctype/task/task_list.js +++ b/erpnext/projects/doctype/task/task_list.js @@ -25,7 +25,9 @@ frappe.listview_settings['Task'] = { return [__(doc.status), colors[doc.status], "status,=," + doc.status]; }, gantt_custom_popup_html: function(ganttobj, task) { - var html = `
${ganttobj.name}
`; + var html = `
${ganttobj.name}
`; + if(task.project) html += `

Project: ${task.project}

`; html += `

Progress: ${ganttobj.progress}

`; From 72c40f0383f519ca634c673cde8aa7edbe3f89e7 Mon Sep 17 00:00:00 2001 From: Sushant Nadkar Date: Wed, 8 Nov 2017 11:35:46 +0530 Subject: [PATCH 42/85] Enabled track seen for Sales Order, Sales Invoice, Production Order, and Delivery Note (#11440) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 4 ++-- .../doctype/production_order/production_order.json | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.json | 4 ++-- erpnext/stock/doctype/delivery_note/delivery_note.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index ecd7cf9069..f2625ccc3b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -4433,7 +4433,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-10-24 12:46:48.331723", + "modified": "2017-11-03 05:31:56.636424", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", @@ -4531,5 +4531,5 @@ "timeline_field": "customer", "title_field": "title", "track_changes": 1, - "track_seen": 0 + "track_seen": 1 } \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/production_order/production_order.json b/erpnext/manufacturing/doctype/production_order/production_order.json index e56e5a1251..49d18bb9cd 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.json +++ b/erpnext/manufacturing/doctype/production_order/production_order.json @@ -1358,7 +1358,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-07-10 14:29:00.457874", + "modified": "2017-11-03 05:31:56.636424", "modified_by": "Administrator", "module": "Manufacturing", "name": "Production Order", @@ -1412,5 +1412,5 @@ "sort_order": "ASC", "title_field": "production_item", "track_changes": 1, - "track_seen": 0 + "track_seen": 1 } \ No newline at end of file diff --git a/erpnext/selling/doctype/sales_order/sales_order.json b/erpnext/selling/doctype/sales_order/sales_order.json index 36f1284c43..3ea34b1841 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.json +++ b/erpnext/selling/doctype/sales_order/sales_order.json @@ -3406,7 +3406,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-10-24 12:52:28.115742", + "modified": "2017-11-03 05:31:56.636424", "modified_by": "Administrator", "module": "Selling", "name": "Sales Order", @@ -3543,5 +3543,5 @@ "timeline_field": "customer", "title_field": "title", "track_changes": 1, - "track_seen": 0 + "track_seen": 1 } \ No newline at end of file diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.json b/erpnext/stock/doctype/delivery_note/delivery_note.json index a41ae680d2..239891c683 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.json +++ b/erpnext/stock/doctype/delivery_note/delivery_note.json @@ -3610,7 +3610,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-09-19 11:21:59.084183", + "modified": "2017-11-03 05:31:56.636424", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note", @@ -3727,5 +3727,5 @@ "timeline_field": "customer", "title_field": "title", "track_changes": 1, - "track_seen": 0 + "track_seen": 1 } \ No newline at end of file From acc8995c482f91c60f571de7842758bfb56eb531 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 31 Oct 2017 16:16:42 +0530 Subject: [PATCH 43/85] [enhance] In item variants settings added provision, do not update the fields of variants from the template but will copy the value while making new variant aginst the template --- erpnext/stock/doctype/item/item.py | 3 +- .../item_variant_settings.json | 64 ++++++++++++++++++- 2 files changed, 64 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index bf8eaba0a2..844d62bd17 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -624,7 +624,8 @@ class Item(WebsiteGenerator): template_item.save() def update_variants(self): - if self.flags.dont_update_variants: + if self.flags.dont_update_variants or \ + frappe.db.get_single_value('Item Variant Settings', 'do_not_update_variants'): return if self.has_variants: updated = [] diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json index a29137c762..8bdd46c72d 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json @@ -12,6 +12,66 @@ "editable_grid": 1, "engine": "InnoDB", "fields": [ + { + "allow_bulk_edit": 0, + "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, + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "If enabled then system will not update the fields of variants from the template but will copy the data of below mentioned fields while making new variant", + "fieldname": "do_not_update_variants", + "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": "Do not Update Variants", + "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_bulk_edit": 0, "allow_on_submit": 0, @@ -84,8 +144,8 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-09-11 12:05:16.288601", - "modified_by": "rohit@erpnext.com", + "modified": "2017-11-08 11:38:12.821404", + "modified_by": "Administrator", "module": "Stock", "name": "Item Variant Settings", "name_case": "", From db781e607ab0c2fee3d7b4d7d4ab6f2b540a5bbd Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 8 Nov 2017 12:42:37 +0600 Subject: [PATCH 44/85] bumped to version 9.2.5 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 2812fa7a0b..c5d99719f7 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.4' +__version__ = '9.2.5' def get_default_company(user=None): '''Get default company for user''' From f985ae1379e1f228eb57e3bea67544e6d17b443e Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 8 Nov 2017 12:50:46 +0600 Subject: [PATCH 45/85] bumped to version 9.2.6 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index c5d99719f7..42508f7e89 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.5' +__version__ = '9.2.6' def get_default_company(user=None): '''Get default company for user''' From ff7364621275ea8bec54b6e6c5876955acc72555 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 8 Nov 2017 14:34:38 +0530 Subject: [PATCH 46/85] Made POS Profile mandatory and changed test order --- erpnext/accounts/doctype/sales_invoice/pos.py | 2 ++ erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py | 3 ++- erpnext/selling/page/point_of_sale/point_of_sale.js | 3 +++ erpnext/tests/ui/tests.txt | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 36c2365357..63db16ca55 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -16,6 +16,8 @@ def get_pos_data(): doc = frappe.new_doc('Sales Invoice') doc.is_pos = 1; pos_profile = get_pos_profile(doc.company) or {} + if not pos_profile: + frappe.throw(_("POS Profile is required to use Point-of-Sale")) if not doc.company: doc.company = pos_profile.get('company') doc.update_stock = pos_profile.get('update_stock') diff --git a/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py b/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py index b2093c6c6f..e7833c0f5c 100644 --- a/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py +++ b/erpnext/patches/v9_0/add_user_to_child_table_in_pos_profile.py @@ -6,7 +6,8 @@ import frappe def execute(): doctype = 'POS Profile' - frappe.reload_doctype(doctype) + frappe.reload_doc('accounts', 'doctype', doctype) + frappe.reload_doc('accounts', 'doctype', 'POS Profile User') for doc in frappe.get_all(doctype): _doc = frappe.get_doc(doctype, doc.name) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index 56b341f30d..cc22966f5c 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -326,6 +326,9 @@ erpnext.pos.PointOfSale = class PointOfSale { __('Select POS Profile') ); } + } else { + frappe.dom.unfreeze(); + frappe.throw(__("POS Profile is required to use Point-of-Sale")); } }); }); diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt index 24858f3646..6cf379472c 100644 --- a/erpnext/tests/ui/tests.txt +++ b/erpnext/tests/ui/tests.txt @@ -50,8 +50,8 @@ erpnext/schools/doctype/room/test_room.js erpnext/schools/doctype/instructor/test_instructor.js erpnext/stock/doctype/warehouse/test_warehouse.js erpnext/manufacturing/doctype/production_order/test_production_order.js #long -erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js erpnext/accounts/page/pos/test_pos.js +erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js erpnext/selling/doctype/product_bundle/test_product_bundle.js erpnext/stock/doctype/delivery_note/test_delivery_note.js erpnext/stock/doctype/material_request/tests/test_material_request.js From d2cef208fe66dfc6727c7f4d79b167c7fd59b7bf Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 8 Nov 2017 13:41:10 +0530 Subject: [PATCH 47/85] [fix] catch link validation exception in POS profile and reload fees doctype --- erpnext/patches/v9_0/copy_old_fees_field_data.py | 2 ++ erpnext/patches/v9_0/set_pos_profile_name.py | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/v9_0/copy_old_fees_field_data.py b/erpnext/patches/v9_0/copy_old_fees_field_data.py index fb11ee5a56..4243c5bb62 100644 --- a/erpnext/patches/v9_0/copy_old_fees_field_data.py +++ b/erpnext/patches/v9_0/copy_old_fees_field_data.py @@ -5,6 +5,8 @@ from __future__ import unicode_literals import frappe def execute(): + frappe.reload_doc("schools", "doctype", "fees") + if "total_amount" not in frappe.db.get_table_columns("Fees"): return diff --git a/erpnext/patches/v9_0/set_pos_profile_name.py b/erpnext/patches/v9_0/set_pos_profile_name.py index bc6e50e6b3..3ae3774e3e 100644 --- a/erpnext/patches/v9_0/set_pos_profile_name.py +++ b/erpnext/patches/v9_0/set_pos_profile_name.py @@ -8,12 +8,17 @@ def execute(): doctype = 'POS Profile' frappe.reload_doctype(doctype) - for pos in frappe.get_all(doctype): + for pos in frappe.get_all(doctype, filters={'disabled': 0}): doc = frappe.get_doc(doctype, pos.name) - if not doc.user: continue + if not doc.user and doc.pos_profile_name: continue - doc.pos_profile_name = doc.user + ' - ' + doc.company - doc.save() + try: + doc.pos_profile_name = doc.user + ' - ' + doc.company + doc.flags.ignore_validate = True + doc.flags.ignore_mandatory = True + doc.save() - frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True) \ No newline at end of file + frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True) + except frappe.LinkValidationError: + frappe.db.set_value("POS Profile", doc.name, 'disabled', 1) From a65863075111fc0790e8f7f99c7eda017e6880e0 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Wed, 8 Nov 2017 14:55:54 +0530 Subject: [PATCH 48/85] remove the print option from the tools (#11484) * remove the print option for the tools * better student search queries and minor fixes in the student group --- .../assessment_result/assessment_result.js | 34 ++++++++++--------- .../assessment_result_tool.json | 8 ++--- .../student_attendance_tool.json | 8 ++--- .../doctype/student_group/student_group.py | 17 ++++++---- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.js b/erpnext/schools/doctype/assessment_result/assessment_result.js index e75f314a04..7bd1d1960b 100644 --- a/erpnext/schools/doctype/assessment_result/assessment_result.js +++ b/erpnext/schools/doctype/assessment_result/assessment_result.js @@ -7,23 +7,25 @@ cur_frm.add_fetch("assessment_plan", "maximum_assessment_score", "maximum_score" frappe.ui.form.on("Assessment Result", { assessment_plan: function(frm) { - frappe.call({ - method: "erpnext.schools.api.get_assessment_details", - args: { - assessment_plan: frm.doc.assessment_plan - }, - callback: function(r) { - if (r.message) { - frm.doc.details = []; - $.each(r.message, function(i, d) { - var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details"); - row.assessment_criteria = d.assessment_criteria; - row.maximum_score = d.maximum_score; - }); + if (frm.doc.assessment_plan) { + frappe.call({ + method: "erpnext.schools.api.get_assessment_details", + args: { + assessment_plan: frm.doc.assessment_plan + }, + callback: function(r) { + if (r.message) { + frm.doc.details = []; + $.each(r.message, function(i, d) { + var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details"); + row.assessment_criteria = d.assessment_criteria; + row.maximum_score = d.maximum_score; + }); + } + refresh_field("details"); } - refresh_field("details"); - } - }); + }); + } } }); diff --git a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json index a62a4d5434..116fbad81e 100644 --- a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json +++ b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json @@ -175,7 +175,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-06-30 08:21:47.184562", + "modified": "2017-11-08 11:51:43.247815", "modified_by": "Administrator", "module": "Schools", "name": "Assessment Result Tool", @@ -188,17 +188,17 @@ "cancel": 0, "create": 1, "delete": 0, - "email": 1, + "email": 0, "export": 0, "if_owner": 0, "import": 0, "permlevel": 0, - "print": 1, + "print": 0, "read": 1, "report": 0, "role": "Academics User", "set_user_permissions": 0, - "share": 1, + "share": 0, "submit": 0, "write": 1 } 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 59c1a84240..5c28655fa7 100644 --- a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json +++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json @@ -273,7 +273,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-06-30 08:21:51.390809", + "modified": "2017-11-08 11:53:27.994112", "modified_by": "Administrator", "module": "Schools", "name": "Student Attendance Tool", @@ -306,17 +306,17 @@ "cancel": 0, "create": 1, "delete": 0, - "email": 1, + "email": 0, "export": 0, "if_owner": 0, "import": 0, "permlevel": 0, - "print": 1, + "print": 0, "read": 1, "report": 0, "role": "Academics User", "set_user_permissions": 0, - "share": 1, + "share": 0, "submit": 0, "write": 1 } diff --git a/erpnext/schools/doctype/student_group/student_group.py b/erpnext/schools/doctype/student_group/student_group.py index 0a7fdf1e85..950632ba50 100644 --- a/erpnext/schools/doctype/student_group/student_group.py +++ b/erpnext/schools/doctype/student_group/student_group.py @@ -7,6 +7,7 @@ import frappe from frappe.model.document import Document from frappe import _ from erpnext.schools.utils import validate_duplicate_student +from frappe.utils import cint class StudentGroup(Document): def validate(self): @@ -34,9 +35,13 @@ class StudentGroup(Document): for d in self.students: if not frappe.db.get_value("Student", d.student, "enabled") and d.active: frappe.throw(_("{0} - {1} is inactive student".format(d.group_roll_number, d.student_name))) - if self.group_based_on == "Batch" and d.student not in students and frappe.defaults.get_defaults().validate_batch: + + if (self.group_based_on == "Batch") and cint(frappe.defaults.get_defaults().validate_batch)\ + and d.student not in students: frappe.throw(_("{0} - {1} is not enrolled in the Batch {2}".format(d.group_roll_number, d.student_name, self.batch))) - if self.group_based_on == "Course" and d.student not in students and frappe.defaults.get_defaults().validate_course: + + if (self.group_based_on == "Course") and cint(frappe.defaults.get_defaults().validate_course)\ + and (d.student not in students): frappe.throw(_("{0} - {1} is not enrolled in the Course {2}".format(d.group_roll_number, d.student_name, self.course))) def validate_and_set_child_table_fields(self): @@ -108,14 +113,14 @@ def fetch_students(doctype, txt, searchfield, start, page_len, filters): students = ([d.student for d in enrolled_students if d.student not in student_group_student] if enrolled_students else [""]) or [""] return frappe.db.sql("""select name, title from tabStudent - where name in ({0}) and `{1}` LIKE %s + where name in ({0}) and (`{1}` LIKE %s or title LIKE %s) order by idx desc, name limit %s, %s""".format(", ".join(['%s']*len(students)), searchfield), - tuple(students + ["%%%s%%" % txt, start, page_len])) + tuple(students + ["%%%s%%" % txt, "%%%s%%" % txt, start, page_len])) else: return frappe.db.sql("""select name, title from tabStudent - where `{0}` LIKE %s + where `{0}` LIKE %s or title LIKE %s order by idx desc, name limit %s, %s""".format(searchfield), - tuple(["%%%s%%" % txt, start, page_len])) + tuple(["%%%s%%" % txt, "%%%s%%" % txt, start, page_len])) From 045b2877b7c85b6881cc0dea58f5c3873cd016f1 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 8 Nov 2017 14:57:03 +0530 Subject: [PATCH 49/85] [fix] remove warehouse from Stock Settings if warehouse wont exists (#11487) --- erpnext/patches.txt | 1 + .../remove_non_existing_warehouse_from_stock_settings.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 486cd7cbed..220250b131 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -456,3 +456,4 @@ erpnext.patches.v9_0.set_variant_item_description erpnext.patches.v9_0.set_uoms_in_variant_field erpnext.patches.v9_0.copy_old_fees_field_data erpnext.patches.v9_0.set_pos_profile_name +erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings \ No newline at end of file diff --git a/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py b/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py new file mode 100644 index 0000000000..33dc5192d1 --- /dev/null +++ b/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + default_warehouse = frappe.db.get_value("Stock Settings", None, "default_warehouse") + if default_warehouse: + if not frappe.db.get_value("Warehouse", {"name": default_warehouse}): + frappe.db.set_value("Stock Settings", None, "default_warehouse", "") \ No newline at end of file From 3894a5ed944a038d66434ee779c0f586f9e9d9b5 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 8 Nov 2017 15:37:33 +0600 Subject: [PATCH 50/85] bumped to version 9.2.7 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 42508f7e89..362d8aa423 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.6' +__version__ = '9.2.7' def get_default_company(user=None): '''Get default company for user''' From 40016372c6cb44baa519e79cc43c3e72885c0187 Mon Sep 17 00:00:00 2001 From: pratu16x7 Date: Wed, 8 Nov 2017 16:30:15 +0530 Subject: [PATCH 51/85] [minor][hotfix] naming_series variable assignment --- erpnext/schools/doctype/student_applicant/student_applicant.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.py b/erpnext/schools/doctype/student_applicant/student_applicant.py index 465b4e474a..8cc2cbd7c9 100644 --- a/erpnext/schools/doctype/student_applicant/student_applicant.py +++ b/erpnext/schools/doctype/student_applicant/student_applicant.py @@ -12,6 +12,7 @@ class StudentApplicant(Document): def autoname(self): from frappe.model.naming import set_name_by_naming_series if self.student_admission: + naming_series = None if self.program: student_admission = get_student_admission_data(self.student_admission, self.program) if student_admission: From fe72ed003ef38a6dffc34a4b70c519e8b370f635 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 9 Nov 2017 11:47:13 +0530 Subject: [PATCH 52/85] Update test_assessment_plan.js --- .../doctype/assessment_plan/test_assessment_plan.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js b/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js index b75a41a4a0..faa39bf4e6 100644 --- a/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js +++ b/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js @@ -2,7 +2,7 @@ QUnit.module('schools'); QUnit.test('Test: Assessment Plan', function(assert){ - assert.expect(7); + assert.expect(6); let done = assert.async(); let room_name, instructor_name, assessment_name; @@ -49,10 +49,6 @@ QUnit.test('Test: Assessment Plan', function(assert){ assert.equal(cur_frm.doc.assessment_plan, assessment_name, 'Assessment correctly set'); assert.equal(cur_frm.doc.student_group, 'test-course-wise-group-2', 'Course for Assessment correctly set'); }, - () => cur_frm.print_doc(), - () => frappe.timeout(1), - () => {assert.ok($('.btn-print-print').is(':visible'), "Print Format Available");}, - () => done() ]); -}); \ No newline at end of file +}); From c4de619eac87036492d72fedfca9b38dee443e5e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 9 Nov 2017 14:36:11 +0530 Subject: [PATCH 53/85] Update assessment_plan.py --- erpnext/schools/doctype/assessment_plan/assessment_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.py b/erpnext/schools/doctype/assessment_plan/assessment_plan.py index a09f3ee67d..55c41485f0 100644 --- a/erpnext/schools/doctype/assessment_plan/assessment_plan.py +++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.py @@ -43,7 +43,7 @@ class AssessmentPlan(Document): assessment_criteria_list = frappe.db.sql_list(''' select apc.assessment_criteria from `tabAssessment Plan` ap , `tabAssessment Plan Criteria` apc where ap.name = apc.parent and ap.course=%s and ap.student_group=%s and ap.assessment_group=%s - and ap.name != %s''', (self.course, self.student_group, self.assessment_group, self.name)) + and ap.name != %s and ap.docstatus=1''', (self.course, self.student_group, self.assessment_group, self.name)) for d in self.assessment_criteria: if d.assessment_criteria in assessment_criteria_list: frappe.throw(_("You have already assessed for the assessment criteria {}.") From 4a864c1eea27ce8062a1ab224552beb7d6e22e43 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 9 Nov 2017 19:01:21 +0530 Subject: [PATCH 54/85] [fix] Update bom item description (#11498) * [fix] Update bom item description * Update item.py --- erpnext/stock/doctype/item/item.py | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 844d62bd17..6a6af3d583 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -91,7 +91,7 @@ class Item(WebsiteGenerator): self.validate_barcode() self.cant_change() self.validate_warehouse_for_reorder() - self.update_item_desc() + self.update_bom_item_desc() self.synced_with_hub = 0 self.validate_has_variants() @@ -599,13 +599,27 @@ class Item(WebsiteGenerator): row.label = label row.description = desc - def update_item_desc(self): - if frappe.db.get_value('BOM',self.name, 'description') != self.description: - frappe.db.sql("""update `tabBOM` set description = %s where item = %s and docstatus < 2""",(self.description, self.name)) - frappe.db.sql("""update `tabBOM Item` set description = %s where - item_code = %s and docstatus < 2""",(self.description, self.name)) - frappe.db.sql("""update `tabBOM Explosion Item` set description = %s where - item_code = %s and docstatus < 2""",(self.description, self.name)) + def update_bom_item_desc(self): + if self.is_new(): return + + if self.db_get('description') != self.description: + frappe.db.sql(""" + update `tabBOM` + set description = %s + where item = %s and docstatus < 2 + """, (self.description, self.name)) + + frappe.db.sql(""" + update `tabBOM Item` + set description = %s + where item_code = %s and docstatus < 2 + """, (self.description, self.name)) + + frappe.db.sql(""" + update `tabBOM Explosion Item` + set description = %s + where item_code = %s and docstatus < 2 + """, (self.description, self.name)) def update_template_item(self): """Set Show in Website for Template Item if True for its Variant""" From 99e31f97b86a9a29ca4e6a2d4db0e352186ff326 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 10 Nov 2017 10:50:49 +0530 Subject: [PATCH 55/85] set default params for paging (#11500) --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index b1618d5eb9..37afed7a0e 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -185,7 +185,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals "page_len": page_len }, as_dict=as_dict) -def bom(doctype, txt, searchfield, start, page_len, filters): +def bom(doctype, txt, searchfield, filters, start=0, page_len=20): conditions = [] return frappe.db.sql("""select tabBOM.name, tabBOM.item From 1ce48e7032070cda0c5f503a7b52a8799dd632d3 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 10 Nov 2017 10:53:12 +0530 Subject: [PATCH 56/85] [fix] POS profile patch (#11501) --- erpnext/patches/v9_0/set_pos_profile_name.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v9_0/set_pos_profile_name.py b/erpnext/patches/v9_0/set_pos_profile_name.py index 3ae3774e3e..1958e2c777 100644 --- a/erpnext/patches/v9_0/set_pos_profile_name.py +++ b/erpnext/patches/v9_0/set_pos_profile_name.py @@ -11,7 +11,7 @@ def execute(): for pos in frappe.get_all(doctype, filters={'disabled': 0}): doc = frappe.get_doc(doctype, pos.name) - if not doc.user and doc.pos_profile_name: continue + if not doc.user or doc.pos_profile_name: continue try: doc.pos_profile_name = doc.user + ' - ' + doc.company From aeb002635475babf8a63a75683b5efa0b440e691 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Fri, 10 Nov 2017 10:58:43 +0530 Subject: [PATCH 57/85] commits from develop merged PR's (#11491) * better student search queries and minor fixes in the student group * remove the print option for the tools * fixes for the chart * minor fixes in the fee module for print and permission, delete redundant doctype * set the naming series and independent dob validation --- erpnext/patches.txt | 3 +- .../assessment_result/assessment_result.js | 34 +++--- .../assessment_result_tool.json | 8 +- .../doctype/fee_category/fee_category.json | 42 ++++++- .../doctype/fee_schedule/fee_schedule.json | 47 +++++++- .../doctype/fee_structure/fee_structure.json | 49 ++++++++- erpnext/schools/doctype/fees/fees.json | 104 +++++++++++++++--- erpnext/schools/doctype/program/program.json | 63 +---------- .../student_applicant/student_applicant.py | 22 ++-- .../student_attendance_tool.json | 8 +- .../doctype/student_group/student_group.py | 17 ++- .../course_wise_assessment_report.py | 12 +- 12 files changed, 277 insertions(+), 132 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 220250b131..8d7ca10a19 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -456,4 +456,5 @@ erpnext.patches.v9_0.set_variant_item_description erpnext.patches.v9_0.set_uoms_in_variant_field erpnext.patches.v9_0.copy_old_fees_field_data erpnext.patches.v9_0.set_pos_profile_name -erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings \ No newline at end of file +erpnext.patches.v9_0.remove_non_existing_warehouse_from_stock_settings +execute:frappe.delete_doc_if_exists("DocType", "Program Fee") diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.js b/erpnext/schools/doctype/assessment_result/assessment_result.js index e75f314a04..7bd1d1960b 100644 --- a/erpnext/schools/doctype/assessment_result/assessment_result.js +++ b/erpnext/schools/doctype/assessment_result/assessment_result.js @@ -7,23 +7,25 @@ cur_frm.add_fetch("assessment_plan", "maximum_assessment_score", "maximum_score" frappe.ui.form.on("Assessment Result", { assessment_plan: function(frm) { - frappe.call({ - method: "erpnext.schools.api.get_assessment_details", - args: { - assessment_plan: frm.doc.assessment_plan - }, - callback: function(r) { - if (r.message) { - frm.doc.details = []; - $.each(r.message, function(i, d) { - var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details"); - row.assessment_criteria = d.assessment_criteria; - row.maximum_score = d.maximum_score; - }); + if (frm.doc.assessment_plan) { + frappe.call({ + method: "erpnext.schools.api.get_assessment_details", + args: { + assessment_plan: frm.doc.assessment_plan + }, + callback: function(r) { + if (r.message) { + frm.doc.details = []; + $.each(r.message, function(i, d) { + var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details"); + row.assessment_criteria = d.assessment_criteria; + row.maximum_score = d.maximum_score; + }); + } + refresh_field("details"); } - refresh_field("details"); - } - }); + }); + } } }); diff --git a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json index a62a4d5434..116fbad81e 100644 --- a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json +++ b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.json @@ -175,7 +175,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-06-30 08:21:47.184562", + "modified": "2017-11-08 11:51:43.247815", "modified_by": "Administrator", "module": "Schools", "name": "Assessment Result Tool", @@ -188,17 +188,17 @@ "cancel": 0, "create": 1, "delete": 0, - "email": 1, + "email": 0, "export": 0, "if_owner": 0, "import": 0, "permlevel": 0, - "print": 1, + "print": 0, "read": 1, "report": 0, "role": "Academics User", "set_user_permissions": 0, - "share": 1, + "share": 0, "submit": 0, "write": 1 } diff --git a/erpnext/schools/doctype/fee_category/fee_category.json b/erpnext/schools/doctype/fee_category/fee_category.json index c51027a389..2b55f8d87a 100644 --- a/erpnext/schools/doctype/fee_category/fee_category.json +++ b/erpnext/schools/doctype/fee_category/fee_category.json @@ -90,7 +90,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-06-30 08:21:47.851347", + "modified": "2017-11-02 17:57:18.069158", "modified_by": "Administrator", "module": "Schools", "name": "Fee Category", @@ -116,6 +116,46 @@ "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, diff --git a/erpnext/schools/doctype/fee_schedule/fee_schedule.json b/erpnext/schools/doctype/fee_schedule/fee_schedule.json index d2b5c52227..ab609112a1 100644 --- a/erpnext/schools/doctype/fee_schedule/fee_schedule.json +++ b/erpnext/schools/doctype/fee_schedule/fee_schedule.json @@ -25,7 +25,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 1, "in_list_view": 1, "in_standard_filter": 0, "label": "Fee Structure", @@ -1029,7 +1029,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-09-19 16:24:17.266071", + "modified": "2017-11-02 17:55:22.851581", "modified_by": "Administrator", "module": "Schools", "name": "Fee Schedule", @@ -1039,7 +1039,7 @@ { "amend": 1, "apply_user_permissions": 0, - "cancel": 1, + "cancel": 0, "create": 1, "delete": 1, "email": 1, @@ -1053,6 +1053,46 @@ "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": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "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": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, "submit": 1, "write": 1 } @@ -1060,6 +1100,7 @@ "quick_entry": 0, "read_only": 0, "read_only_onload": 0, + "restrict_to_domain": "Education", "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/schools/doctype/fee_structure/fee_structure.json b/erpnext/schools/doctype/fee_structure/fee_structure.json index d93a667bd3..2ae0a488bb 100644 --- a/erpnext/schools/doctype/fee_structure/fee_structure.json +++ b/erpnext/schools/doctype/fee_structure/fee_structure.json @@ -165,7 +165,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, @@ -197,7 +197,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 @@ -577,7 +577,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-09-11 15:18:27.975666", + "modified": "2017-11-02 17:43:16.796845", "modified_by": "Administrator", "module": "Schools", "name": "Fee Structure", @@ -587,7 +587,7 @@ { "amend": 1, "apply_user_permissions": 0, - "cancel": 1, + "cancel": 0, "create": 1, "delete": 1, "email": 1, @@ -601,6 +601,46 @@ "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": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, + { + "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": "Accounts Manager", + "set_user_permissions": 0, + "share": 1, "submit": 1, "write": 1 } @@ -609,6 +649,7 @@ "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Education", + "search_fields": "program, student_category, academic_year", "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", diff --git a/erpnext/schools/doctype/fees/fees.json b/erpnext/schools/doctype/fees/fees.json index ab9a792c68..f34caf77c4 100644 --- a/erpnext/schools/doctype/fees/fees.json +++ b/erpnext/schools/doctype/fees/fees.json @@ -1,7 +1,7 @@ { "allow_copy": 0, "allow_guest_to_view": 0, - "allow_import": 0, + "allow_import": 1, "allow_rename": 0, "autoname": "naming_series:", "beta": 1, @@ -87,7 +87,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Student Name", @@ -118,7 +118,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, - "in_global_search": 0, + "in_global_search": 1, "in_list_view": 0, "in_standard_filter": 0, "label": "Fee Schedule", @@ -158,7 +158,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -249,7 +249,7 @@ "options": "Company", "permlevel": 0, "precision": "", - "print_hide": 1, + "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 1, @@ -310,7 +310,7 @@ "no_copy": 1, "permlevel": 0, "precision": "", - "print_hide": 1, + "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -494,7 +494,7 @@ "options": "Student Batch Name", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -708,7 +708,7 @@ "options": "Currency", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 1, "remember_last_selected_value": 0, @@ -739,7 +739,7 @@ "options": "Fee Structure", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1011,7 +1011,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1132,7 +1132,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1163,7 +1163,7 @@ "options": "Account", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1194,7 +1194,7 @@ "options": "Account", "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1223,7 +1223,7 @@ "no_copy": 0, "permlevel": 0, "precision": "", - "print_hide": 0, + "print_hide": 1, "print_hide_if_no_value": 0, "read_only": 0, "remember_last_selected_value": 0, @@ -1254,6 +1254,35 @@ "options": "Cost Center", "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "data_42", + "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, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, @@ -1276,13 +1305,53 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-09-20 23:17:09.819606", + "modified": "2017-11-02 17:31:47.155873", "modified_by": "Administrator", "module": "Schools", "name": "Fees", "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": "Accounts User", + "set_user_permissions": 0, + "share": 1, + "submit": 1, + "write": 1 + }, { "amend": 0, "apply_user_permissions": 0, @@ -1297,7 +1366,7 @@ "print": 1, "read": 1, "report": 1, - "role": "Academics User", + "role": "Accounts Manager", "set_user_permissions": 0, "share": 1, "submit": 1, @@ -1308,7 +1377,8 @@ "read_only": 0, "read_only_onload": 0, "restrict_to_domain": "Education", - "show_name_in_global_search": 0, + "search_fields": "student, student_name", + "show_name_in_global_search": 1, "sort_field": "modified", "sort_order": "DESC", "title_field": "student_name", diff --git a/erpnext/schools/doctype/program/program.json b/erpnext/schools/doctype/program/program.json index 95ef166cb9..46581a16ca 100644 --- a/erpnext/schools/doctype/program/program.json +++ b/erpnext/schools/doctype/program/program.json @@ -223,67 +223,6 @@ "search_index": 0, "set_only_once": 0, "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fee_schedule", - "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": "Fee 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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fees", - "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": "Fees", - "length": 0, - "no_copy": 0, - "options": "Program Fee", - "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 } ], "has_web_view": 0, @@ -297,7 +236,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-06-30 08:21:49.176708", + "modified": "2017-11-02 18:08:20.823972", "modified_by": "Administrator", "module": "Schools", "name": "Program", diff --git a/erpnext/schools/doctype/student_applicant/student_applicant.py b/erpnext/schools/doctype/student_applicant/student_applicant.py index 8cc2cbd7c9..6d0957c502 100644 --- a/erpnext/schools/doctype/student_applicant/student_applicant.py +++ b/erpnext/schools/doctype/student_applicant/student_applicant.py @@ -14,9 +14,12 @@ class StudentApplicant(Document): if self.student_admission: naming_series = None if self.program: + # set the naming series from the student admission if provided. student_admission = get_student_admission_data(self.student_admission, self.program) if student_admission: naming_series = student_admission.get("applicant_naming_series") + else: + naming_series = None else: frappe.throw(_("Select the program first")) @@ -41,15 +44,16 @@ class StudentApplicant(Document): def validation_from_student_admission(self): student_admission = get_student_admission_data(self.student_admission, self.program) - if student_admission: - if (( - student_admission.minimum_age - and getdate(student_admission.minimum_age) > getdate(self.date_of_birth) - ) or ( - student_admission.maximum_age - and getdate(student_admission.maximum_age) < getdate(self.date_of_birth) - )): - frappe.throw(_("Not eligible for the admission in this program as per DOB")) + + # different validation for minimum and maximum age so that either min/max can also work independently. + if student_admission and student_admission.minimum_age and \ + getdate(student_admission.minimum_age) < getdate(self.date_of_birth): + frappe.throw(_("Not eligible for the admission in this program as per DOB")) + + if student_admission and student_admission.maximum_age and \ + getdate(student_admission.maximum_age) > getdate(self.date_of_birth): + frappe.throw(_("Not eligible for the admission in this program as per DOB")) + def on_payment_authorized(self, *args, **kwargs): self.db_set('paid', 1) 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 59c1a84240..5c28655fa7 100644 --- a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json +++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.json @@ -273,7 +273,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-06-30 08:21:51.390809", + "modified": "2017-11-08 11:53:27.994112", "modified_by": "Administrator", "module": "Schools", "name": "Student Attendance Tool", @@ -306,17 +306,17 @@ "cancel": 0, "create": 1, "delete": 0, - "email": 1, + "email": 0, "export": 0, "if_owner": 0, "import": 0, "permlevel": 0, - "print": 1, + "print": 0, "read": 1, "report": 0, "role": "Academics User", "set_user_permissions": 0, - "share": 1, + "share": 0, "submit": 0, "write": 1 } diff --git a/erpnext/schools/doctype/student_group/student_group.py b/erpnext/schools/doctype/student_group/student_group.py index 0a7fdf1e85..950632ba50 100644 --- a/erpnext/schools/doctype/student_group/student_group.py +++ b/erpnext/schools/doctype/student_group/student_group.py @@ -7,6 +7,7 @@ import frappe from frappe.model.document import Document from frappe import _ from erpnext.schools.utils import validate_duplicate_student +from frappe.utils import cint class StudentGroup(Document): def validate(self): @@ -34,9 +35,13 @@ class StudentGroup(Document): for d in self.students: if not frappe.db.get_value("Student", d.student, "enabled") and d.active: frappe.throw(_("{0} - {1} is inactive student".format(d.group_roll_number, d.student_name))) - if self.group_based_on == "Batch" and d.student not in students and frappe.defaults.get_defaults().validate_batch: + + if (self.group_based_on == "Batch") and cint(frappe.defaults.get_defaults().validate_batch)\ + and d.student not in students: frappe.throw(_("{0} - {1} is not enrolled in the Batch {2}".format(d.group_roll_number, d.student_name, self.batch))) - if self.group_based_on == "Course" and d.student not in students and frappe.defaults.get_defaults().validate_course: + + if (self.group_based_on == "Course") and cint(frappe.defaults.get_defaults().validate_course)\ + and (d.student not in students): frappe.throw(_("{0} - {1} is not enrolled in the Course {2}".format(d.group_roll_number, d.student_name, self.course))) def validate_and_set_child_table_fields(self): @@ -108,14 +113,14 @@ def fetch_students(doctype, txt, searchfield, start, page_len, filters): students = ([d.student for d in enrolled_students if d.student not in student_group_student] if enrolled_students else [""]) or [""] return frappe.db.sql("""select name, title from tabStudent - where name in ({0}) and `{1}` LIKE %s + where name in ({0}) and (`{1}` LIKE %s or title LIKE %s) order by idx desc, name limit %s, %s""".format(", ".join(['%s']*len(students)), searchfield), - tuple(students + ["%%%s%%" % txt, start, page_len])) + tuple(students + ["%%%s%%" % txt, "%%%s%%" % txt, start, page_len])) else: return frappe.db.sql("""select name, title from tabStudent - where `{0}` LIKE %s + where `{0}` LIKE %s or title LIKE %s order by idx desc, name limit %s, %s""".format(searchfield), - tuple(["%%%s%%" % txt, start, page_len])) + tuple(["%%%s%%" % txt, "%%%s%%" % txt, start, page_len])) diff --git a/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py b/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py index 9bdf621a61..492d738448 100644 --- a/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py +++ b/erpnext/schools/report/course_wise_assessment_report/course_wise_assessment_report.py @@ -173,14 +173,16 @@ def get_column(assessment_criteria, total_maximum_score): def get_chart_data(grades, assessment_criteria_list, kounter): grades = sorted(grades) datasets = [] + for grade in grades: - tmp = [] - for ac in assessment_criteria_list: - if grade in kounter[ac]: - tmp.append(kounter[ac][grade]) + tmp = frappe._dict({"values":[], "title": grade}) + for criteria in assessment_criteria_list: + if grade in kounter[criteria]: + tmp["values"].append(kounter[criteria][grade]) else: - tmp.append(0) + tmp["values"].append(0) datasets.append(tmp) + return { "data": { "labels": assessment_criteria_list, From 887285ed1a02f4430ebc8f4a32deea63980405d2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 10 Nov 2017 10:59:07 +0530 Subject: [PATCH 58/85] Update test_assessment_plan.js --- .../schools/doctype/assessment_plan/test_assessment_plan.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js b/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js index b75a41a4a0..d1972a1a8e 100644 --- a/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js +++ b/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js @@ -49,10 +49,6 @@ QUnit.test('Test: Assessment Plan', function(assert){ assert.equal(cur_frm.doc.assessment_plan, assessment_name, 'Assessment correctly set'); assert.equal(cur_frm.doc.student_group, 'test-course-wise-group-2', 'Course for Assessment correctly set'); }, - () => cur_frm.print_doc(), - () => frappe.timeout(1), - () => {assert.ok($('.btn-print-print').is(':visible'), "Print Format Available");}, - () => done() ]); -}); \ No newline at end of file +}); From 8e3da7f70e44c10b9cdb8e7476e3ec25938657d5 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 10 Nov 2017 10:59:17 +0530 Subject: [PATCH 59/85] Update test_assessment_plan.js --- erpnext/schools/doctype/assessment_plan/test_assessment_plan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js b/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js index d1972a1a8e..faa39bf4e6 100644 --- a/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js +++ b/erpnext/schools/doctype/assessment_plan/test_assessment_plan.js @@ -2,7 +2,7 @@ QUnit.module('schools'); QUnit.test('Test: Assessment Plan', function(assert){ - assert.expect(7); + assert.expect(6); let done = assert.async(); let room_name, instructor_name, assessment_name; From 15753074bfe4ad54b0ac38622fd7c1e9b23dfd0b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 10 Nov 2017 11:12:43 +0530 Subject: [PATCH 60/85] Nestedset model fixes for changing parent and renaming (#11467) --- erpnext/accounts/doctype/account/account.py | 8 +++----- erpnext/accounts/doctype/cost_center/cost_center.py | 5 ++--- .../delivered_items_to_be_billed.json | 4 ++-- .../ordered_items_to_be_billed.json | 4 ++-- .../received_items_to_be_billed.json | 4 ++-- erpnext/setup/doctype/item_group/item_group.py | 3 --- erpnext/stock/doctype/warehouse/warehouse.py | 8 ++++++-- .../ordered_items_to_be_delivered.json | 4 ++-- 8 files changed, 19 insertions(+), 21 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 0787a1f5e8..b31c5d6529 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -205,12 +205,10 @@ class Account(Document): return new_account def after_rename(self, old, new, merge=False): + super(Account, self).after_rename(old, new, merge) + if not merge: - frappe.db.set_value("Account", new, "account_name", - " - ".join(new.split(" - ")[:-1])) - else: - from frappe.utils.nestedset import rebuild_tree - rebuild_tree("Account", "parent_account") + frappe.db.set_value("Account", new, "account_name", " - ".join(new.split(" - ")[:-1])) def get_parent_account(doctype, txt, searchfield, start, page_len, filters): return frappe.db.sql("""select name from tabAccount diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py index 12d5e19b7d..55388a5d10 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.py +++ b/erpnext/accounts/doctype/cost_center/cost_center.py @@ -59,9 +59,8 @@ class CostCenter(NestedSet): return new_cost_center def after_rename(self, olddn, newdn, merge=False): + super(CostCenter, self).after_rename(olddn, newdn, merge) + if not merge: frappe.db.set_value("Cost Center", newdn, "cost_center_name", " - ".join(newdn.split(" - ")[:-1])) - else: - super(CostCenter, self).after_rename(olddn, newdn, merge) - diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json index f0399b0a69..08bbf8d6b6 100644 --- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json +++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "apply_user_permissions": 1, "creation": "2013-07-30 17:28:49", "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 3, "is_standard": "Yes", - "modified": "2017-02-24 20:20:20.613388", + "modified": "2017-11-06 13:04:36.338268", "modified_by": "Administrator", "module": "Accounts", "name": "Delivered Items To Be Billed", diff --git a/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json b/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json index db3c9d2ca2..c983dc9629 100644 --- a/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json +++ b/erpnext/accounts/report/ordered_items_to_be_billed/ordered_items_to_be_billed.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "apply_user_permissions": 1, "creation": "2013-02-21 14:26:44", "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 3, "is_standard": "Yes", - "modified": "2017-02-24 20:20:13.972178", + "modified": "2017-11-06 13:04:51.559061", "modified_by": "Administrator", "module": "Accounts", "name": "Ordered Items To Be Billed", diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json index 906481fa74..64eb984833 100644 --- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json +++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "apply_user_permissions": 1, "creation": "2013-07-30 18:35:10", "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 3, "is_standard": "Yes", - "modified": "2017-02-24 19:59:52.887744", + "modified": "2017-11-06 13:04:26.094432", "modified_by": "Administrator", "module": "Accounts", "name": "Received Items To Be Billed", diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 2766ba067f..a4c377e8cc 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -47,9 +47,6 @@ class ItemGroup(NestedSet, WebsiteGenerator): return self.route - def after_rename(self, olddn, newdn, merge=False): - NestedSet.after_rename(self, olddn, newdn, merge) - def on_trash(self): NestedSet.on_trash(self) WebsiteGenerator.on_trash(self) diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index b0335d7d3f..4f7cf0b286 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -64,6 +64,8 @@ class Warehouse(NestedSet): where parent_warehouse = %s""", self.name) def before_rename(self, old_name, new_name, merge=False): + super(Warehouse, self).before_rename(old_name, new_name, merge) + # Add company abbr if not provided new_warehouse = erpnext.encode_company_abbr(new_name, self.company) @@ -77,12 +79,14 @@ class Warehouse(NestedSet): return new_warehouse def after_rename(self, old_name, new_name, merge=False): + super(Warehouse, self).after_rename(old_name, new_name, merge) + new_warehouse_name = self.get_new_warehouse_name_without_abbr(new_name) self.db_set("warehouse_name", new_warehouse_name) - + if merge: self.recalculate_bin_qty(new_name) - + def get_new_warehouse_name_without_abbr(self, name): company_abbr = frappe.db.get_value("Company", self.company, "abbr") parts = name.rsplit(" - ", 1) diff --git a/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json b/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json index ed48a0fbd5..58b1be4345 100644 --- a/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json +++ b/erpnext/stock/report/ordered_items_to_be_delivered/ordered_items_to_be_delivered.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "apply_user_permissions": 1, "creation": "2013-02-22 18:01:55", "disabled": 0, @@ -7,7 +7,7 @@ "doctype": "Report", "idx": 3, "is_standard": "Yes", - "modified": "2017-09-18 12:28:49.322622", + "modified": "2017-11-06 13:05:38.965229", "modified_by": "Administrator", "module": "Stock", "name": "Ordered Items To Be Delivered", From 1077c782a3598ddd5ca9d1e4cf75334434ce5556 Mon Sep 17 00:00:00 2001 From: Alchez Date: Fri, 10 Nov 2017 11:14:57 +0530 Subject: [PATCH 61/85] [Fix] Packing Slip creation if custom field does not have a value (#11423) * [Fix] Packing Slip creation if custom field is Column/Section Break * Used no_value_fields and sorted imports * Update packing_slip.py --- .../stock/doctype/packing_slip/packing_slip.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 25fde08eec..ec5392f99e 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -2,11 +2,13 @@ # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals -import frappe -from frappe.utils import flt, cint -from frappe import _ +import frappe +from frappe import _ +from frappe.model import no_value_fields from frappe.model.document import Document +from frappe.utils import cint, flt + class PackingSlip(Document): @@ -84,11 +86,12 @@ class PackingSlip(Document): * No. of Cases of this packing slip """ - # also pick custom fields from delivery note rows = [d.item_code for d in self.get("items")] - custom_fields = ', '.join(['dni.`{0}`'.format(d.fieldname) for d in \ - frappe.get_meta("Delivery Note Item").get_custom_fields()]) + # also pick custom fields from delivery note + custom_fields = ', '.join(['dni.`{0}`'.format(d.fieldname) + for d in frappe.get_meta("Delivery Note Item").get_custom_fields() + if d.fieldtype not in no_value_fields]) if custom_fields: custom_fields = ', ' + custom_fields From e59c9ce9f48bb962f756ca511e8c8ce9a6f0e375 Mon Sep 17 00:00:00 2001 From: KanchanChauhan Date: Fri, 10 Nov 2017 11:16:29 +0530 Subject: [PATCH 62/85] Checkbox has_expiry_date in Item to make suer Expiry Date is entered in Batch (#11413) --- erpnext/stock/doctype/batch/batch.js | 5 + erpnext/stock/doctype/item/item.json | 6583 +++++++++++++------------- 2 files changed, 3312 insertions(+), 3276 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js index 1822a06fec..20581dccec 100644 --- a/erpnext/stock/doctype/batch/batch.js +++ b/erpnext/stock/doctype/batch/batch.js @@ -24,6 +24,11 @@ frappe.ui.form.on('Batch', { frm.trigger('make_dashboard'); } }, + item: (frm) => { + frappe.db.get_value('Item', {name: frm.doc.item}, 'has_expiry_date', (r) => { + frm.toggle_reqd('expiry_date', r.has_expiry_date); + }); + }, make_dashboard: (frm) => { if(!frm.is_new()) { frappe.call({ diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index fd85a50d40..b86ad46985 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -1,3509 +1,3540 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 1, - "autoname": "field:item_code", - "beta": 0, - "creation": "2013-05-03 10:45:46", - "custom": 0, - "default_print_format": "", - "description": "A Product or a Service that is bought, sold or kept in stock.", - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", + "allow_copy": 0, + "allow_guest_to_view": 0, + "allow_import": 1, + "allow_rename": 1, + "autoname": "field:item_code", + "beta": 0, + "creation": "2013-05-03 10:45:46", + "custom": 0, + "default_print_format": "", + "description": "A Product or a Service that is bought, sold or kept in stock.", + "docstatus": 0, + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 1, + "engine": "InnoDB", "fields": [ { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "name_and_description_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, - "oldfieldtype": "Section Break", - "options": "fa fa-flag", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "name_and_description_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, + "oldfieldtype": "Section Break", + "options": "fa fa-flag", + "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_bulk_edit": 0, - "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, - "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": 0, - "search_index": 0, - "set_only_once": 1, + "allow_bulk_edit": 0, + "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, + "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": 0, + "search_index": 0, + "set_only_once": 1, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "item_code", - "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": "Item Code", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_code", - "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": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "item_code", + "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": "Item Code", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_code", + "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": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "variant_of", - "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified", - "fieldname": "variant_of", - "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": "Variant Of", - "length": 0, - "no_copy": 0, - "options": "Item", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "variant_of", + "description": "If item is a variant of another item then description, image, pricing, taxes etc will be set from the template unless explicitly specified", + "fieldname": "variant_of", + "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": "Variant Of", + "length": 0, + "no_copy": 0, + "options": "Item", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "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": 0, - "in_standard_filter": 0, - "label": "Item Name", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_name", - "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": 0, - "search_index": 1, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "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": 0, + "in_standard_filter": 0, + "label": "Item Name", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_name", + "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": 0, + "search_index": 1, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "barcode", - "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": "Barcode", - "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": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "barcode", + "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": "Barcode", + "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": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "item_group", - "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": "Item Group", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_group", - "oldfieldtype": "Link", - "options": "Item Group", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "item_group", + "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": "Item Group", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_group", + "oldfieldtype": "Link", + "options": "Item Group", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "is_item_from_hub", - "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 Item from Hub", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_item_from_hub", + "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 Item from Hub", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "stock_uom", - "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 Unit of Measure", - "length": 0, - "no_copy": 0, - "oldfieldname": "stock_uom", - "oldfieldtype": "Link", - "options": "UOM", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "", + "fieldname": "stock_uom", + "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 Unit of Measure", + "length": 0, + "no_copy": 0, + "oldfieldname": "stock_uom", + "oldfieldtype": "Link", + "options": "UOM", + "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_bulk_edit": 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, - "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, + "allow_bulk_edit": 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, + "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_bulk_edit": 0, - "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, - "set_only_once": 0, + "allow_bulk_edit": 0, + "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, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "description": "", - "fieldname": "is_stock_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": "Maintain Stock", - "length": 0, - "no_copy": 0, - "oldfieldname": "is_stock_item", - "oldfieldtype": "Select", - "options": "", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "description": "", + "fieldname": "is_stock_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": "Maintain Stock", + "length": 0, + "no_copy": 0, + "oldfieldname": "is_stock_item", + "oldfieldtype": "Select", + "options": "", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(doc.__islocal&&doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", - "fieldname": "opening_stock", - "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": "Opening Stock", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.__islocal&&doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", + "fieldname": "opening_stock", + "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": "Opening Stock", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", - "fieldname": "valuation_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": "Valuation Rate", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.is_stock_item && !doc.has_serial_no && !doc.has_batch_no)", + "fieldname": "valuation_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": "Valuation Rate", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 1, - "collapsible": 0, - "columns": 0, - "fieldname": "standard_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": "Standard Selling Rate", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fieldname": "standard_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": "Standard Selling Rate", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "is_fixed_asset", - "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 Fixed Asset", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "is_fixed_asset", + "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 Fixed Asset", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_fixed_asset", - "fieldname": "asset_category", - "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": "Asset Category", - "length": 0, - "no_copy": 0, - "options": "Asset Category", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_fixed_asset", + "fieldname": "asset_category", + "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": "Asset Category", + "length": 0, + "no_copy": 0, + "options": "Asset Category", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.__islocal", - "description": "", - "fieldname": "tolerance", - "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": "Allow over delivery or receipt upto this percent", - "length": 0, - "no_copy": 0, - "oldfieldname": "tolerance", - "oldfieldtype": "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.__islocal", + "description": "", + "fieldname": "tolerance", + "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": "Allow over delivery or receipt upto this percent", + "length": 0, + "no_copy": 0, + "oldfieldname": "tolerance", + "oldfieldtype": "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_bulk_edit": 0, - "allow_on_submit": 0, - "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, - "options": "image", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "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, + "options": "image", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "section_break_11", - "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, - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "section_break_11", + "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, + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "brand", - "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": "Brand", - "length": 0, - "no_copy": 0, - "oldfieldname": "brand", - "oldfieldtype": "Link", - "options": "Brand", - "permlevel": 0, - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "brand", + "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": "Brand", + "length": 0, + "no_copy": 0, + "oldfieldname": "brand", + "oldfieldtype": "Link", + "options": "Brand", + "permlevel": 0, + "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_bulk_edit": 0, - "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, - "oldfieldname": "description", - "oldfieldtype": "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, + "allow_bulk_edit": 0, + "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, + "oldfieldname": "description", + "oldfieldtype": "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "is_stock_item", - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "inventory", - "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": "Inventory", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-truck", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "is_stock_item", + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "inventory", + "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": "Inventory", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-truck", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "description": "", - "fieldname": "default_warehouse", - "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 Warehouse", - "length": 0, - "no_copy": 0, - "oldfieldname": "default_warehouse", - "oldfieldtype": "Link", - "options": "Warehouse", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "default_warehouse", + "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 Warehouse", + "length": 0, + "no_copy": 0, + "oldfieldname": "default_warehouse", + "oldfieldtype": "Link", + "options": "Warehouse", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "2099-12-31", - "depends_on": "is_stock_item", - "fieldname": "end_of_life", - "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": "End of Life", - "length": 0, - "no_copy": 0, - "oldfieldname": "end_of_life", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "2099-12-31", + "depends_on": "is_stock_item", + "fieldname": "end_of_life", + "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": "End of Life", + "length": 0, + "no_copy": 0, + "oldfieldname": "end_of_life", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Purchase", - "fieldname": "default_material_request_type", - "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": "Default Material Request Type", - "length": 0, - "no_copy": 0, - "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Purchase", + "fieldname": "default_material_request_type", + "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": "Default Material Request Type", + "length": 0, + "no_copy": 0, + "options": "Purchase\nMaterial Transfer\nMaterial Issue\nManufacture", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "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, - "oldfieldtype": "Column Break", - "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "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, + "oldfieldtype": "Column Break", + "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, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "valuation_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": "Valuation Method", - "length": 0, - "no_copy": 0, - "options": "\nFIFO\nMoving Average", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "valuation_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": "Valuation Method", + "length": 0, + "no_copy": 0, + "options": "\nFIFO\nMoving Average", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.is_stock_item", - "fieldname": "warranty_period", - "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": "Warranty Period (in days)", - "length": 0, - "no_copy": 0, - "oldfieldname": "warranty_period", - "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": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.is_stock_item", + "fieldname": "warranty_period", + "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": "Warranty Period (in days)", + "length": 0, + "no_copy": 0, + "oldfieldname": "warranty_period", + "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": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "is_stock_item", - "description": "", - "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": 0, - "in_standard_filter": 0, - "label": "Net Weight", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "is_stock_item", + "description": "", + "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": 0, + "in_standard_filter": 0, + "label": "Net Weight", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.is_stock_item", - "fieldname": "weight_uom", - "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": "Weight UOM", - "length": 0, - "no_copy": 0, - "options": "UOM", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.is_stock_item", + "fieldname": "weight_uom", + "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": "Weight UOM", + "length": 0, + "no_copy": 0, + "options": "UOM", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "is_stock_item", - "description": "", - "fieldname": "reorder_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": "Auto re-order", - "length": 0, - "no_copy": 0, - "options": "fa fa-rss", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "is_stock_item", + "description": "", + "fieldname": "reorder_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": "Auto re-order", + "length": 0, + "no_copy": 0, + "options": "fa fa-rss", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "Will also apply for variants unless overrridden", - "fieldname": "reorder_levels", - "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": "Reorder level based on Warehouse", - "length": 0, - "no_copy": 0, - "options": "Item Reorder", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "Will also apply for variants unless overrridden", + "fieldname": "reorder_levels", + "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": "Reorder level based on Warehouse", + "length": 0, + "no_copy": 0, + "options": "Item Reorder", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "", - "fieldname": "unit_of_measure_conversion", - "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": "Units of Measure", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "", + "fieldname": "unit_of_measure_conversion", + "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": "Units of Measure", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "Will also apply for variants", - "fieldname": "uoms", - "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": "UOMs", - "length": 0, - "no_copy": 0, - "oldfieldname": "uom_conversion_details", - "oldfieldtype": "Table", - "options": "UOM Conversion Detail", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "Will also apply for variants", + "fieldname": "uoms", + "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": "UOMs", + "length": 0, + "no_copy": 0, + "oldfieldname": "uom_conversion_details", + "oldfieldtype": "Table", + "options": "UOM Conversion Detail", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "eval:doc.has_batch_no || doc.has_serial_no", - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "serial_nos_and_batches", - "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": "Serial Nos and Batches", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "eval:doc.has_batch_no || doc.has_serial_no", + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "serial_nos_and_batches", + "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": "Serial Nos and Batches", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "eval:doc.is_stock_item", - "fieldname": "has_batch_no", - "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": "Has Batch No", - "length": 0, - "no_copy": 1, - "oldfieldname": "has_batch_no", - "oldfieldtype": "Select", - "options": "", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "fieldname": "has_batch_no", + "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": "Has Batch No", + "length": 0, + "no_copy": 1, + "oldfieldname": "has_batch_no", + "oldfieldtype": "Select", + "options": "", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "has_batch_no", - "description": "", - "fieldname": "create_new_batch", - "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": "Automatically Create New Batch", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "has_batch_no", + "fieldname": "has_expiry_date", + "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": "Has Expiry 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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_37", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "has_batch_no", + "description": "", + "fieldname": "create_new_batch", + "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": "Automatically Create New Batch", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "eval:doc.is_stock_item", - "description": "", - "fieldname": "has_serial_no", - "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": "Has Serial No", - "length": 0, - "no_copy": 1, - "oldfieldname": "has_serial_no", - "oldfieldtype": "Select", - "options": "", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_37", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "has_serial_no", - "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", - "fieldname": "serial_no_series", - "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": "Serial Number Series", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "depends_on": "eval:doc.is_stock_item", + "description": "", + "fieldname": "has_serial_no", + "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": "Has Serial No", + "length": 0, + "no_copy": 1, + "oldfieldname": "has_serial_no", + "oldfieldtype": "Select", + "options": "", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "attributes", - "columns": 0, - "depends_on": "", - "fieldname": "variants_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": "Variants", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "has_serial_no", + "description": "Example: ABCD.#####\nIf series is set and Serial No is not mentioned in transactions, then automatic serial number will be created based on this series. If you always want to explicitly mention Serial Nos for this item. leave this blank.", + "fieldname": "serial_no_series", + "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": "Serial Number Series", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "depends_on": "eval:!doc.variant_of", - "description": "If this item has variants, then it cannot be selected in sales orders etc.", - "fieldname": "has_variants", - "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": "Has Variants", - "length": 0, - "no_copy": 1, - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "attributes", + "columns": 0, + "depends_on": "", + "fieldname": "variants_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": "Variants", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "Item Attribute", - "depends_on": "has_variants", - "fieldname": "variant_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": "Variant Based On", - "length": 0, - "no_copy": 0, - "options": "Item Attribute\nManufacturer", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "depends_on": "eval:!doc.variant_of", + "description": "If this item has variants, then it cannot be selected in sales orders etc.", + "fieldname": "has_variants", + "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": "Has Variants", + "length": 0, + "no_copy": 1, + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.has_variants && doc.variant_based_on==='Item Attribute'", - "fieldname": "attributes", - "fieldtype": "Table", - "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": "Attributes", - "length": 0, - "no_copy": 1, - "options": "Item Variant Attribute", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "Item Attribute", + "depends_on": "has_variants", + "fieldname": "variant_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": "Variant Based On", + "length": 0, + "no_copy": 0, + "options": "Item Attribute\nManufacturer", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "purchase_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": "Purchase Details", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:doc.has_variants && doc.variant_based_on==='Item Attribute'", + "fieldname": "attributes", + "fieldtype": "Table", + "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": "Attributes", + "length": 0, + "no_copy": 1, + "options": "Item Variant Attribute", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "is_purchase_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 Purchase Item", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "purchase_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": "Purchase Details", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "purchase_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": "Default Purchase Unit of Measure", - "length": 0, - "no_copy": 0, - "options": "UOM", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fieldname": "is_purchase_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 Purchase Item", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0.00", - "depends_on": "is_stock_item", - "description": "", - "fieldname": "min_order_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": "Minimum Order Qty", - "length": 0, - "no_copy": 0, - "oldfieldname": "min_order_qty", - "oldfieldtype": "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "purchase_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": "Default Purchase Unit of Measure", + "length": 0, + "no_copy": 0, + "options": "UOM", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "safety_stock", - "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": "Safety Stock", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0.00", + "depends_on": "is_stock_item", + "description": "", + "fieldname": "min_order_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": "Minimum Order Qty", + "length": 0, + "no_copy": 0, + "oldfieldname": "min_order_qty", + "oldfieldtype": "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "Average time taken by the supplier to deliver", - "fieldname": "lead_time_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": "Lead Time in days", - "length": 0, - "no_copy": 0, - "oldfieldname": "lead_time_days", - "oldfieldtype": "Int", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "safety_stock", + "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": "Safety Stock", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "buying_cost_center", - "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 Buying Cost Center", - "length": 0, - "no_copy": 0, - "oldfieldname": "cost_center", - "oldfieldtype": "Link", - "options": "Cost Center", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "Average time taken by the supplier to deliver", + "fieldname": "lead_time_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": "Lead Time in days", + "length": 0, + "no_copy": 0, + "oldfieldname": "lead_time_days", + "oldfieldtype": "Int", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "expense_account", - "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 Expense Account", - "length": 0, - "no_copy": 0, - "oldfieldname": "purchase_account", - "oldfieldtype": "Link", - "options": "Account", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "buying_cost_center", + "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 Buying Cost Center", + "length": 0, + "no_copy": 0, + "oldfieldname": "cost_center", + "oldfieldtype": "Link", + "options": "Cost Center", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "last_purchase_rate", - "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": "Last Purchase Rate", - "length": 0, - "no_copy": 1, - "oldfieldname": "last_purchase_rate", - "oldfieldtype": "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "expense_account", + "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 Expense Account", + "length": 0, + "no_copy": 0, + "oldfieldname": "purchase_account", + "oldfieldtype": "Link", + "options": "Account", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "", - "fieldname": "supplier_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": "Supplier 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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "last_purchase_rate", + "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": "Last Purchase Rate", + "length": 0, + "no_copy": 1, + "oldfieldname": "last_purchase_rate", + "oldfieldtype": "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "default_supplier", - "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 Supplier", - "length": 0, - "no_copy": 0, - "options": "Supplier", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "", + "fieldname": "supplier_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": "Supplier 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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "delivered_by_supplier", - "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": "Delivered by Supplier (Drop Ship)", - "length": 0, - "no_copy": 0, - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "default_supplier", + "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 Supplier", + "length": 0, + "no_copy": 0, + "options": "Supplier", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "manufacturer", - "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": "Manufacturer", - "length": 0, - "no_copy": 0, - "options": "Manufacturer", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "delivered_by_supplier", + "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": "Delivered by Supplier (Drop Ship)", + "length": 0, + "no_copy": 0, + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "manufacturer_part_no", - "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": "Manufacturer Part Number", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "manufacturer", + "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": "Manufacturer", + "length": 0, + "no_copy": 0, + "options": "Manufacturer", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "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, - "label": "Item Code for Suppliers", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "manufacturer_part_no", + "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": "Manufacturer Part Number", + "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "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, + "label": "Item Code for Suppliers", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "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, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "supplier_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": "Supplier Items", - "length": 0, - "no_copy": 0, - "options": "Item Supplier", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "supplier_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": "Supplier Items", + "length": 0, + "no_copy": 0, + "options": "Item Supplier", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "foreign_trade_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": "Foreign Trade 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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "foreign_trade_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": "Foreign Trade 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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "country_of_origin", - "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 of Origin", - "length": 0, - "no_copy": 0, - "options": "Country", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "country_of_origin", + "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 of Origin", + "length": 0, + "no_copy": 0, + "options": "Country", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_59", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_59", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "customs_tariff_number", - "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": "Customs Tariff Number", - "length": 0, - "no_copy": 0, - "options": "Customs Tariff Number", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "customs_tariff_number", + "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": "Customs Tariff Number", + "length": 0, + "no_copy": 0, + "options": "Customs Tariff Number", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "sales_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": "Sales Details", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-tag", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "sales_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": "Sales Details", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-tag", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "1", - "fieldname": "is_sales_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 Sales Item", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "1", + "fieldname": "is_sales_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 Sales Item", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sales_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": "Default Sales Unit of Measure", - "length": 0, - "no_copy": 0, - "options": "UOM", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "sales_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": "Default Sales Unit of Measure", + "length": 0, + "no_copy": 0, + "options": "UOM", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "income_account", - "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 Income Account", - "length": 0, - "no_copy": 0, - "options": "Account", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "income_account", + "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 Income Account", + "length": 0, + "no_copy": 0, + "options": "Account", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "selling_cost_center", - "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 Selling Cost Center", - "length": 0, - "no_copy": 0, - "options": "Cost Center", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "selling_cost_center", + "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 Selling Cost Center", + "length": 0, + "no_copy": 0, + "options": "Cost Center", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "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, - "label": "Customer Item Codes", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "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_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "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, + "label": "Customer Item Codes", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Column Break", + "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, "width": "50%" - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "description": "", - "fieldname": "customer_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": "Customer Items", - "length": 0, - "no_copy": 0, - "options": "Item Customer Detail", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "description": "", + "fieldname": "customer_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": "Customer Items", + "length": 0, + "no_copy": 0, + "options": "Item Customer Detail", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "max_discount", - "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": "Max Discount (%)", - "length": 0, - "no_copy": 0, - "oldfieldname": "max_discount", - "oldfieldtype": "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "max_discount", + "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": "Max Discount (%)", + "length": 0, + "no_copy": 0, + "oldfieldname": "max_discount", + "oldfieldtype": "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "item_tax_section_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, - "label": "Item Tax", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "item_tax_section_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, + "label": "Item Tax", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Will also apply for variants", - "fieldname": "taxes", - "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": "Taxes", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_tax", - "oldfieldtype": "Table", - "options": "Item Tax", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Will also apply for variants", + "fieldname": "taxes", + "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": "Taxes", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_tax", + "oldfieldtype": "Table", + "options": "Item Tax", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "inspection_criteria", - "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": "Inspection Criteria", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-search", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "fieldname": "inspection_criteria", + "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": "Inspection Criteria", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-search", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "inspection_required_before_purchase", - "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": "Inspection Required before Purchase", - "length": 0, - "no_copy": 0, - "oldfieldname": "inspection_required", - "oldfieldtype": "Select", - "options": "", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "fieldname": "inspection_required_before_purchase", + "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": "Inspection Required before Purchase", + "length": 0, + "no_copy": 0, + "oldfieldname": "inspection_required", + "oldfieldtype": "Select", + "options": "", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "inspection_required_before_delivery", - "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": "Inspection Required before Delivery", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "inspection_required_before_delivery", + "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": "Inspection Required before Delivery", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(doc.inspection_required_before_purchase || doc.inspection_required_before_delivery)", - "description": "Will also apply to variants", - "fieldname": "quality_parameters", - "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": "Quality Parameters", - "length": 0, - "no_copy": 0, - "oldfieldname": "item_specification_details", - "oldfieldtype": "Table", - "options": "Item Quality Inspection Parameter", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(doc.inspection_required_before_purchase || doc.inspection_required_before_delivery)", + "description": "Will also apply to variants", + "fieldname": "quality_parameters", + "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": "Quality Parameters", + "length": 0, + "no_copy": 0, + "oldfieldname": "item_specification_details", + "oldfieldtype": "Table", + "options": "Item Quality Inspection Parameter", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "depends_on": "is_stock_item", - "fieldname": "manufacturing", - "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": "Manufacturing", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-cogs", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "columns": 0, + "depends_on": "is_stock_item", + "fieldname": "manufacturing", + "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": "Manufacturing", + "length": 0, + "no_copy": 0, + "oldfieldtype": "Section Break", + "options": "fa fa-cogs", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "default_bom", - "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 BOM", - "length": 0, - "no_copy": 1, - "oldfieldname": "default_bom", - "oldfieldtype": "Link", - "options": "BOM", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "", + "fieldname": "default_bom", + "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 BOM", + "length": 0, + "no_copy": 1, + "oldfieldname": "default_bom", + "oldfieldtype": "Link", + "options": "BOM", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "description": "If subcontracted to a vendor", - "fieldname": "is_sub_contracted_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": "Supply Raw Materials for Purchase", - "length": 0, - "no_copy": 0, - "oldfieldname": "is_sub_contracted_item", - "oldfieldtype": "Select", - "options": "", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "description": "If subcontracted to a vendor", + "fieldname": "is_sub_contracted_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": "Supply Raw Materials for Purchase", + "length": 0, + "no_copy": 0, + "oldfieldname": "is_sub_contracted_item", + "oldfieldtype": "Select", + "options": "", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_74", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_74", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "customer_code", - "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": "Customer Code", - "length": 0, - "no_copy": 1, - "permlevel": 0, - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "customer_code", + "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": "Customer Code", + "length": 0, + "no_copy": 1, + "permlevel": 0, + "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_bulk_edit": 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": "fa fa-globe", - "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, + "allow_bulk_edit": 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": "fa fa-globe", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.variant_of", - "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, - "print_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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:!doc.variant_of", + "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, + "print_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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "variant_of", - "fieldname": "show_variant_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 (Variant)", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "variant_of", + "fieldname": "show_variant_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 (Variant)", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "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": 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": 0, - "search_index": 0, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "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": 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": 0, + "search_index": 0, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Items with higher weightage will be shown higher", - "fieldname": "weightage", - "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": "Weightage", - "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": 1, - "set_only_once": 0, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Items with higher weightage will be shown higher", + "fieldname": "weightage", + "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": "Weightage", + "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": 1, + "set_only_once": 0, "unique": 0 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Show a slideshow at the top of the page", - "fieldname": "slideshow", - "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": "Slideshow", - "length": 0, - "no_copy": 0, - "options": "Website Slideshow", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Show a slideshow at the top of the page", + "fieldname": "slideshow", + "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": "Slideshow", + "length": 0, + "no_copy": 0, + "options": "Website Slideshow", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Item Image (if not slideshow)", - "fieldname": "website_image", - "fieldtype": "Attach", - "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, - "options": "", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Item Image (if not slideshow)", + "fieldname": "website_image", + "fieldtype": "Attach", + "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, + "options": "", + "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_bulk_edit": 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_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, + "allow_bulk_edit": 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_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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "cb72", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "cb72", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", - "fieldname": "website_warehouse", - "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": "Website Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "Show \"In Stock\" or \"Not in Stock\" based on stock available in this warehouse.", + "fieldname": "website_warehouse", + "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": "Website Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "description": "List this Item in multiple groups on the website.", - "fieldname": "website_item_groups", - "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": "Website Item Groups", - "length": 0, - "no_copy": 0, - "options": "Website Item Group", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "description": "List this Item in multiple groups on the website.", + "fieldname": "website_item_groups", + "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": "Website Item Groups", + "length": 0, + "no_copy": 0, + "options": "Website Item Group", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "website_specifications", - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "sb72", - "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, - "print_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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 1, + "collapsible_depends_on": "website_specifications", + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "sb72", + "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, + "print_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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "copy_from_item_group", - "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": "Copy From Item Group", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "copy_from_item_group", + "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": "Copy From Item Group", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", - "fieldname": "website_specifications", - "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": "Website Specifications", - "length": 0, - "no_copy": 0, - "options": "Item Website Specification", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_in_website", + "fieldname": "website_specifications", + "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": "Website Specifications", + "length": 0, + "no_copy": 0, + "options": "Item Website Specification", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval: doc.show_in_website || doc.show_variant_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, - "print_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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval: doc.show_in_website || doc.show_variant_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, + "print_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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "total_projected_qty", - "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": "Total Projected Qty", - "length": 0, - "no_copy": 0, - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "total_projected_qty", + "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": "Total Projected Qty", + "length": 0, + "no_copy": 0, + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:(!doc.is_item_from_hub)", - "fieldname": "hub_publishing_sb", - "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": "Hub Publishing 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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "depends_on": "eval:(!doc.is_item_from_hub)", + "fieldname": "hub_publishing_sb", + "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": "Hub Publishing 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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "description": "Publish Item to hub.erpnext.com", - "fieldname": "publish_in_hub", - "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": "Publish in Hub", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "description": "Publish Item to hub.erpnext.com", + "fieldname": "publish_in_hub", + "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": "Publish in Hub", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "hub_category_to_publish", - "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": "Hub Category to Publish", - "length": 0, - "no_copy": 0, - "options": "Hub Category", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "hub_category_to_publish", + "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": "Hub Category to Publish", + "length": 0, + "no_copy": 0, + "options": "Hub Category", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "Publish \"In Stock\" or \"Not in Stock\" on Hub based on stock available in this warehouse.", - "fieldname": "hub_warehouse", - "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": "Hub Warehouse", - "length": 0, - "no_copy": 0, - "options": "Warehouse", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "description": "Publish \"In Stock\" or \"Not in Stock\" on Hub based on stock available in this warehouse.", + "fieldname": "hub_warehouse", + "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": "Hub Warehouse", + "length": 0, + "no_copy": 0, + "options": "Warehouse", + "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_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "0", - "fieldname": "synced_with_hub", - "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": "Synced With Hub", - "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, + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "0", + "fieldname": "synced_with_hub", + "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": "Synced With Hub", + "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 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-tag", - "idx": 2, - "image_field": "image", - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 1, - "modified": "2017-10-25 14:08:02.948326", - "modified_by": "Administrator", - "module": "Stock", - "name": "Item", - "owner": "Administrator", + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "icon": "fa fa-tag", + "idx": 2, + "image_field": "image", + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 1, + "modified": "2017-11-01 11:53:52.060505", + "modified_by": "Administrator", + "module": "Stock", + "name": "Item", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 1, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Item Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 1, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Item Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, "write": 1 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock Manager", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 1, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Sales User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Sales User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Purchase User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Purchase User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Maintenance User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Maintenance User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Accounts User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Accounts User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 - }, + }, { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "Manufacturing User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 0, + "delete": 0, + "email": 0, + "export": 0, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 0, + "read": 1, + "report": 0, + "role": "Manufacturing User", + "set_user_permissions": 0, + "share": 0, + "submit": 0, "write": 0 } - ], - "quick_entry": 1, - "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, + ], + "quick_entry": 1, + "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 From 7ab28ec56247548d87d2f46be0f91d1ceb7c9387 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 10 Nov 2017 11:17:01 +0530 Subject: [PATCH 63/85] [fix] give preference to gateway selected on shopping cart settings (#11393) --- erpnext/accounts/doctype/payment_request/payment_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 807ad280db..21ddb10b4d 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -294,7 +294,7 @@ def get_gateway_details(args): if args.get("payment_gateway"): return get_payment_gateway_account(args.get("payment_gateway")) - if args.cart: + if args.order_type == "Shopping Cart": payment_gateway_account = frappe.get_doc("Shopping Cart Settings").payment_gateway_account return get_payment_gateway_account(payment_gateway_account) From 18c8cf965ff60c4a362f274c7839bf26bd7bf778 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 10 Nov 2017 13:45:04 +0600 Subject: [PATCH 64/85] bumped to version 9.2.8 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 362d8aa423..f8cade95ab 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.7' +__version__ = '9.2.8' def get_default_company(user=None): '''Get default company for user''' From 1368ba00bced801cfa18274a6fdcbd3f89faf52d Mon Sep 17 00:00:00 2001 From: Pawan Mehta Date: Fri, 10 Nov 2017 14:59:26 +0530 Subject: [PATCH 65/85] [fix] #11337 (#11339) --- erpnext/selling/doctype/sales_order/sales_order.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 6f70ebe07e..cfd40df453 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -40,6 +40,10 @@ frappe.ui.form.on("Sales Order", { if(!d.delivery_date) d.delivery_date = frm.doc.delivery_date; }); refresh_field("items"); + }, + + onload_post_render: function(frm) { + frm.get_field("items").grid.set_multiple_add("item_code", "qty"); } }); From 022ab63a0fa98b484baae38bb49350b7691a38e3 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 10 Nov 2017 15:06:02 +0530 Subject: [PATCH 66/85] [fix] query param fixes --- erpnext/controllers/queries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 37afed7a0e..353721e47a 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -185,7 +185,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals "page_len": page_len }, as_dict=as_dict) -def bom(doctype, txt, searchfield, filters, start=0, page_len=20): +def bom(doctype, txt, searchfield, start, page_len, filters): conditions = [] return frappe.db.sql("""select tabBOM.name, tabBOM.item @@ -204,8 +204,8 @@ def bom(doctype, txt, searchfield, filters, start=0, page_len=20): { 'txt': "%%%s%%" % frappe.db.escape(txt), '_txt': txt.replace("%", ""), - 'start': start, - 'page_len': page_len + 'start': start or 0, + 'page_len': page_len or 20 }) def get_project_name(doctype, txt, searchfield, start, page_len, filters): From cc97ec9202d4027fb0d0ca663cc75e101337badf Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 10 Nov 2017 15:06:58 +0530 Subject: [PATCH 67/85] [hotfix] Salary slip, leave considered in amount calculation even if depends on lwp is disabled in salary slip (#11507) --- erpnext/hr/doctype/salary_slip/salary_slip.js | 9 ++------- erpnext/hr/doctype/salary_slip/salary_slip.py | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js index 24f2016bd6..4679cbdda9 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/salary_slip.js @@ -161,18 +161,15 @@ var calculate_earning_total = function(doc, dt, dn, reset_amount) { tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days) / cint(doc.total_working_days)*100)/100; - refresh_field('amount', tbl[i].name, 'earnings'); - } else if(reset_amount) { tbl[i].amount = tbl[i].default_amount; - refresh_field('amount', tbl[i].name, 'earnings'); } if(!tbl[i].do_not_include_in_total) { total_earn += flt(tbl[i].amount); } } doc.gross_pay = total_earn; - refresh_many(['amount','gross_pay']); + refresh_many(['earnings', 'amount','gross_pay']); } // Calculate deduction total @@ -183,17 +180,15 @@ var calculate_ded_total = function(doc, dt, dn, reset_amount) { for(var i = 0; i < tbl.length; i++){ if(cint(tbl[i].depends_on_lwp) == 1) { tbl[i].amount = Math.round(tbl[i].default_amount)*(flt(doc.payment_days)/cint(doc.total_working_days)*100)/100; - refresh_field('amount', tbl[i].name, 'deductions'); } else if(reset_amount) { tbl[i].amount = tbl[i].default_amount; - refresh_field('amount', tbl[i].name, 'deductions'); } if(!tbl[i].do_not_include_in_total) { total_ded += flt(tbl[i].amount); } } doc.total_deduction = total_ded; - refresh_field('total_deduction'); + refresh_many(['deductions', 'total_deduction']); } // Calculate net payable amount diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 7581624bef..1f9c192e8d 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -348,7 +348,8 @@ class SalarySlip(TransactionBase): / cint(self.total_working_days)), self.precision("amount", component_type) ) - elif not self.payment_days and not self.salary_slip_based_on_timesheet: + elif not self.payment_days and not self.salary_slip_based_on_timesheet and \ + cint(d.depends_on_lwp): d.amount = 0 elif not d.amount: d.amount = d.default_amount From a5e3c3a79f1d81b76a369e4ea673f418fda1e084 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 10 Nov 2017 15:29:14 +0530 Subject: [PATCH 68/85] Add item directly in the cart only if serial no, batch, barcode has enter in the search field --- erpnext/selling/page/point_of_sale/point_of_sale.js | 8 ++++---- erpnext/selling/page/point_of_sale/point_of_sale.py | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js index a0f8598ef8..adde913fb6 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/point_of_sale.js @@ -990,18 +990,18 @@ class POSItems { } this.get_items({search_value: search_term, item_group }) - .then(({ items, serial_no, batch_no }) => { + .then(({ items, serial_no, batch_no, barcode }) => { if (search_term) { this.search_index[search_term] = items; } this.items = items; this.render_items(items); - this.set_item_in_the_cart(items, serial_no, batch_no); + this.set_item_in_the_cart(items, serial_no, batch_no, barcode); }); } - set_item_in_the_cart(items, serial_no, batch_no) { + set_item_in_the_cart(items, serial_no, batch_no, barcode) { if (serial_no) { this.events.update_cart(items[0].item_code, 'serial_no', serial_no); @@ -1016,7 +1016,7 @@ class POSItems { return; } - if (items.length === 1) { + if (items.length === 1 && (serial_no || batch_no || barcode)) { this.events.update_cart(items[0].item_code, 'qty', '+1'); this.reset_search_field(); diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 20b5bb05b6..8dad0a3515 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -67,6 +67,11 @@ def get_items(start, page_length, price_list, item_group, search_value=""): 'batch_no': batch_no }) + if barcode: + res.update({ + 'barcode': barcode + }) + return res def get_conditions(item_code, serial_no, batch_no, barcode): From a10cd1064080277e500569c9102fd8d8c28f410d Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 10 Nov 2017 16:23:43 +0600 Subject: [PATCH 69/85] bumped to version 9.2.9 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index f8cade95ab..aa52b834f3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.8' +__version__ = '9.2.9' def get_default_company(user=None): '''Get default company for user''' From 4313326ba0e8a16f5f2a8070041645c49fc634f0 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 10 Nov 2017 18:52:21 +0530 Subject: [PATCH 70/85] [fix] treeview for tasks (#11515) [fix] treeview for tasks --- erpnext/accounts/utils.py | 12 +++---- erpnext/manufacturing/doctype/bom/bom.py | 6 +++- erpnext/manufacturing/doctype/bom/bom_tree.js | 2 +- erpnext/projects/doctype/task/task.json | 6 ++-- erpnext/projects/doctype/task/task.py | 34 +++++++++++-------- erpnext/projects/doctype/task/task_tree.js | 21 ++++++------ erpnext/stock/doctype/warehouse/warehouse.py | 20 ++++------- 7 files changed, 52 insertions(+), 49 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 50530f5dc1..0003990e2c 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -630,7 +630,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None): 'invoice_amount': flt(d.invoice_amount), 'payment_amount': flt(d.payment_amount), 'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision), - 'due_date': frappe.db.get_value(d.voucher_type, d.voucher_no, + 'due_date': frappe.db.get_value(d.voucher_type, d.voucher_no, "posting_date" if party_type=="Employee" else "due_date"), })) @@ -656,16 +656,14 @@ def get_companies(): order_by="name")] @frappe.whitelist() -def get_children(): +def get_children(doctype, parent, company, is_root=False): from erpnext.accounts.report.financial_statements import sort_root_accounts - args = frappe.local.form_dict - doctype, company = args['doctype'], args['company'] fieldname = frappe.db.escape(doctype.lower().replace(' ','_')) doctype = frappe.db.escape(doctype) # root - if args['parent'] in ("Accounts", "Cost Centers"): + if is_root: fields = ", root_type, report_type, account_currency" if doctype=="Account" else "" acc = frappe.db.sql(""" select name as value, is_group as expandable {fields} @@ -675,7 +673,7 @@ def get_children(): order by name""".format(fields=fields, fieldname = fieldname, doctype=doctype), company, as_dict=1) - if args["parent"]=="Accounts": + if parent=="Accounts": sort_root_accounts(acc) else: # other @@ -686,7 +684,7 @@ def get_children(): where ifnull(`parent_{fieldname}`,'') = %s and docstatus<2 order by name""".format(fields=fields, fieldname=fieldname, doctype=doctype), - args['parent'], as_dict=1) + parent, as_dict=1) if doctype == 'Account': company_currency = frappe.db.get_value("Company", company, "default_currency") diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index b140bf591e..d0cf60983f 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -587,7 +587,11 @@ def validate_bom_no(item, bom_no): frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item)) @frappe.whitelist() -def get_children(): +def get_children(doctype, parent=None, is_tree=False): + if not parent: + frappe.msgprint(_('Please select a BOM')) + return + if frappe.form_dict.parent: return frappe.db.sql("""select bom_item.item_code, diff --git a/erpnext/manufacturing/doctype/bom/bom_tree.js b/erpnext/manufacturing/doctype/bom/bom_tree.js index 09fe037831..854f6334d7 100644 --- a/erpnext/manufacturing/doctype/bom/bom_tree.js +++ b/erpnext/manufacturing/doctype/bom/bom_tree.js @@ -11,7 +11,7 @@ frappe.treeview_settings["BOM"] = { title: "BOM", breadcrumb: "Manufacturing", disable_add_node: true, - root_label: "bom", //fieldname from filters + root_label: "All Bill of Materials", //fieldname from filters get_label: function(node) { if(node.data.qty) { return node.data.qty + " x " + node.data.item_code; diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json index 41950a381b..8e72d0339e 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -2,8 +2,8 @@ "allow_copy": 0, "allow_guest_to_view": 0, "allow_import": 1, - "allow_rename": 1, - "autoname": "field:subject", + "allow_rename": 0, + "autoname": "TASK.#####", "beta": 0, "creation": "2013-01-29 19:25:50", "custom": 0, @@ -1214,7 +1214,7 @@ "istable": 0, "max_attachments": 5, "menu_index": 0, - "modified": "2017-10-06 03:57:37.901446", + "modified": "2017-11-10 18:37:19.660293", "modified_by": "Administrator", "module": "Projects", "name": "Task", diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 5b1bcaf266..fa56a95960 100644 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -6,7 +6,7 @@ import frappe, json from frappe.utils import getdate, date_diff, add_days, cstr from frappe import _, throw -from frappe.utils.nestedset import NestedSet, rebuild_tree +from frappe.utils.nestedset import NestedSet class CircularReferenceError(frappe.ValidationError): pass @@ -118,10 +118,10 @@ class Task(NestedSet): end_date = self.exp_end_date or self.act_end_date if end_date: for task_name in frappe.db.sql(""" - select name from `tabTask` as parent - where parent.project = %(project)s + select name from `tabTask` as parent + where parent.project = %(project)s and parent.name in ( - select parent from `tabTask Depends On` as child + select parent from `tabTask Depends On` as child where child.task = %(task)s and child.project = %(project)s) """, {'project': self.project, 'task':self.name }, as_dict=1): task = frappe.get_doc("Task", task_name.name) @@ -198,22 +198,28 @@ def set_tasks_as_overdue(): and `status` not in ('Closed', 'Cancelled')""") @frappe.whitelist() -def get_children(): - doctype = frappe.local.form_dict.get('doctype') +def get_children(doctype, parent, task=None, project=None, is_root=False): + conditions = '' - parent_field = 'parent_' + doctype.lower().replace(' ', '_') - parent = frappe.form_dict.get("parent") or "" + if task: + # via filters + conditions += ' and parent_task = "{0}"'.format(frappe.db.escape(task)) + elif parent and not is_root: + # via expand child + conditions += ' and parent_task = "{0}"'.format(frappe.db.escape(parent)) + else: + conditions += ' and ifnull(parent_task, "")=""' - if parent == "task": - parent = "" + if project: + conditions += ' and project = "{0}"'.format(frappe.db.escape(project)) tasks = frappe.db.sql("""select name as value, + subject as title, is_group as expandable - from `tab{doctype}` + from `tabTask` where docstatus < 2 - and ifnull(`{parent_field}`,'') = %s - order by name""".format(doctype=frappe.db.escape(doctype), - parent_field=frappe.db.escape(parent_field)), (parent), as_dict=1) + {conditions} + order by name""".format(conditions=conditions), as_dict=1) # return tasks return tasks diff --git a/erpnext/projects/doctype/task/task_tree.js b/erpnext/projects/doctype/task/task_tree.js index f11c34f448..935a1e02c3 100644 --- a/erpnext/projects/doctype/task/task_tree.js +++ b/erpnext/projects/doctype/task/task_tree.js @@ -4,29 +4,30 @@ frappe.treeview_settings['Task'] = { get_tree_nodes: "erpnext.projects.doctype.task.task.get_children", add_tree_node: "erpnext.projects.doctype.task.task.add_node", filters: [ + { + fieldname: "project", + fieldtype:"Link", + options: "Project", + label: __("Project"), + }, { fieldname: "task", fieldtype:"Link", options: "Task", label: __("Task"), - get_query: function(){ + get_query: function() { return { filters: [["Task", 'is_group', '=', 1]] }; } } ], - title: "Task", breadcrumb: "Projects", get_tree_root: false, - root_label: "task", - ignore_fields:["parent_task"], - get_label: function(node) { - return node.data.value; - }, - onload: function(me){ + root_label: "All Tasks", + ignore_fields: ["parent_task"], + onload: function(me) { me.make_tree(); - me.set_root = true; }, toolbar: [ { @@ -39,7 +40,7 @@ frappe.treeview_settings['Task'] = { 'fields': [ {'fieldname': 'tasks', 'label': 'Tasks', 'fieldtype': 'Text'}, ], - primary_action: function(){ + primary_action: function() { d.hide(); return frappe.call({ method: "erpnext.projects.doctype.task.task.add_multiple_tasks", diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index 4f7cf0b286..058828cc3d 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -90,10 +90,10 @@ class Warehouse(NestedSet): def get_new_warehouse_name_without_abbr(self, name): company_abbr = frappe.db.get_value("Company", self.company, "abbr") parts = name.rsplit(" - ", 1) - + if parts[-1].lower() == company_abbr.lower(): name = parts[0] - + return name def recalculate_bin_qty(self, new_name): @@ -139,25 +139,19 @@ class Warehouse(NestedSet): return 1 @frappe.whitelist() -def get_children(): +def get_children(doctype, parent=None, company=None, is_root=False): from erpnext.stock.utils import get_stock_value_on - doctype = frappe.local.form_dict.get('doctype') - company = frappe.local.form_dict.get('company') - parent_field = 'parent_' + doctype.lower().replace(' ', '_') - parent = frappe.form_dict.get("parent") or "" - - if parent == "Warehouses": + if is_root: parent = "" warehouses = frappe.db.sql("""select name as value, is_group as expandable - from `tab{doctype}` + from `tabWarehouse` where docstatus < 2 - and ifnull(`{parent_field}`,'') = %s + and ifnull(`parent_warehouse`,'') = %s and (`company` = %s or company is null or company = '') - order by name""".format(doctype=frappe.db.escape(doctype), - parent_field=frappe.db.escape(parent_field)), (parent, company), as_dict=1) + order by name""", (parent, company), as_dict=1) # return warehouses for wh in warehouses: From 731b66b78816386b82ee2cc5d67bd0d5a6444cfc Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Fri, 10 Nov 2017 18:53:52 +0530 Subject: [PATCH 71/85] remove erroneous column breaks (#11523) --- erpnext/accounts/doctype/c_form/c_form.json | 32 +--- .../period_closing_voucher.json | 53 +++---- .../leave_allocation/leave_allocation.json | 31 +--- .../leave_control_panel.json | 42 ++---- .../hr/doctype/salary_slip/salary_slip.json | 93 +++++++----- .../salary_structure/salary_structure.json | 60 ++++---- .../doctype/sms_center/sms_center.json | 140 +++++++++++++++--- 7 files changed, 240 insertions(+), 211 deletions(-) diff --git a/erpnext/accounts/doctype/c_form/c_form.json b/erpnext/accounts/doctype/c_form/c_form.json index 29531ec09c..fc712f8ad7 100644 --- a/erpnext/accounts/doctype/c_form/c_form.json +++ b/erpnext/accounts/doctype/c_form/c_form.json @@ -11,36 +11,6 @@ "doctype": "DocType", "editable_grid": 0, "fields": [ - { - "allow_bulk_edit": 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, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "50%", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -438,7 +408,7 @@ "issingle": 0, "istable": 0, "max_attachments": 3, - "modified": "2017-06-13 14:28:56.667292", + "modified": "2017-11-10 18:44:44.081464", "modified_by": "Administrator", "module": "Accounts", "name": "C-Form", diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json index fb4ca2f7b1..b4802f4647 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "autoname": "PCE/.###", @@ -12,34 +13,7 @@ "engine": "InnoDB", "fields": [ { - "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_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "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, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -50,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": "Transaction Date", @@ -69,6 +44,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -79,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": "Posting Date", @@ -98,6 +75,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -108,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": "Closing Fiscal Year", @@ -128,6 +107,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -138,6 +118,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", @@ -158,6 +139,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -168,6 +150,7 @@ "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", @@ -188,6 +171,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -198,6 +182,7 @@ "ignore_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 +200,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -226,6 +212,7 @@ "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 Account Head", @@ -246,6 +233,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -256,6 +244,7 @@ "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", @@ -275,18 +264,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-file-text", "idx": 1, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:32:15.691681", + "modified": "2017-11-10 18:41:10.881530", "modified_by": "Administrator", "module": "Accounts", "name": "Period Closing Voucher", @@ -302,7 +291,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -323,7 +311,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -339,8 +326,10 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "posting_date, fiscal_year", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "title_field": "closing_account_head", + "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 d6285f7849..9b4a26e7d6 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json @@ -13,35 +13,6 @@ "editable_grid": 0, "engine": "InnoDB", "fields": [ - { - "allow_bulk_edit": 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, - "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, - "width": "50%" - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -507,7 +478,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-06-13 14:29:01.066538", + "modified": "2017-11-10 18:41:38.845159", "modified_by": "Administrator", "module": "HR", "name": "Leave Allocation", diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json index 4f31f9b00c..d3c309719d 100644 --- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json +++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json @@ -11,34 +11,7 @@ "editable_grid": 0, "fields": [ { - "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, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -69,6 +42,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -99,6 +73,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -129,6 +104,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -159,6 +135,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -189,6 +166,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -217,6 +195,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -246,6 +225,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -275,6 +255,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -304,6 +285,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -333,6 +315,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -361,6 +344,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -401,7 +385,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-03-29 11:24:17.013862", + "modified": "2017-11-10 18:42:17.060492", "modified_by": "Administrator", "module": "HR", "name": "Leave Control Panel", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 8f1e6b3c2a..6a52f2d7f6 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "beta": 0, @@ -12,35 +13,7 @@ "editable_grid": 0, "fields": [ { - "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, - "oldfieldtype": "Column Break", - "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, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -53,7 +26,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Posting Date", "length": 0, @@ -71,6 +44,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -82,7 +56,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 1, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 1, "label": "Employee", "length": 0, @@ -102,6 +76,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -113,7 +88,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 1, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Employee Name", "length": 0, @@ -133,6 +108,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -164,6 +140,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -196,6 +173,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -227,6 +205,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -256,6 +235,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -286,6 +266,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -316,6 +297,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -327,7 +309,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 1, "label": "Company", "length": 0, @@ -345,6 +327,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -374,6 +357,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -402,6 +386,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -433,6 +418,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -463,6 +449,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -494,6 +481,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -522,6 +510,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -553,6 +542,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -585,6 +575,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -616,6 +607,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -647,6 +639,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -678,6 +671,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -708,6 +702,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -739,6 +734,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -767,6 +763,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -796,6 +793,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -826,6 +824,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -856,6 +855,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -886,6 +886,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -916,6 +917,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -944,6 +946,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -975,6 +978,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1004,6 +1008,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1034,6 +1039,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1066,6 +1072,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1096,6 +1103,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1127,6 +1135,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1156,6 +1165,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1187,6 +1197,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1214,6 +1225,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1245,6 +1257,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1275,6 +1288,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1305,6 +1319,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1335,6 +1350,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1363,6 +1379,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1393,6 +1410,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1422,6 +1440,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1454,6 +1473,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1482,6 +1502,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 1, "collapsible": 0, @@ -1511,6 +1532,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1539,6 +1561,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1570,18 +1593,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-file-text", "idx": 9, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-03-02 02:25:53.844701", + "modified": "2017-11-10 18:40:33.817074", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json index 4145fcbffb..945ebd05cb 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.json +++ b/erpnext/hr/doctype/salary_structure/salary_structure.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, "autoname": "Prompt", @@ -12,34 +13,7 @@ "editable_grid": 0, "fields": [ { - "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, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -69,6 +43,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -99,6 +74,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -127,6 +103,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -159,6 +136,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -191,6 +169,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -222,6 +201,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -250,6 +230,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -281,6 +262,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -310,6 +292,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -340,6 +323,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -368,6 +352,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -400,6 +385,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -431,6 +417,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -464,6 +451,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -495,6 +483,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -527,6 +516,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -558,6 +548,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -589,6 +580,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -618,6 +610,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -646,6 +639,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -677,6 +671,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -708,6 +703,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -737,6 +733,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -766,6 +763,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -796,6 +794,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -824,6 +823,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -854,18 +854,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-file-text", "idx": 1, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-02-22 06:09:55.491748", + "modified": "2017-11-10 18:45:07.120254", "modified_by": "Administrator", "module": "HR", "name": "Salary Structure", diff --git a/erpnext/selling/doctype/sms_center/sms_center.json b/erpnext/selling/doctype/sms_center/sms_center.json index 3ea5b140c3..833539aeb9 100644 --- a/erpnext/selling/doctype/sms_center/sms_center.json +++ b/erpnext/selling/doctype/sms_center/sms_center.json @@ -1,49 +1,39 @@ { "allow_copy": 1, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, + "beta": 0, "creation": "2013-01-10 16:34:22", "custom": 0, "docstatus": 0, "doctype": "DocType", + "editable_grid": 0, "fields": [ { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "fieldname": "column_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, + "columns": 0, "fieldname": "send_to", "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": "Send To", + "length": 0, "no_copy": 0, "options": "\nAll Contact\nAll Customer Contact\nAll Supplier Contact\nAll Sales Partner Contact\nAll Lead (Open)\nAll Employee (Active)\nAll Sales Person", "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, @@ -51,22 +41,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Customer Contact'", "fieldname": "customer", "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": "Customer", + "length": 0, "no_copy": 0, "options": "Customer", "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, @@ -74,22 +72,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Supplier Contact'", "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, "options": "Supplier", "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, @@ -97,23 +103,31 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Sales Partner Contact'", "fieldname": "sales_partner", "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": "Sales Partner", + "length": 0, "no_copy": 0, "options": "Sales Partner", "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, @@ -121,22 +135,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Employee (Active)'", "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": 0, "label": "Department", + "length": 0, "no_copy": 0, "options": "Department", "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, @@ -144,22 +166,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Employee (Active)'", "fieldname": "branch", "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": "Branch", + "length": 0, "no_copy": 0, "options": "Branch", "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, @@ -167,21 +197,29 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "create_receiver_list", "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": "Create Receiver List", + "length": 0, "no_copy": 0, "options": "create_receiver_list", "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, @@ -189,20 +227,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "receiver_list", "fieldtype": "Code", "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": "Receiver List", + "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, @@ -210,19 +256,27 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "column_break9", "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, @@ -231,21 +285,29 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "description": "Messages greater than 160 characters will be split into multiple messages", "fieldname": "message", "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": "Message", + "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": 1, "search_index": 0, @@ -253,20 +315,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "total_characters", "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": "Total Characters", + "length": 0, "no_copy": 0, "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, @@ -274,20 +344,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "total_messages", "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": "Total Message(s)", + "length": 0, "no_copy": 0, "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, @@ -295,21 +373,29 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "send_sms", "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": "Send SMS", + "length": 0, "no_copy": 0, "options": "send_sms", "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, @@ -317,16 +403,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-mobile-phone", "idx": 1, + "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 1, "istable": 0, - "modified": "2015-05-25 17:46:37.555503", + "max_attachments": 0, + "modified": "2017-11-10 18:46:21.021767", "modified_by": "Administrator", "module": "Selling", "name": "SMS Center", @@ -353,8 +441,12 @@ "write": 1 } ], + "quick_entry": 0, "read_only": 1, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", - "sort_order": "DESC" + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0 } \ No newline at end of file From 17b720903250459a825e3b56e7e0f96d82ed0aeb Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Fri, 10 Nov 2017 18:54:03 +0530 Subject: [PATCH 72/85] remove erroneous column breaks (#11522) --- erpnext/accounts/doctype/c_form/c_form.json | 32 +--- .../period_closing_voucher.json | 53 +++---- .../leave_allocation/leave_allocation.json | 31 +--- .../leave_control_panel.json | 42 ++---- .../hr/doctype/salary_slip/salary_slip.json | 93 +++++++----- .../salary_structure/salary_structure.json | 60 ++++---- .../doctype/sms_center/sms_center.json | 140 +++++++++++++++--- 7 files changed, 240 insertions(+), 211 deletions(-) diff --git a/erpnext/accounts/doctype/c_form/c_form.json b/erpnext/accounts/doctype/c_form/c_form.json index 29531ec09c..fc712f8ad7 100644 --- a/erpnext/accounts/doctype/c_form/c_form.json +++ b/erpnext/accounts/doctype/c_form/c_form.json @@ -11,36 +11,6 @@ "doctype": "DocType", "editable_grid": 0, "fields": [ - { - "allow_bulk_edit": 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, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "50%", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -438,7 +408,7 @@ "issingle": 0, "istable": 0, "max_attachments": 3, - "modified": "2017-06-13 14:28:56.667292", + "modified": "2017-11-10 18:44:44.081464", "modified_by": "Administrator", "module": "Accounts", "name": "C-Form", diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json index fb4ca2f7b1..b4802f4647 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "autoname": "PCE/.###", @@ -12,34 +13,7 @@ "engine": "InnoDB", "fields": [ { - "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_list_view": 0, - "in_standard_filter": 0, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "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, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -50,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": "Transaction Date", @@ -69,6 +44,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -79,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": "Posting Date", @@ -98,6 +75,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -108,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": "Closing Fiscal Year", @@ -128,6 +107,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -138,6 +118,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", @@ -158,6 +139,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -168,6 +150,7 @@ "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", @@ -188,6 +171,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -198,6 +182,7 @@ "ignore_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 +200,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -226,6 +212,7 @@ "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 Account Head", @@ -246,6 +233,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -256,6 +244,7 @@ "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", @@ -275,18 +264,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-file-text", "idx": 1, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-11-07 05:32:15.691681", + "modified": "2017-11-10 18:41:10.881530", "modified_by": "Administrator", "module": "Accounts", "name": "Period Closing Voucher", @@ -302,7 +291,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -323,7 +311,6 @@ "export": 0, "if_owner": 0, "import": 0, - "is_custom": 0, "permlevel": 0, "print": 1, "read": 1, @@ -339,8 +326,10 @@ "read_only": 0, "read_only_onload": 0, "search_fields": "posting_date, fiscal_year", + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "title_field": "closing_account_head", + "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 d6285f7849..9b4a26e7d6 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.json +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.json @@ -13,35 +13,6 @@ "editable_grid": 0, "engine": "InnoDB", "fields": [ - { - "allow_bulk_edit": 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, - "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, - "width": "50%" - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -507,7 +478,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-06-13 14:29:01.066538", + "modified": "2017-11-10 18:41:38.845159", "modified_by": "Administrator", "module": "HR", "name": "Leave Allocation", diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json index 4f31f9b00c..d3c309719d 100644 --- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json +++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json @@ -11,34 +11,7 @@ "editable_grid": 0, "fields": [ { - "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, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -69,6 +42,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -99,6 +73,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -129,6 +104,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -159,6 +135,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -189,6 +166,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -217,6 +195,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -246,6 +225,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -275,6 +255,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -304,6 +285,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -333,6 +315,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -361,6 +344,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -401,7 +385,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-03-29 11:24:17.013862", + "modified": "2017-11-10 18:42:17.060492", "modified_by": "Administrator", "module": "HR", "name": "Leave Control Panel", diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.json b/erpnext/hr/doctype/salary_slip/salary_slip.json index 8f1e6b3c2a..6a52f2d7f6 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.json +++ b/erpnext/hr/doctype/salary_slip/salary_slip.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, "beta": 0, @@ -12,35 +13,7 @@ "editable_grid": 0, "fields": [ { - "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, - "oldfieldtype": "Column Break", - "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, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -53,7 +26,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Posting Date", "length": 0, @@ -71,6 +44,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -82,7 +56,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 1, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 1, "label": "Employee", "length": 0, @@ -102,6 +76,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -113,7 +88,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 1, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 0, "label": "Employee Name", "length": 0, @@ -133,6 +108,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -164,6 +140,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -196,6 +173,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -227,6 +205,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -256,6 +235,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -286,6 +266,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -316,6 +297,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -327,7 +309,7 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_global_search": 0, - "in_list_view": 0, + "in_list_view": 1, "in_standard_filter": 1, "label": "Company", "length": 0, @@ -345,6 +327,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 1, "bold": 0, "collapsible": 0, @@ -374,6 +357,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -402,6 +386,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -433,6 +418,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -463,6 +449,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -494,6 +481,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -522,6 +510,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -553,6 +542,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -585,6 +575,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -616,6 +607,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -647,6 +639,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -678,6 +671,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -708,6 +702,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -739,6 +734,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -767,6 +763,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -796,6 +793,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -826,6 +824,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -856,6 +855,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -886,6 +886,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -916,6 +917,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -944,6 +946,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -975,6 +978,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1004,6 +1008,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1034,6 +1039,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1066,6 +1072,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1096,6 +1103,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1127,6 +1135,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1156,6 +1165,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1187,6 +1197,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1214,6 +1225,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1245,6 +1257,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1275,6 +1288,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1305,6 +1319,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1335,6 +1350,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1363,6 +1379,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1393,6 +1410,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1422,6 +1440,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1454,6 +1473,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1482,6 +1502,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 1, "collapsible": 0, @@ -1511,6 +1532,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1539,6 +1561,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -1570,18 +1593,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-file-text", "idx": 9, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 1, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-03-02 02:25:53.844701", + "modified": "2017-11-10 18:40:33.817074", "modified_by": "Administrator", "module": "HR", "name": "Salary Slip", diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json index 4145fcbffb..945ebd05cb 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.json +++ b/erpnext/hr/doctype/salary_structure/salary_structure.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, "autoname": "Prompt", @@ -12,34 +13,7 @@ "editable_grid": 0, "fields": [ { - "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, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, - { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -69,6 +43,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -99,6 +74,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -127,6 +103,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -159,6 +136,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -191,6 +169,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -222,6 +201,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -250,6 +230,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -281,6 +262,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -310,6 +292,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -340,6 +323,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -368,6 +352,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -400,6 +385,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -431,6 +417,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -464,6 +451,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -495,6 +483,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -527,6 +516,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -558,6 +548,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -589,6 +580,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -618,6 +610,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -646,6 +639,7 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -677,6 +671,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -708,6 +703,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -737,6 +733,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -766,6 +763,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -796,6 +794,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -824,6 +823,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -854,18 +854,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-file-text", "idx": 1, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-02-22 06:09:55.491748", + "modified": "2017-11-10 18:45:07.120254", "modified_by": "Administrator", "module": "HR", "name": "Salary Structure", diff --git a/erpnext/selling/doctype/sms_center/sms_center.json b/erpnext/selling/doctype/sms_center/sms_center.json index 3ea5b140c3..833539aeb9 100644 --- a/erpnext/selling/doctype/sms_center/sms_center.json +++ b/erpnext/selling/doctype/sms_center/sms_center.json @@ -1,49 +1,39 @@ { "allow_copy": 1, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, + "beta": 0, "creation": "2013-01-10 16:34:22", "custom": 0, "docstatus": 0, "doctype": "DocType", + "editable_grid": 0, "fields": [ { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "fieldname": "column_break1", - "fieldtype": "Column Break", - "hidden": 0, - "ignore_user_permissions": 0, - "in_filter": 0, - "in_list_view": 0, - "no_copy": 0, - "permlevel": 0, - "print_hide": 0, - "read_only": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0, - "width": "50%" - }, - { - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, + "columns": 0, "fieldname": "send_to", "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": "Send To", + "length": 0, "no_copy": 0, "options": "\nAll Contact\nAll Customer Contact\nAll Supplier Contact\nAll Sales Partner Contact\nAll Lead (Open)\nAll Employee (Active)\nAll Sales Person", "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, @@ -51,22 +41,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Customer Contact'", "fieldname": "customer", "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": "Customer", + "length": 0, "no_copy": 0, "options": "Customer", "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, @@ -74,22 +72,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Supplier Contact'", "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, "options": "Supplier", "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, @@ -97,23 +103,31 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Sales Partner Contact'", "fieldname": "sales_partner", "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": "Sales Partner", + "length": 0, "no_copy": 0, "options": "Sales Partner", "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, @@ -121,22 +135,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Employee (Active)'", "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": 0, "label": "Department", + "length": 0, "no_copy": 0, "options": "Department", "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, @@ -144,22 +166,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "depends_on": "eval:doc.send_to=='All Employee (Active)'", "fieldname": "branch", "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": "Branch", + "length": 0, "no_copy": 0, "options": "Branch", "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, @@ -167,21 +197,29 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "create_receiver_list", "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": "Create Receiver List", + "length": 0, "no_copy": 0, "options": "create_receiver_list", "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, @@ -189,20 +227,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "receiver_list", "fieldtype": "Code", "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": "Receiver List", + "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, @@ -210,19 +256,27 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "column_break9", "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, @@ -231,21 +285,29 @@ "width": "50%" }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "description": "Messages greater than 160 characters will be split into multiple messages", "fieldname": "message", "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": "Message", + "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": 1, "search_index": 0, @@ -253,20 +315,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "total_characters", "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": "Total Characters", + "length": 0, "no_copy": 0, "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, @@ -274,20 +344,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "total_messages", "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": "Total Message(s)", + "length": 0, "no_copy": 0, "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, @@ -295,21 +373,29 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "send_sms", "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": "Send SMS", + "length": 0, "no_copy": 0, "options": "send_sms", "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, @@ -317,16 +403,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-mobile-phone", "idx": 1, + "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 1, "istable": 0, - "modified": "2015-05-25 17:46:37.555503", + "max_attachments": 0, + "modified": "2017-11-10 18:46:21.021767", "modified_by": "Administrator", "module": "Selling", "name": "SMS Center", @@ -353,8 +441,12 @@ "write": 1 } ], + "quick_entry": 0, "read_only": 1, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", - "sort_order": "DESC" + "sort_order": "DESC", + "track_changes": 0, + "track_seen": 0 } \ No newline at end of file From 4ec4e3fb29e72a3f2726266b85eaeee6ef10e3fa Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 10 Nov 2017 19:15:17 +0530 Subject: [PATCH 73/85] [patch] Revert Manufacturing User role (#11514) --- erpnext/domains/manufacturing.py | 3 --- .../v9_0/revert_manufacturing_user_role.py | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 erpnext/patches/v9_0/revert_manufacturing_user_role.py diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py index b8bb7e0578..8c911a311d 100644 --- a/erpnext/domains/manufacturing.py +++ b/erpnext/domains/manufacturing.py @@ -18,8 +18,5 @@ data = { 'set_value': [ ['Stock Settings', None, 'show_barcode_field', 1] ], - 'restricted_roles': [ - 'Manufacturing User' - ], 'default_portal_role': 'Customer' } \ No newline at end of file diff --git a/erpnext/patches/v9_0/revert_manufacturing_user_role.py b/erpnext/patches/v9_0/revert_manufacturing_user_role.py new file mode 100644 index 0000000000..5bfa8c3f9a --- /dev/null +++ b/erpnext/patches/v9_0/revert_manufacturing_user_role.py @@ -0,0 +1,21 @@ +import frappe + +def execute(): + if 'Manufacturing' in frappe.get_active_domains(): return + + role = 'Manufacturing User' + frappe.db.set_value('Role', role, 'restrict_to_domain', '') + frappe.db.set_value('Role', role, 'disabled', 0) + + users = frappe.get_all('Has Role', filters = { + 'parenttype': 'User', + 'role': ('in', ['System Manager', 'Manufacturing Manager']) + }, fields=['parent'], as_list=1) + + for user in users: + _user = frappe.get_doc('User', user[0]) + _user.append('roles', { + 'role': role + }) + _user.flags.ignore_validate = True + _user.save() From 0f86d86e2735640586ccb8a251b5e337cdde61cf Mon Sep 17 00:00:00 2001 From: Saurabh Date: Fri, 10 Nov 2017 19:21:09 +0530 Subject: [PATCH 74/85] [fix] validate party account (#11517) --- erpnext/accounts/party.py | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index ce049f5d87..3a0b2d5e1e 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -176,29 +176,34 @@ def get_party_account(party_type, party, company): if not company: frappe.throw(_("Please select a Company")) - if party: + if not party: + frappe.throw(_("Please select a Party")) + + account = frappe.db.get_value("Party Account", + {"parenttype": party_type, "parent": party, "company": company}, "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_type, "parent": party, "company": company}, "account") + {"parenttype": party_group_doctype, "parent": group, "company": company}, "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 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) - 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) + existing_gle_currency = get_party_gle_currency(party_type, party, company) + if existing_gle_currency: + if account: + account_currency = frappe.db.get_value("Account", account, "account_currency") + if (account and account_currency != existing_gle_currency) or not account: + account = get_party_gle_account(party_type, party, company) - existing_gle_currency = get_party_gle_currency(party_type, party, company) - if existing_gle_currency: - if account: - account_currency = frappe.db.get_value("Account", account, "account_currency") - if (account and account_currency != existing_gle_currency) or not account: - account = get_party_gle_account(party_type, party, company) + if not account: + frappe.throw(_("Party account not specified, please setup default party account in company")) - return account + return account def get_party_account_currency(party_type, party, company): def generator(): From deeb1380b14a8adca07e3e0b3daf5b1d39054700 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 13 Nov 2017 13:52:05 +0530 Subject: [PATCH 75/85] Ignore paid credit note in outstanding invoices in Payment Entry (#11534) --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 1 - erpnext/accounts/utils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 52d8a2d5ce..c5e0306486 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -252,7 +252,6 @@ frappe.ui.form.on('Payment Entry', { date: frm.doc.posting_date }, callback: function(r, rt) { - console.log(r, rt); if(r.message) { if(frm.doc.payment_type == "Receive") { frm.set_value("paid_from", r.message.party_account); diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 50530f5dc1..f7aa341e12 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -593,7 +593,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None): select ifnull(sum({payment_dr_or_cr}), 0) from `tabGL Entry` payment_gl_entry where payment_gl_entry.against_voucher_type = invoice_gl_entry.voucher_type - and payment_gl_entry.against_voucher = invoice_gl_entry.voucher_no + and payment_gl_entry.against_voucher = invoice_gl_entry.against_voucher and payment_gl_entry.party_type = invoice_gl_entry.party_type and payment_gl_entry.party = invoice_gl_entry.party and payment_gl_entry.account = invoice_gl_entry.account From feeb47dbbe09927730dc6923e6ec7bee98a13073 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 13 Nov 2017 13:52:58 +0530 Subject: [PATCH 76/85] [fix] if not students in student groups then raise exception (#11537) --- erpnext/schools/doctype/fee_schedule/fee_schedule.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/schools/doctype/fee_schedule/fee_schedule.py b/erpnext/schools/doctype/fee_schedule/fee_schedule.py index fc2907aaaf..3e1dd0ccb9 100644 --- a/erpnext/schools/doctype/fee_schedule/fee_schedule.py +++ b/erpnext/schools/doctype/fee_schedule/fee_schedule.py @@ -9,6 +9,7 @@ from frappe.model.mapper import get_mapped_doc from frappe.utils import money_in_words from frappe.utils import cint, flt, cstr from frappe.utils.background_jobs import enqueue +from frappe import _ class FeeSchedule(Document): @@ -57,6 +58,10 @@ def generate_fee(fee_schedule): error = False total_records = sum([int(d.total_students) for d in doc.student_groups]) created_records = 0 + + if not total_records: + frappe.throw(_("Please setup Students under Student Groups")) + for d in doc.student_groups: students = frappe.db.sql(""" select sg.program, sg.batch, sgs.student, sgs.student_name from `tabStudent Group` sg, `tabStudent Group Student` sgs From 6605919ecdae39234a6d808fff223723c99f2827 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 13 Nov 2017 15:06:35 +0530 Subject: [PATCH 77/85] GL Entries on sale of an asset (#11538) --- .../accounts/doctype/asset/depreciation.py | 19 +++++++------- erpnext/accounts/doctype/asset/test_asset.py | 4 +-- .../doctype/sales_invoice/sales_invoice.py | 26 +++++++++---------- erpnext/accounts/party.py | 2 +- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/erpnext/accounts/doctype/asset/depreciation.py b/erpnext/accounts/doctype/asset/depreciation.py index 495433a8b1..c72cb968da 100644 --- a/erpnext/accounts/doctype/asset/depreciation.py +++ b/erpnext/accounts/doctype/asset/depreciation.py @@ -151,11 +151,14 @@ def restore_asset(asset_name): asset.set_status() @frappe.whitelist() -def get_gl_entries_on_asset_disposal(asset, selling_amount=0): +def get_gl_entries_on_asset_disposal(asset, is_sale=False): fixed_asset_account, accumulated_depr_account, depr_expense_account = get_depreciation_accounts(asset) - disposal_account, depreciation_cost_center = get_disposal_account_and_cost_center(asset.company) accumulated_depr_amount = flt(asset.gross_purchase_amount) - flt(asset.value_after_depreciation) + expense_account, cost_center = get_disposal_account_and_cost_center(asset.company) + if is_sale: + expense_account = depr_expense_account + gl_entries = [ { "account": fixed_asset_account, @@ -169,14 +172,12 @@ def get_gl_entries_on_asset_disposal(asset, selling_amount=0): } ] - profit_amount = flt(selling_amount) - flt(asset.value_after_depreciation) - if flt(asset.value_after_depreciation) and profit_amount: - debit_or_credit = "debit" if profit_amount < 0 else "credit" + if flt(asset.value_after_depreciation): gl_entries.append({ - "account": disposal_account, - "cost_center": depreciation_cost_center, - debit_or_credit: abs(profit_amount), - debit_or_credit + "_in_account_currency": abs(profit_amount) + "account": expense_account, + "cost_center": cost_center, + "debit": flt(asset.value_after_depreciation), + "debit_in_account_currency": flt(asset.value_after_depreciation) }) return gl_entries diff --git a/erpnext/accounts/doctype/asset/test_asset.py b/erpnext/accounts/doctype/asset/test_asset.py index 831373a9c9..fd66d1fb67 100644 --- a/erpnext/accounts/doctype/asset/test_asset.py +++ b/erpnext/accounts/doctype/asset/test_asset.py @@ -188,7 +188,6 @@ class TestAsset(unittest.TestCase): asset.load_from_db() depr_entry = asset.get("schedules")[0].journal_entry self.assertFalse(depr_entry) - def test_scrap_asset(self): asset = frappe.get_doc("Asset", "Macbook Pro 1") @@ -234,8 +233,9 @@ class TestAsset(unittest.TestCase): expected_gle = ( ("_Test Accumulated Depreciations - _TC", 30000.0, 0.0), + ("_Test Depreciations - _TC", 70000.0, 0.0), ("_Test Fixed Asset - _TC", 0.0, 100000.0), - ("_Test Gain/Loss on Asset Disposal - _TC", 45000.0, 0.0), + ("_Test Gain/Loss on Asset Disposal - _TC", 0.0, 25000.0), ("Debtors - _TC", 25000.0, 0.0) ) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 995a333eba..db9969d133 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -670,28 +670,28 @@ class SalesInvoice(SellingController): # income account gl entries for item in self.get("items"): if flt(item.base_net_amount): + account_currency = get_account_currency(item.income_account) + gl_entries.append( + self.get_gl_dict({ + "account": item.income_account, + "against": self.customer, + "credit": item.base_net_amount, + "credit_in_account_currency": item.base_net_amount \ + if account_currency==self.company_currency else item.net_amount, + "cost_center": item.cost_center + }, account_currency) + ) + if item.is_fixed_asset: asset = frappe.get_doc("Asset", item.asset) - fixed_asset_gl_entries = get_gl_entries_on_asset_disposal(asset, item.base_net_amount) + fixed_asset_gl_entries = get_gl_entries_on_asset_disposal(asset, is_sale=True) for gle in fixed_asset_gl_entries: gle["against"] = self.customer gl_entries.append(self.get_gl_dict(gle)) asset.db_set("disposal_date", self.posting_date) asset.set_status("Sold" if self.docstatus==1 else None) - else: - account_currency = get_account_currency(item.income_account) - gl_entries.append( - self.get_gl_dict({ - "account": item.income_account, - "against": self.customer, - "credit": item.base_net_amount, - "credit_in_account_currency": item.base_net_amount \ - if account_currency==self.company_currency else item.net_amount, - "cost_center": item.cost_center - }, account_currency) - ) # expense account gl entries if cint(self.update_stock) and \ diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 3a0b2d5e1e..f655830864 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -177,7 +177,7 @@ def get_party_account(party_type, party, company): frappe.throw(_("Please select a Company")) if not party: - frappe.throw(_("Please select a Party")) + return account = frappe.db.get_value("Party Account", {"parenttype": party_type, "parent": party, "company": company}, "account") From 58ab203fc0f9de30670857fe66c7f1bb49ef629f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 13 Nov 2017 15:40:16 +0600 Subject: [PATCH 78/85] bumped to version 9.2.10 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index aa52b834f3..eb3d0a77be 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.9' +__version__ = '9.2.10' def get_default_company(user=None): '''Get default company for user''' From 69be5362a54f5c84dda50e3d2e716d6cbe3ea3b9 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Mon, 13 Nov 2017 18:32:06 +0530 Subject: [PATCH 79/85] minor fixes in the assessment result (#11543) --- erpnext/schools/doctype/assessment_result/assessment_result.js | 2 +- .../doctype/assessment_result_tool/assessment_result_tool.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.js b/erpnext/schools/doctype/assessment_result/assessment_result.js index 7bd1d1960b..6d2089681f 100644 --- a/erpnext/schools/doctype/assessment_result/assessment_result.js +++ b/erpnext/schools/doctype/assessment_result/assessment_result.js @@ -32,7 +32,7 @@ frappe.ui.form.on("Assessment Result", { frappe.ui.form.on("Assessment Result Detail", { score: function(frm, cdt, cdn) { var d = locals[cdt][cdn]; - if (d.score >= d.maximum_score) { + if (d.score > d.maximum_score) { frappe.throw(__("Score cannot be greater than Maximum Score")); } else { 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 dfa7b142f7..142bbf4756 100644 --- a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js +++ b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js @@ -12,10 +12,11 @@ frappe.ui.form.on('Assessment Result Tool', { frm.set_value("student_group", frappe.route_options.student_group); frm.set_value("assessment_plan", frappe.route_options.assessment_plan); frappe.route_options = null; + } else { + frm.trigger("assessment_plan"); } frm.disable_save(); frm.page.clear_indicator(); - frm.trigger("assessment_plan"); }, assessment_plan: function(frm) { From e5aa9c5f2f16835da9f38362446e199acbdee4d4 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Mon, 13 Nov 2017 18:56:53 +0530 Subject: [PATCH 80/85] new report - assessment plan status (#11504) * new report - assessment plan status * add the report in the school dashboard * fix for the print format --- erpnext/config/schools.py | 14 +- .../report/assessment_plan_status/__init__.py | 0 .../assessment_plan_status.js | 28 +++ .../assessment_plan_status.json | 23 +++ .../assessment_plan_status.py | 179 ++++++++++++++++++ 5 files changed, 240 insertions(+), 4 deletions(-) create mode 100644 erpnext/schools/report/assessment_plan_status/__init__.py create mode 100644 erpnext/schools/report/assessment_plan_status/assessment_plan_status.js create mode 100644 erpnext/schools/report/assessment_plan_status/assessment_plan_status.json create mode 100644 erpnext/schools/report/assessment_plan_status/assessment_plan_status.py diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py index dbdcd3561d..1e7d1b035b 100644 --- a/erpnext/config/schools.py +++ b/erpnext/config/schools.py @@ -122,10 +122,6 @@ def get_data(): "type": "doctype", "name": "Assessment Result" }, - { - "type": "doctype", - "name": "Grading Scale" - }, { "type": "doctype", "name": "Assessment Criteria" @@ -144,6 +140,12 @@ def get_data(): "name": "Course wise Assessment Report", "doctype": "Assessment Result" }, + { + "type": "report", + "is_query_report": True, + "name": "Assessment Plan Status", + "doctype": "Assessment Plan" + }, ] }, @@ -201,6 +203,10 @@ def get_data(): "type": "doctype", "name": "Student Batch Name" }, + { + "type": "doctype", + "name": "Grading Scale" + }, { "type": "doctype", "name": "Academic Term" diff --git a/erpnext/schools/report/assessment_plan_status/__init__.py b/erpnext/schools/report/assessment_plan_status/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/schools/report/assessment_plan_status/assessment_plan_status.js b/erpnext/schools/report/assessment_plan_status/assessment_plan_status.js new file mode 100644 index 0000000000..2d1eb09640 --- /dev/null +++ b/erpnext/schools/report/assessment_plan_status/assessment_plan_status.js @@ -0,0 +1,28 @@ +// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt +/* eslint-disable */ + +frappe.query_reports["Assessment Plan Status"] = { + "filters": [ + { + "fieldname":"assessment_group", + "label": __("Assessment Group"), + "fieldtype": "Link", + "options": "Assessment Group", + "get_query": function() { + return{ + filters: { + 'is_group': 0 + } + }; + } + }, + { + "fieldname":"schedule_date", + "label": __("Scheduled Upto"), + "fieldtype": "Date", + "options": "" + } + + ] +} diff --git a/erpnext/schools/report/assessment_plan_status/assessment_plan_status.json b/erpnext/schools/report/assessment_plan_status/assessment_plan_status.json new file mode 100644 index 0000000000..141747f501 --- /dev/null +++ b/erpnext/schools/report/assessment_plan_status/assessment_plan_status.json @@ -0,0 +1,23 @@ +{ + "add_total_row": 0, + "apply_user_permissions": 1, + "creation": "2017-11-09 15:07:30.404428", + "disabled": 0, + "docstatus": 0, + "doctype": "Report", + "idx": 0, + "is_standard": "Yes", + "modified": "2017-11-13 11:25:50.651364", + "modified_by": "Administrator", + "module": "Schools", + "name": "Assessment Plan Status", + "owner": "Administrator", + "ref_doctype": "Assessment Plan", + "report_name": "Assessment Plan Status", + "report_type": "Script Report", + "roles": [ + { + "role": "Academics User" + } + ] +} \ No newline at end of file diff --git a/erpnext/schools/report/assessment_plan_status/assessment_plan_status.py b/erpnext/schools/report/assessment_plan_status/assessment_plan_status.py new file mode 100644 index 0000000000..21184a637c --- /dev/null +++ b/erpnext/schools/report/assessment_plan_status/assessment_plan_status.py @@ -0,0 +1,179 @@ +# 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 _ +from itertools import groupby +from frappe.utils import cint + +DOCSTATUS = { + 0: "saved", + 1: "submitted", +} + +def execute(filters=None): + columns, data = [], [] + + args = frappe._dict() + args["assessment_group"] = filters.get("assessment_group") + args["schedule_date"] = filters.get("schedule_date") + + columns = get_column() + + data, chart = get_assessment_data(args) + + return columns, data, None, chart + + +def get_assessment_data(args=None): + + # [total, saved, submitted, remaining] + chart_data = [0, 0, 0, 0] + + condition = '' + if args["assessment_group"]: + condition += "and assessment_group = %(assessment_group)s" + if args["schedule_date"]: + condition += "and schedule_date <= %(schedule_date)s" + + assessment_plan = frappe.db.sql(''' + SELECT + ap.name as assessment_plan, + ap.assessment_name, + ap.student_group, + ap.schedule_date, + (select count(*) from `tabStudent Group Student` sgs where sgs.parent=ap.student_group) + as student_group_strength + FROM + `tabAssessment Plan` ap + WHERE + ap.docstatus = 1 {condition} + ORDER BY + ap.modified desc + '''.format(condition=condition), (args), as_dict=1) + + assessment_plan_list = [d.assessment_plan for d in assessment_plan] if assessment_plan else [''] + assessment_result = get_assessment_result(assessment_plan_list) + + for d in assessment_plan: + + assessment_plan_details = assessment_result.get(d.assessment_plan) + assessment_plan_details = frappe._dict() if not assessment_plan_details else \ + frappe._dict(assessment_plan_details) + if "saved" not in assessment_plan_details: + assessment_plan_details.update({"saved": 0}) + if "submitted" not in assessment_plan_details: + assessment_plan_details.update({"submitted": 0}) + + # remaining students whose marks not entered + remaining_students = cint(d.student_group_strength) - cint(assessment_plan_details.saved) -\ + cint(assessment_plan_details.submitted) + assessment_plan_details.update({"remaining": remaining_students}) + d.update(assessment_plan_details) + + chart_data[0] += cint(d.student_group_strength) + chart_data[1] += assessment_plan_details.saved + chart_data[2] += assessment_plan_details.submitted + chart_data[3] += assessment_plan_details.remaining + + chart = get_chart(chart_data[1:]) + + return assessment_plan, chart + + +def get_assessment_result(assessment_plan_list): + assessment_result_dict = frappe._dict() + + assessment_result = frappe.db.sql(''' + SELECT + assessment_plan, docstatus, count(*) as count + FROM + `tabAssessment Result` + WHERE + assessment_plan in (%s) + GROUP BY + assessment_plan, docstatus + ORDER BY + assessment_plan + ''' %', '.join(['%s']*len(assessment_plan_list)), tuple(assessment_plan_list), as_dict=1) + + for key, group in groupby(assessment_result, lambda ap: ap["assessment_plan"]): + tmp = {} + for d in group: + if d.docstatus in [0,1]: + tmp.update({DOCSTATUS[d.docstatus]:d.count}) + assessment_result_dict[key] = tmp + + return assessment_result_dict + + +def get_chart(chart_data): + return { + "data": { + "labels": ["Saved", "Submitted", "Remaining"], + "datasets": [{ + "values": chart_data + }] + }, + "type": 'percentage', + } + + +def get_column(): + return [{ + "fieldname": "assessment_plan", + "label": _("Assessment Plan"), + "fieldtype": "Link", + "options": "Assessment Plan", + "width": 120 + }, + { + "fieldname": "assessment_name", + "label": _("Assessment Plan Name"), + "fieldtype": "Data", + "options": "", + "width": 200 + }, + { + "fieldname": "schedule_date", + "label": _("Schedule Date"), + "fieldtype": "Date", + "options": "", + "width": 100 + }, + { + "fieldname": "student_group", + "label": _("Student Group"), + "fieldtype": "Link", + "options": "Student Group", + "width": 200 + }, + { + "fieldname": "student_group_strength", + "label": _("Total Student"), + "fieldtype": "Data", + "options": "", + "width": 100 + }, + { + "fieldname": "submitted", + "label": _("Submitted"), + "fieldtype": "Data", + "options": "", + "width": 100 + }, + { + "fieldname": "saved", + "label": _("Saved"), + "fieldtype": "Data", + "options": "", + "width": 100 + }, + { + "fieldname": "remaining", + "label": _("Remaining"), + "fieldtype": "Data", + "options": "", + "width": 100 + }] From 3a5dceae18f202cb8adf0fc49579c5460d3ce88d Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 13 Nov 2017 19:19:13 +0530 Subject: [PATCH 81/85] Add Github Connector (#11259) - Add new module ERPNext Integrations --- erpnext/erpnext_integrations/__init__.py | 0 .../connectors/__init__.py | 0 .../connectors/github_connection.py | 45 +++++++++++++++++++ .../data_migration_mapping/__init__.py | 0 .../issue_to_task/__init__.py | 11 +++++ .../issue_to_task/issue_to_task.json | 36 +++++++++++++++ .../milestone_to_project/__init__.py | 6 +++ .../milestone_to_project.json | 36 +++++++++++++++ .../github_sync/github_sync.json | 22 +++++++++ erpnext/modules.txt | 1 + 10 files changed, 157 insertions(+) create mode 100644 erpnext/erpnext_integrations/__init__.py create mode 100644 erpnext/erpnext_integrations/connectors/__init__.py create mode 100644 erpnext/erpnext_integrations/connectors/github_connection.py create mode 100644 erpnext/erpnext_integrations/data_migration_mapping/__init__.py create mode 100644 erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py create mode 100644 erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/issue_to_task.json create mode 100644 erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py create mode 100644 erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/milestone_to_project.json create mode 100644 erpnext/erpnext_integrations/data_migration_plan/github_sync/github_sync.json diff --git a/erpnext/erpnext_integrations/__init__.py b/erpnext/erpnext_integrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/erpnext_integrations/connectors/__init__.py b/erpnext/erpnext_integrations/connectors/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/erpnext_integrations/connectors/github_connection.py b/erpnext/erpnext_integrations/connectors/github_connection.py new file mode 100644 index 0000000000..ab7708df30 --- /dev/null +++ b/erpnext/erpnext_integrations/connectors/github_connection.py @@ -0,0 +1,45 @@ +from __future__ import unicode_literals +import frappe +from frappe.data_migration.doctype.data_migration_connector.connectors.base import BaseConnection +from github import Github + +class GithubConnection(BaseConnection): + def __init__(self, connector): + self.connector = connector + + try: + password = self.get_password() + except frappe.AuthenticationError: + password = None + + if self.connector.username and password: + self.connection = Github(self.connector.username, self.get_password()) + else: + self.connection = Github() + + self.name_field = 'id' + + def insert(self, doctype, doc): + pass + + def update(self, doctype, doc, migration_id): + pass + + def delete(self, doctype, migration_id): + pass + + def get(self, remote_objectname, fields=None, filters=None, start=0, page_length=10): + repo = filters.get('repo') + + if remote_objectname == 'Milestone': + return self.get_milestones(repo, start, page_length) + if remote_objectname == 'Issue': + return self.get_issues(repo, start, page_length) + + def get_milestones(self, repo, start=0, page_length=10): + _repo = self.connection.get_repo(repo) + return list(_repo.get_milestones()[start:start+page_length]) + + def get_issues(self, repo, start=0, page_length=10): + _repo = self.connection.get_repo(repo) + return list(_repo.get_issues()[start:start+page_length]) diff --git a/erpnext/erpnext_integrations/data_migration_mapping/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py new file mode 100644 index 0000000000..5f0f691b9c --- /dev/null +++ b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py @@ -0,0 +1,11 @@ +import frappe + +def pre_process(issue): + + project = frappe.db.get_value('Project', filters={'project_name': issue.milestone}) + return { + 'title': issue.title, + 'body': frappe.utils.to_html(issue.body or ''), + 'state': issue.state.title(), + 'project': project or '' + } diff --git a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/issue_to_task.json b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/issue_to_task.json new file mode 100644 index 0000000000..e945ba2261 --- /dev/null +++ b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/issue_to_task.json @@ -0,0 +1,36 @@ +{ + "condition": "{\"repo\":\"frappe/erpnext\"}", + "creation": "2017-10-16 16:03:32.772191", + "docstatus": 0, + "doctype": "Data Migration Mapping", + "fields": [ + { + "is_child_table": 0, + "local_fieldname": "subject", + "remote_fieldname": "title" + }, + { + "is_child_table": 0, + "local_fieldname": "description", + "remote_fieldname": "body" + }, + { + "is_child_table": 0, + "local_fieldname": "status", + "remote_fieldname": "state" + } + ], + "idx": 0, + "local_doctype": "Task", + "local_primary_key": "name", + "mapping_name": "Issue to Task", + "mapping_type": "Pull", + "migration_id_field": "github_sync_id", + "modified": "2017-10-20 11:48:54.575993", + "modified_by": "Administrator", + "name": "Issue to Task", + "owner": "Administrator", + "page_length": 10, + "remote_objectname": "Issue", + "remote_primary_key": "id" +} \ No newline at end of file diff --git a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py new file mode 100644 index 0000000000..212f81b5f9 --- /dev/null +++ b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py @@ -0,0 +1,6 @@ +def pre_process(milestone): + return { + 'title': milestone.title, + 'description': milestone.description, + 'state': milestone.state.title() + } diff --git a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/milestone_to_project.json b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/milestone_to_project.json new file mode 100644 index 0000000000..5a3e07e37e --- /dev/null +++ b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/milestone_to_project.json @@ -0,0 +1,36 @@ +{ + "condition": "{\"repo\": \"frappe/erpnext\"}", + "creation": "2017-10-13 11:16:49.664925", + "docstatus": 0, + "doctype": "Data Migration Mapping", + "fields": [ + { + "is_child_table": 0, + "local_fieldname": "project_name", + "remote_fieldname": "title" + }, + { + "is_child_table": 0, + "local_fieldname": "notes", + "remote_fieldname": "description" + }, + { + "is_child_table": 0, + "local_fieldname": "status", + "remote_fieldname": "state" + } + ], + "idx": 0, + "local_doctype": "Project", + "local_primary_key": "project_name", + "mapping_name": "Milestone to Project", + "mapping_type": "Pull", + "migration_id_field": "github_sync_id", + "modified": "2017-10-20 11:48:54.552305", + "modified_by": "Administrator", + "name": "Milestone to Project", + "owner": "Administrator", + "page_length": 10, + "remote_objectname": "Milestone", + "remote_primary_key": "id" +} \ No newline at end of file diff --git a/erpnext/erpnext_integrations/data_migration_plan/github_sync/github_sync.json b/erpnext/erpnext_integrations/data_migration_plan/github_sync/github_sync.json new file mode 100644 index 0000000000..20eb387cd8 --- /dev/null +++ b/erpnext/erpnext_integrations/data_migration_plan/github_sync/github_sync.json @@ -0,0 +1,22 @@ +{ + "creation": "2017-10-13 11:16:53.600026", + "docstatus": 0, + "doctype": "Data Migration Plan", + "idx": 0, + "mappings": [ + { + "enabled": 1, + "mapping": "Milestone to Project" + }, + { + "enabled": 1, + "mapping": "Issue to Task" + } + ], + "modified": "2017-10-20 11:48:54.496123", + "modified_by": "Administrator", + "module": "ERPNext Integrations", + "name": "GitHub Sync", + "owner": "Administrator", + "plan_name": "GitHub Sync" +} \ No newline at end of file diff --git a/erpnext/modules.txt b/erpnext/modules.txt index 5e9f6c73d1..79ded14573 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -17,3 +17,4 @@ Schools Regional Healthcare Restaurant +ERPNext Integrations \ No newline at end of file From 98aa5818647a37270b7132149e14083528784ab6 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 14 Nov 2017 09:32:32 +0530 Subject: [PATCH 82/85] [fix] default tax only on insert (#11544) * [fix] default tax only on insert * [fix] default tax only on insert * [fix] default tax only on insert --- erpnext/controllers/accounts_controller.py | 9 +++-- .../crm/doctype/opportunity/opportunity.py | 18 ++++----- erpnext/public/js/controllers/transaction.js | 38 +++++++++++++------ 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index ebd45c4c59..d3f6d38e14 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -209,10 +209,10 @@ class AccountsController(TransactionBase): tax_master_doctype = self.meta.get_field("taxes_and_charges").options - if not self.get("taxes"): + if self.is_new() and not self.get("taxes"): if not self.get("taxes_and_charges"): # get the default tax master - self.set("taxes_and_charges", frappe.db.get_value(tax_master_doctype, {"is_default": 1})) + self.taxes_and_charges = frappe.db.get_value(tax_master_doctype, {"is_default": 1}) self.append_taxes_from_master(tax_master_doctype) @@ -608,7 +608,10 @@ def get_tax_rate(account_head): @frappe.whitelist() def get_default_taxes_and_charges(master_doctype): default_tax = frappe.db.get_value(master_doctype, {"is_default": 1}) - return get_taxes_and_charges(master_doctype, default_tax) + return { + 'taxes_and_charges': default_tax, + 'taxes': get_taxes_and_charges(master_doctype, default_tax) + } @frappe.whitelist() def get_taxes_and_charges(master_doctype, master_name): diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 970fd570ff..e9a7baa4bc 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -48,16 +48,16 @@ class Opportunity(TransactionBase): # check if customer is already created agains the self.contact_email customer = frappe.db.sql("""select distinct `tabDynamic Link`.link_name as customer - from + from `tabContact`, `tabDynamic Link` where `tabContact`.email_id='{0}' - and + and `tabContact`.name=`tabDynamic Link`.parent and - ifnull(`tabDynamic Link`.link_name, '')<>'' - and - `tabDynamic Link`.link_doctype='Customer' + ifnull(`tabDynamic Link`.link_name, '')<>'' + and + `tabDynamic Link`.link_doctype='Customer' """.format(self.contact_email), as_dict=True) if customer and customer[0].customer: self.customer = customer[0].customer @@ -118,9 +118,9 @@ class Opportunity(TransactionBase): def has_ordered_quotation(self): return frappe.db.sql(""" - select q.name + select q.name from `tabQuotation` q, `tabQuotation Item` qi - where q.name = qi.parent and q.docstatus=1 and qi.prevdoc_docname =%s + where q.name = qi.parent and q.docstatus=1 and qi.prevdoc_docname =%s and q.status = 'Ordered'""", self.name) def has_lost_quotation(self): @@ -233,8 +233,8 @@ def make_quotation(source_name, target_doc=None): # get default taxes taxes = get_default_taxes_and_charges("Sales Taxes and Charges Template") - if taxes: - quotation.extend("taxes", taxes) + if taxes.get('taxes'): + quotation.update(taxes) quotation.run_method("set_missing_values") quotation.run_method("calculate_taxes_and_totals") diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 41fdc6e646..b07d0902a3 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -231,8 +231,16 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ }, callback: function(r) { if(!r.exc) { - me.frm.set_value("taxes", r.message); - me.calculate_taxes_and_totals(); + frappe.run_serially([ + () => { + // directly set in doc, so as not to call triggers + me.frm.doc.taxes_and_charges = r.message.taxes_and_charges; + + // set taxes table + me.frm.set_value("taxes", r.message.taxes); + }, + () => me.calculate_taxes_and_totals() + ]); } } }); @@ -935,19 +943,27 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ return; } + if (me.in_apply_price_list == true) return; + + me.in_apply_price_list = true; return this.frm.call({ method: "erpnext.stock.get_item_details.apply_price_list", args: { args: args }, callback: function(r) { if (!r.exc) { - me.in_apply_price_list = true; - me.frm.set_value("price_list_currency", r.message.parent.price_list_currency); - me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate); - me.in_apply_price_list = false; + frappe.run_serially([ + () => me.frm.set_value("price_list_currency", r.message.parent.price_list_currency), + () => me.frm.set_value("plc_conversion_rate", r.message.parent.plc_conversion_rate), + () => { + if(args.items.length) { + me._set_values_for_item_list(r.message.children); + } + }, + () => { me.in_apply_price_list = false; } + ]); - if(args.items.length) { - me._set_values_for_item_list(r.message.children); - } + } else { + me.in_apply_price_list = false; } } }); @@ -1112,11 +1128,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ filters: {'item': item.item_code} } } else { - filters = { + let filters = { 'item_code': item.item_code, 'posting_date': me.frm.doc.posting_date || frappe.datetime.nowdate(), } - if(item.warehouse) filters["warehouse"] = item.warehouse + if (item.warehouse) filters["warehouse"] = item.warehouse return { query : "erpnext.controllers.queries.get_batch_no", From d8bc8de6cae684b0ed6174aeb38101d7a424234d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 14 Nov 2017 12:52:53 +0530 Subject: [PATCH 83/85] [minor] remove unnecessary description in upload attendance, fixes #10603 --- .../upload_attendance/upload_attendance.json | 76 +++++++++++++++++-- 1 file changed, 70 insertions(+), 6 deletions(-) diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.json b/erpnext/hr/doctype/upload_attendance/upload_attendance.json index 5a3f72a0ca..16b7a83173 100644 --- a/erpnext/hr/doctype/upload_attendance/upload_attendance.json +++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.json @@ -1,28 +1,39 @@ { "allow_copy": 1, + "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, + "beta": 0, "creation": "2013-01-25 11:34:53", "custom": 0, "docstatus": 0, "doctype": "DocType", + "editable_grid": 0, "fields": [ { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "description": "Download the Template, fill appropriate data and attach the modified file.\nAll dates and employee combination in the selected period will come in the template, with existing attendance records", + "columns": 0, + "description": "", "fieldname": "download_template", "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": "Download Template", + "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, @@ -30,22 +41,30 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "att_fr_date", "fieldtype": "Date", "hidden": 0, "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": "Attendance From Date", + "length": 0, "no_copy": 0, "oldfieldname": "attenadnce_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, @@ -53,20 +72,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "att_to_date", "fieldtype": "Date", "hidden": 0, "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": "Attendance To Date", + "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": 1, "search_index": 0, @@ -74,21 +101,29 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "get_template", "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 Template", + "length": 0, "no_copy": 0, "oldfieldtype": "Button", "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, @@ -96,20 +131,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "upload_attendance_data", "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": "Import Attendance", + "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, @@ -117,20 +160,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "upload_html", "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": "Upload HTML", + "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, @@ -138,20 +189,28 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "import_log", "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": "Import Log", + "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, @@ -159,17 +218,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 1, "icon": "fa fa-upload-alt", "idx": 1, + "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 1, "istable": 0, "max_attachments": 1, - "modified": "2015-06-05 11:37:04.348120", + "modified": "2017-11-14 12:51:34.980103", "modified_by": "Administrator", "module": "HR", "name": "Upload Attendance", @@ -216,6 +276,10 @@ "write": 1 } ], + "quick_entry": 0, "read_only": 0, - "read_only_onload": 0 + "read_only_onload": 0, + "show_name_in_global_search": 0, + "track_changes": 0, + "track_seen": 0 } \ No newline at end of file From 7d05a3470ca93b2eadd2df22999da303f4e9d2cd Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 14 Nov 2017 13:41:01 +0530 Subject: [PATCH 84/85] [fix] added pygithub dependancy (#11559) --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 0e81b1581d..0bfd3df0ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ frappe unidecode +pygithub From 0590d1da05c488b80ed63f0df2b2e2f6a1c835af Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 14 Nov 2017 14:28:37 +0600 Subject: [PATCH 85/85] bumped to version 9.2.11 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index eb3d0a77be..334af63671 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '9.2.10' +__version__ = '9.2.11' def get_default_company(user=None): '''Get default company for user'''