[fix] alter fieldtype for is_group from select to check
This commit is contained in:
parent
b814a54f2f
commit
6bc7b892c4
@ -290,4 +290,5 @@ erpnext.patches.v7_0.rename_advance_table_fields
|
||||
erpnext.patches.v7_0.rename_salary_components
|
||||
erpnext.patches.v7_0.rename_prevdoc_fields
|
||||
erpnext.patches.v7_0.rename_time_sheet_doctype
|
||||
execute:frappe.delete_doc_if_exists("Report", "Customers Not Buying Since Long Time")
|
||||
execute:frappe.delete_doc_if_exists("Report", "Customers Not Buying Since Long Time")
|
||||
erpnext.patches.v7_0.make_is_group_fieldtype_as_check
|
13
erpnext/patches/v7_0/make_is_group_fieldtype_as_check.py
Normal file
13
erpnext/patches/v7_0/make_is_group_fieldtype_as_check.py
Normal file
@ -0,0 +1,13 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
for doctype in ["Sales Person", "Customer Group", "Item Group", "Territory"]:
|
||||
|
||||
frappe.reload_doctype(doctype)
|
||||
|
||||
#In MySQL, you can't modify the same table which you use in the SELECT part.
|
||||
|
||||
frappe.db.sql(""" update `tab{doctype}` set is_group = 1
|
||||
where name in (select parent_{field} from (select distinct parent_{field} from `tab{doctype}`
|
||||
where parent_{field} != '') as dummy_table)
|
||||
""".format(doctype=doctype, field=doctype.strip().lower().replace(' ','_')), debug=1)
|
@ -62,7 +62,7 @@ $.extend(erpnext.queries, {
|
||||
},
|
||||
|
||||
not_a_group_filter: function() {
|
||||
return { filters: { is_group: "No" } };
|
||||
return { filters: { is_group: 0 } };
|
||||
},
|
||||
|
||||
employee: function() {
|
||||
|
@ -46,7 +46,7 @@ cur_frm.add_fetch('default_sales_partner','commission_rate','default_commission_
|
||||
|
||||
cur_frm.fields_dict['customer_group'].get_query = function(doc, dt, dn) {
|
||||
return{
|
||||
filters:{'is_group': 'No'}
|
||||
filters:{'is_group': 0}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
cur_frm.fields_dict['parent_customer_group'].get_query = function(doc,cdt,cdn) {
|
||||
return {
|
||||
filters: {
|
||||
'is_group': "Yes"
|
||||
'is_group': 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,13 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:customer_group_name",
|
||||
"beta": 0,
|
||||
"creation": "2013-01-10 16:34:23",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -17,6 +19,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Customer Group Name",
|
||||
@ -26,6 +29,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -42,6 +46,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Parent Customer Group",
|
||||
@ -52,6 +57,7 @@
|
||||
"options": "Customer Group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -65,19 +71,21 @@
|
||||
"collapsible": 0,
|
||||
"description": "Only leaf nodes are allowed in transaction",
|
||||
"fieldname": "is_group",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Has Child Node",
|
||||
"label": "Is Group",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "is_group",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nYes\nNo",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -93,12 +101,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -114,6 +124,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Price List",
|
||||
@ -122,6 +133,7 @@
|
||||
"options": "Price List",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -137,6 +149,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Credit Days Based On",
|
||||
@ -146,6 +159,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -162,6 +176,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Credit Days",
|
||||
@ -169,6 +184,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -184,6 +200,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Credit Limit",
|
||||
@ -191,6 +208,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -206,6 +224,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "lft",
|
||||
@ -215,6 +234,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@ -230,6 +250,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "rgt",
|
||||
@ -239,6 +260,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@ -255,6 +277,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "old_parent",
|
||||
@ -265,6 +288,7 @@
|
||||
"options": "Customer Group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@ -280,6 +304,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Receivable Account",
|
||||
@ -287,6 +312,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -304,6 +330,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Accounts",
|
||||
@ -312,6 +339,7 @@
|
||||
"options": "Party Account",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -324,13 +352,14 @@
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-sitemap",
|
||||
"idx": 1,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:44.374615",
|
||||
"modified": "2016-07-14 12:43:08.949307",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Customer Group",
|
||||
@ -457,7 +486,10 @@
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "parent_customer_group"
|
||||
"search_fields": "parent_customer_group",
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
@ -2,13 +2,13 @@
|
||||
{
|
||||
"customer_group_name": "_Test Customer Group",
|
||||
"doctype": "Customer Group",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_customer_group": "All Customer Groups"
|
||||
},
|
||||
{
|
||||
"customer_group_name": "_Test Customer Group 1",
|
||||
"doctype": "Customer Group",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_customer_group": "All Customer Groups"
|
||||
}
|
||||
]
|
||||
|
@ -9,7 +9,7 @@ frappe.ui.form.on("Item Group", {
|
||||
frm.fields_dict['parent_item_group'].get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
filters:[
|
||||
['Item Group', 'is_group', '=', 'Yes'],
|
||||
['Item Group', 'is_group', '=', 1],
|
||||
['Item Group', 'name', '!=', doc.item_group_name]
|
||||
]
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -95,18 +96,18 @@
|
||||
"collapsible": 0,
|
||||
"description": "Only leaf nodes are allowed in transaction",
|
||||
"fieldname": "is_group",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Has Child Node",
|
||||
"label": "Is Group",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "is_group",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nYes\nNo",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
@ -461,7 +462,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 3,
|
||||
"modified": "2016-06-23 14:44:46.228923",
|
||||
"modified": "2016-07-14 12:41:09.269478",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Item Group",
|
||||
|
@ -1,68 +1,68 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"item_group_name": "_Test Item Group",
|
||||
"parent_item_group": "All Item Groups",
|
||||
"default_cost_center": "_Test Cost Center 2 - _TC"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"item_group_name": "_Test Item Group Desktops",
|
||||
"parent_item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group A",
|
||||
"parent_item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group B",
|
||||
"parent_item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group B - 1",
|
||||
"parent_item_group": "_Test Item Group B"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group B - 2",
|
||||
"parent_item_group": "_Test Item Group B"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"item_group_name": "_Test Item Group B - 3",
|
||||
"parent_item_group": "_Test Item Group B"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group C",
|
||||
"parent_item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group C - 1",
|
||||
"parent_item_group": "_Test Item Group C"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group C - 2",
|
||||
"parent_item_group": "_Test Item Group C"
|
||||
},
|
||||
{
|
||||
"doctype": "Item Group",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"item_group_name": "_Test Item Group D",
|
||||
"parent_item_group": "All Item Groups"
|
||||
}
|
||||
|
@ -15,6 +15,6 @@ cur_frm.cscript.refresh = function(doc,dt,dn){
|
||||
|
||||
cur_frm.fields_dict['targets'].grid.get_field("item_group").get_query = function(doc, dt, dn) {
|
||||
return{
|
||||
filters:{ 'is_group': "No" }
|
||||
filters:{ 'is_group': 0 }
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
cur_frm.fields_dict['parent_sales_person'].get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters: [
|
||||
['Sales Person', 'is_group', '=', 'Yes'],
|
||||
['Sales Person', 'is_group', '=', 1],
|
||||
['Sales Person', 'name', '!=', doc.sales_person_name]
|
||||
]
|
||||
}
|
||||
|
@ -3,12 +3,14 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:sales_person_name",
|
||||
"beta": 0,
|
||||
"creation": "2013-01-10 16:34:24",
|
||||
"custom": 0,
|
||||
"description": "All Sales Transactions can be tagged against multiple **Sales Persons** so that you can set and monitor targets.",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -18,6 +20,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Name and Employee ID",
|
||||
@ -42,6 +45,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Sales Person Name",
|
||||
@ -68,6 +72,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Parent Sales Person",
|
||||
@ -91,17 +96,18 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "is_group",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Has Child Node",
|
||||
"label": "Is Group",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "is_group",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nYes\nNo",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
@ -120,6 +126,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -142,6 +149,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Employee",
|
||||
@ -166,6 +174,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "lft",
|
||||
@ -191,6 +200,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "rgt",
|
||||
@ -216,6 +226,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "old_parent",
|
||||
@ -242,6 +253,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Sales Person Targets",
|
||||
@ -267,6 +279,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Targets",
|
||||
@ -294,6 +307,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Target Distribution",
|
||||
@ -317,13 +331,14 @@
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-01-06 02:36:22.551330",
|
||||
"modified": "2016-07-14 12:44:43.408367",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Sales Person",
|
||||
@ -390,7 +405,10 @@
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "parent_sales_person"
|
||||
"search_fields": "parent_sales_person",
|
||||
"sort_order": "ASC",
|
||||
"track_seen": 0
|
||||
}
|
@ -5,7 +5,7 @@ frappe.treeview_settings["Sales Person"] = {
|
||||
{fieldtype:'Link', fieldname:'employee',
|
||||
label:__('Employee'), options:'Employee',
|
||||
description: __("Please enter Employee Id of this sales person")},
|
||||
{fieldtype:'Select', fieldname:'is_group', label:__('Group Node'), options:'No\nYes',
|
||||
{fieldtype:'Check', fieldname:'is_group', label:__('Group Node'),
|
||||
description: __("Further nodes can be only created under 'Group' type nodes")}
|
||||
],
|
||||
}
|
@ -2,21 +2,21 @@
|
||||
{
|
||||
"doctype": "Sales Person",
|
||||
"employee": "_T-Employee-0001",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_sales_person": "Sales Team",
|
||||
"sales_person_name": "_Test Sales Person"
|
||||
},
|
||||
{
|
||||
"doctype": "Sales Person",
|
||||
"employee": "_T-Employee-0002",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_sales_person": "Sales Team",
|
||||
"sales_person_name": "_Test Sales Person 1"
|
||||
},
|
||||
{
|
||||
"doctype": "Sales Person",
|
||||
"employee": "_T-Employee-0003",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_sales_person": "Sales Team",
|
||||
"sales_person_name": "_Test Sales Person 2"
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
cur_frm.fields_dict['parent_territory'].get_query = function(doc,cdt,cdn) {
|
||||
return{
|
||||
filters:[
|
||||
['Territory', 'is_group', '=', 'Yes'],
|
||||
['Territory', 'is_group', '=', 1],
|
||||
['Territory', 'name', '!=', doc.territory_name]
|
||||
]
|
||||
}
|
||||
|
@ -3,12 +3,14 @@
|
||||
"allow_import": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:territory_name",
|
||||
"beta": 0,
|
||||
"creation": "2013-01-10 16:34:24",
|
||||
"custom": 0,
|
||||
"description": "Classification of Customers by region",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"editable_grid": 0,
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -18,6 +20,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Territory Name",
|
||||
@ -27,6 +30,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -43,6 +47,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Parent Territory",
|
||||
@ -53,6 +58,7 @@
|
||||
"options": "Territory",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -66,19 +72,21 @@
|
||||
"collapsible": 0,
|
||||
"description": "Only leaf nodes are allowed in transaction",
|
||||
"fieldname": "is_group",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Has Child Node",
|
||||
"label": "Is Group",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "is_group",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nYes\nNo",
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -94,12 +102,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -116,6 +126,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Territory Manager",
|
||||
@ -126,6 +137,7 @@
|
||||
"options": "Sales Person",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -141,6 +153,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "lft",
|
||||
@ -150,6 +163,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -165,6 +179,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "rgt",
|
||||
@ -174,6 +189,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -190,6 +206,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "old_parent",
|
||||
@ -200,6 +217,7 @@
|
||||
"options": "Territory",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@ -216,6 +234,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Territory Targets",
|
||||
@ -224,6 +243,7 @@
|
||||
"oldfieldtype": "Section Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -239,6 +259,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Targets",
|
||||
@ -249,6 +270,7 @@
|
||||
"options": "Target Detail",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -265,6 +287,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Target Distribution",
|
||||
@ -275,6 +298,7 @@
|
||||
"options": "Monthly Distribution",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -287,13 +311,14 @@
|
||||
"hide_toolbar": 0,
|
||||
"icon": "icon-map-marker",
|
||||
"idx": 1,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"in_dialog": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:59.337250",
|
||||
"modified": "2016-07-14 12:43:36.619881",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Territory",
|
||||
@ -401,7 +426,10 @@
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "parent_territory,territory_manager"
|
||||
"search_fields": "parent_territory,territory_manager",
|
||||
"sort_order": "DESC",
|
||||
"track_seen": 0
|
||||
}
|
@ -1,31 +1,31 @@
|
||||
[
|
||||
{
|
||||
"doctype": "Territory",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_territory": "All Territories",
|
||||
"territory_name": "_Test Territory"
|
||||
},
|
||||
{
|
||||
"doctype": "Territory",
|
||||
"is_group": "Yes",
|
||||
"is_group": 1,
|
||||
"parent_territory": "All Territories",
|
||||
"territory_name": "_Test Territory India"
|
||||
},
|
||||
{
|
||||
"doctype": "Territory",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_territory": "_Test Territory India",
|
||||
"territory_name": "_Test Territory Maharashtra"
|
||||
},
|
||||
{
|
||||
"doctype": "Territory",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_territory": "All Territories",
|
||||
"territory_name": "_Test Territory Rest Of The World"
|
||||
},
|
||||
{
|
||||
"doctype": "Territory",
|
||||
"is_group": "No",
|
||||
"is_group": 0,
|
||||
"parent_territory": "All Territories",
|
||||
"territory_name": "_Test Territory United States"
|
||||
}
|
||||
|
@ -15,17 +15,17 @@ def install(country=None):
|
||||
|
||||
# item group
|
||||
{'doctype': 'Item Group', 'item_group_name': _('All Item Groups'),
|
||||
'is_group': 'Yes', 'parent_item_group': ''},
|
||||
'is_group': 1, 'parent_item_group': ''},
|
||||
{'doctype': 'Item Group', 'item_group_name': _('Products'),
|
||||
'is_group': 'No', 'parent_item_group': _('All Item Groups'), "show_in_website": 1 },
|
||||
'is_group': 0, 'parent_item_group': _('All Item Groups'), "show_in_website": 1 },
|
||||
{'doctype': 'Item Group', 'item_group_name': _('Raw Material'),
|
||||
'is_group': 'No', 'parent_item_group': _('All Item Groups') },
|
||||
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
||||
{'doctype': 'Item Group', 'item_group_name': _('Services'),
|
||||
'is_group': 'No', 'parent_item_group': _('All Item Groups') },
|
||||
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
||||
{'doctype': 'Item Group', 'item_group_name': _('Sub Assemblies'),
|
||||
'is_group': 'No', 'parent_item_group': _('All Item Groups') },
|
||||
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
||||
{'doctype': 'Item Group', 'item_group_name': _('Consumable'),
|
||||
'is_group': 'No', 'parent_item_group': _('All Item Groups') },
|
||||
'is_group': 0, 'parent_item_group': _('All Item Groups') },
|
||||
|
||||
# deduction type
|
||||
{'doctype': 'Deduction Type', 'name': _('Income Tax'), 'description': _('Income Tax'), 'deduction_name': _('Income Tax')},
|
||||
@ -95,14 +95,14 @@ def install(country=None):
|
||||
{'doctype': 'Designation', 'designation_name': _('Researcher')},
|
||||
|
||||
# territory
|
||||
{'doctype': 'Territory', 'territory_name': _('All Territories'), 'is_group': 'Yes', 'name': _('All Territories'), 'parent_territory': ''},
|
||||
{'doctype': 'Territory', 'territory_name': _('All Territories'), 'is_group': 1, 'name': _('All Territories'), 'parent_territory': ''},
|
||||
|
||||
# customer group
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('All Customer Groups'), 'is_group': 'Yes', 'name': _('All Customer Groups'), 'parent_customer_group': ''},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Individual'), 'is_group': 'No', 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Commercial'), 'is_group': 'No', 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Non Profit'), 'is_group': 'No', 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Government'), 'is_group': 'No', 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('All Customer Groups'), 'is_group': 1, 'name': _('All Customer Groups'), 'parent_customer_group': ''},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Individual'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Commercial'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Non Profit'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
||||
{'doctype': 'Customer Group', 'customer_group_name': _('Government'), 'is_group': 0, 'parent_customer_group': _('All Customer Groups')},
|
||||
|
||||
# supplier type
|
||||
{'doctype': 'Supplier Type', 'supplier_type': _('Services')},
|
||||
@ -114,7 +114,7 @@ def install(country=None):
|
||||
{'doctype': 'Supplier Type', 'supplier_type': _('Distributor')},
|
||||
|
||||
# Sales Person
|
||||
{'doctype': 'Sales Person', 'sales_person_name': _('Sales Team'), 'is_group': "Yes", "parent_sales_person": ""},
|
||||
{'doctype': 'Sales Person', 'sales_person_name': _('Sales Team'), 'is_group': 1, "parent_sales_person": ""},
|
||||
|
||||
# UOM
|
||||
{'uom_name': _('Unit'), 'doctype': 'UOM', 'name': _('Unit'), "must_be_whole_number": 1},
|
||||
|
@ -4,7 +4,7 @@ install_docs = [
|
||||
{"doctype":"Role", "role_name":"Item Manager", "name":"Item Manager"},
|
||||
{"doctype":"Role", "role_name":"Stock User", "name":"Stock User"},
|
||||
{"doctype":"Role", "role_name":"Quality Manager", "name":"Quality Manager"},
|
||||
{"doctype":"Item Group", "item_group_name":"All Item Groups", "is_group":"Yes"},
|
||||
{"doctype":"Item Group", "item_group_name":"All Item Groups", "is_group": 1},
|
||||
{"doctype":"Item Group", "item_group_name":"Default",
|
||||
"parent_item_group":"All Item Groups", "is_group":"No"},
|
||||
"parent_item_group":"All Item Groups", "is_group": 0},
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user