fix: create territory doctype and added in lead/deal/organization
This commit is contained in:
parent
dd6464f6ac
commit
637c9dd0e2
@ -10,6 +10,7 @@
|
|||||||
"organization_tab",
|
"organization_tab",
|
||||||
"organization",
|
"organization",
|
||||||
"website",
|
"website",
|
||||||
|
"territory",
|
||||||
"annual_revenue",
|
"annual_revenue",
|
||||||
"close_date",
|
"close_date",
|
||||||
"probability",
|
"probability",
|
||||||
@ -208,11 +209,18 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Communication Status",
|
"label": "Communication Status",
|
||||||
"options": "CRM Communication Status"
|
"options": "CRM Communication Status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "organization.territory",
|
||||||
|
"fieldname": "territory",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Territory",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-12-28 11:40:16.934256",
|
"modified": "2024-01-04 18:58:55.295874",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Deal",
|
"name": "CRM Deal",
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
"details",
|
"details",
|
||||||
"organization",
|
"organization",
|
||||||
"website",
|
"website",
|
||||||
|
"territory",
|
||||||
"industry",
|
"industry",
|
||||||
"job_title",
|
"job_title",
|
||||||
"source",
|
"source",
|
||||||
@ -270,12 +271,19 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Communication Status",
|
"label": "Communication Status",
|
||||||
"options": "CRM Communication Status"
|
"options": "CRM Communication Status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "organization.territory",
|
||||||
|
"fieldname": "territory",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Territory",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-12-28 11:39:47.573673",
|
"modified": "2024-01-04 18:58:26.603817",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Lead",
|
"name": "CRM Lead",
|
||||||
|
|||||||
@ -9,10 +9,11 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"organization_name",
|
"organization_name",
|
||||||
"no_of_employees",
|
"no_of_employees",
|
||||||
|
"annual_revenue",
|
||||||
"organization_logo",
|
"organization_logo",
|
||||||
"column_break_pnpp",
|
"column_break_pnpp",
|
||||||
"website",
|
"website",
|
||||||
"annual_revenue",
|
"territory",
|
||||||
"industry"
|
"industry"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@ -53,12 +54,18 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"label": "Industry",
|
"label": "Industry",
|
||||||
"options": "CRM Industry"
|
"options": "CRM Industry"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "territory",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Territory",
|
||||||
|
"options": "CRM Territory"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"image_field": "organization_logo",
|
"image_field": "organization_logo",
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-11-23 13:11:37.301082",
|
"modified": "2024-01-04 18:57:52.519305",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "FCRM",
|
"module": "FCRM",
|
||||||
"name": "CRM Organization",
|
"name": "CRM Organization",
|
||||||
|
|||||||
0
crm/fcrm/doctype/crm_territory/__init__.py
Normal file
0
crm/fcrm/doctype/crm_territory/__init__.py
Normal file
8
crm/fcrm/doctype/crm_territory/crm_territory.js
Normal file
8
crm/fcrm/doctype/crm_territory/crm_territory.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
// frappe.ui.form.on("CRM Territory", {
|
||||||
|
// refresh(frm) {
|
||||||
|
|
||||||
|
// },
|
||||||
|
// });
|
||||||
113
crm/fcrm/doctype/crm_territory/crm_territory.json
Normal file
113
crm/fcrm/doctype/crm_territory/crm_territory.json
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"allow_rename": 1,
|
||||||
|
"creation": "2024-01-04 18:52:58.872535",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"territory_name",
|
||||||
|
"column_break_mckp",
|
||||||
|
"territory_manager",
|
||||||
|
"section_break_qhaf",
|
||||||
|
"old_parent",
|
||||||
|
"parent_crm_territory",
|
||||||
|
"is_group",
|
||||||
|
"column_break_pypy",
|
||||||
|
"lft",
|
||||||
|
"rgt"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "territory_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Territory Name",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "is_group",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Is Group"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_pypy",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "territory_manager",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Territory Manager",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "lft",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"hidden": 1,
|
||||||
|
"label": "Left",
|
||||||
|
"no_copy": 1,
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "rgt",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"hidden": 1,
|
||||||
|
"label": "Right",
|
||||||
|
"no_copy": 1,
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "is_group",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Is Group"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "old_parent",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Old Parent",
|
||||||
|
"options": "CRM Territory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "parent_crm_territory",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"ignore_user_permissions": 1,
|
||||||
|
"label": "Parent CRM Territory",
|
||||||
|
"options": "CRM Territory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_mckp",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_qhaf",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"is_tree": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2024-01-04 18:56:49.292276",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "FCRM",
|
||||||
|
"name": "CRM Territory",
|
||||||
|
"nsm_parent_field": "parent_crm_territory",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"states": []
|
||||||
|
}
|
||||||
9
crm/fcrm/doctype/crm_territory/crm_territory.py
Normal file
9
crm/fcrm/doctype/crm_territory/crm_territory.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
|
||||||
|
class CRMTerritory(Document):
|
||||||
|
pass
|
||||||
9
crm/fcrm/doctype/crm_territory/test_crm_territory.py
Normal file
9
crm/fcrm/doctype/crm_territory/test_crm_territory.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.tests.utils import FrappeTestCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestCRMTerritory(FrappeTestCase):
|
||||||
|
pass
|
||||||
Loading…
x
Reference in New Issue
Block a user