From 53a28eb39d1824a0f23379bb2c2b8976ec564002 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 27 Oct 2016 11:46:10 +0530 Subject: [PATCH 1/3] [Fix] No permission to read report Bank Clearance Summary for account user --- .../report/bank_clearance_summary/bank_clearance_summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py index d9bac3cb5b..1ec0abc3bf 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py @@ -16,7 +16,7 @@ def execute(filters=None): def get_columns(): return [ - _("Payment Document") + ":Link/DocType:130", + _("Payment Document") + "::130", _("Payment Entry") + ":Dynamic Link/"+_("Payment Document")+":110", _("Posting Date") + ":Date:100", _("Cheque/Reference No") + "::120", From 468e41f24f69a2efcd5a7b1978a85b4c27fde096 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 27 Oct 2016 15:23:04 +0530 Subject: [PATCH 2/3] [enhance] introduce ignore_fields param for _tree and get_query --- erpnext/accounts/doctype/account/account_tree.js | 13 ++++++++++++- .../doctype/cost_center/cost_center_tree.js | 1 + .../doctype/customer_group/customer_group_tree.js | 3 +++ erpnext/setup/doctype/item_group/item_group_tree.js | 3 +++ .../setup/doctype/sales_person/sales_person_tree.js | 1 + erpnext/setup/doctype/territory/territory_tree.js | 3 +++ erpnext/stock/doctype/warehouse/warehouse_tree.js | 1 + 7 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 erpnext/setup/doctype/customer_group/customer_group_tree.js create mode 100644 erpnext/setup/doctype/item_group/item_group_tree.js create mode 100644 erpnext/setup/doctype/territory/territory_tree.js diff --git a/erpnext/accounts/doctype/account/account_tree.js b/erpnext/accounts/doctype/account/account_tree.js index 8aee1ba362..e63c797184 100644 --- a/erpnext/accounts/doctype/account/account_tree.js +++ b/erpnext/accounts/doctype/account/account_tree.js @@ -1,3 +1,5 @@ +frappe.provide("frappe.treeview_settings") + frappe.treeview_settings["Account"] = { breadcrumbs: "Accounts", title: __("Chart Of Accounts"), @@ -33,10 +35,19 @@ frappe.treeview_settings["Account"] = { {fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate'), depends_on: 'eval:doc.is_group==1&&doc.account_type=="Tax"'}, {fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse", - depends_on: 'eval:(!doc.is_group&&doc.account_type=="Warehouse")'}, + depends_on: 'eval:(!doc.is_group&&doc.account_type=="Stock")', + get_query: function() { + return { + filters:{ + "company": frappe.treeview_settings.filters["company"] + } + } + } + }, {fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency", description: __("Optional. Sets company's default currency, if not specified.")} ], + ignore_fields:["parent_account"], onrender: function(node) { var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr"; if (node.data && node.data.balance!==undefined) { diff --git a/erpnext/accounts/doctype/cost_center/cost_center_tree.js b/erpnext/accounts/doctype/cost_center/cost_center_tree.js index 8c049d00ac..6eab34f9c3 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center_tree.js +++ b/erpnext/accounts/doctype/cost_center/cost_center_tree.js @@ -23,4 +23,5 @@ frappe.treeview_settings["Cost Center"] = { {fieldtype:'Check', fieldname:'is_group', label:__('Is Group'), description:__('Further cost centers can be made under Groups but entries can be made against non-Groups')} ], + ignore_fields:["parent_cost_center"] } \ No newline at end of file diff --git a/erpnext/setup/doctype/customer_group/customer_group_tree.js b/erpnext/setup/doctype/customer_group/customer_group_tree.js new file mode 100644 index 0000000000..b52c79c497 --- /dev/null +++ b/erpnext/setup/doctype/customer_group/customer_group_tree.js @@ -0,0 +1,3 @@ +frappe.treeview_settings["Customer Group"] = { + ignore_fields:["parent_customer_group"] +} \ No newline at end of file diff --git a/erpnext/setup/doctype/item_group/item_group_tree.js b/erpnext/setup/doctype/item_group/item_group_tree.js new file mode 100644 index 0000000000..57afe02d79 --- /dev/null +++ b/erpnext/setup/doctype/item_group/item_group_tree.js @@ -0,0 +1,3 @@ +frappe.treeview_settings["Item Group"] = { + ignore_fields:["parent_item_group"] +} \ No newline at end of file diff --git a/erpnext/setup/doctype/sales_person/sales_person_tree.js b/erpnext/setup/doctype/sales_person/sales_person_tree.js index 38d447881b..bcdfac926c 100644 --- a/erpnext/setup/doctype/sales_person/sales_person_tree.js +++ b/erpnext/setup/doctype/sales_person/sales_person_tree.js @@ -1,3 +1,4 @@ + frappe.treeview_settings["Sales Person"] = { fields: [ {fieldtype:'Data', fieldname: 'sales_person_name', diff --git a/erpnext/setup/doctype/territory/territory_tree.js b/erpnext/setup/doctype/territory/territory_tree.js new file mode 100644 index 0000000000..edd11dfa69 --- /dev/null +++ b/erpnext/setup/doctype/territory/territory_tree.js @@ -0,0 +1,3 @@ +frappe.treeview_settings["Territory"] = { + ignore_fields:["parent_territory"] +} \ No newline at end of file diff --git a/erpnext/stock/doctype/warehouse/warehouse_tree.js b/erpnext/stock/doctype/warehouse/warehouse_tree.js index 0b8106bbc7..b0c0cbd6bd 100644 --- a/erpnext/stock/doctype/warehouse/warehouse_tree.js +++ b/erpnext/stock/doctype/warehouse/warehouse_tree.js @@ -16,6 +16,7 @@ frappe.treeview_settings['Warehouse'] = { {fieldtype:'Check', fieldname:'is_group', label:__('Is Group'), description: __("Child nodes can be only created under 'Group' type nodes")} ], + ignore_fields:["parent_warehouse"], onrender: function(node) { if (node.data && node.data.balance!==undefined) { $('' From 9dcb778f174d30906815cb5d809f9bfbeb08021f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 27 Oct 2016 19:44:54 +0600 Subject: [PATCH 3/3] bumped to version 7.1.1 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index eb83f4c5b4..fc52f5ac41 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals import frappe -__version__ = '7.1.0' +__version__ = '7.1.1' def get_default_company(user=None): '''Get default company for user'''