From 2c53932522214637b7d5a38d90c63a51f546d0f6 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 6 Nov 2023 18:25:02 +0530 Subject: [PATCH] fix: created deal doctype --- crm/fcrm/doctype/crm_deal/__init__.py | 0 crm/fcrm/doctype/crm_deal/crm_deal.js | 8 ++ crm/fcrm/doctype/crm_deal/crm_deal.json | 123 +++++++++++++++++++++ crm/fcrm/doctype/crm_deal/crm_deal.py | 9 ++ crm/fcrm/doctype/crm_deal/test_crm_deal.py | 9 ++ 5 files changed, 149 insertions(+) create mode 100644 crm/fcrm/doctype/crm_deal/__init__.py create mode 100644 crm/fcrm/doctype/crm_deal/crm_deal.js create mode 100644 crm/fcrm/doctype/crm_deal/crm_deal.json create mode 100644 crm/fcrm/doctype/crm_deal/crm_deal.py create mode 100644 crm/fcrm/doctype/crm_deal/test_crm_deal.py diff --git a/crm/fcrm/doctype/crm_deal/__init__.py b/crm/fcrm/doctype/crm_deal/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.js b/crm/fcrm/doctype/crm_deal/crm_deal.js new file mode 100644 index 00000000..1b305ae0 --- /dev/null +++ b/crm/fcrm/doctype/crm_deal/crm_deal.js @@ -0,0 +1,8 @@ +// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("CRM Deal", { +// refresh(frm) { + +// }, +// }); diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.json b/crm/fcrm/doctype/crm_deal/crm_deal.json new file mode 100644 index 00000000..30f9e7c4 --- /dev/null +++ b/crm/fcrm/doctype/crm_deal/crm_deal.json @@ -0,0 +1,123 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "naming_series:", + "creation": "2023-11-06 17:56:25.210449", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "naming_series", + "organization", + "website", + "annual_revenue", + "column_break_afce", + "deal_owner", + "close_date", + "deal_status", + "probability", + "next_step", + "section_break_eepu", + "lead", + "column_break_bqvs" + ], + "fields": [ + { + "fieldname": "organization", + "fieldtype": "Link", + "label": "Organization", + "options": "CRM Organization" + }, + { + "fieldname": "probability", + "fieldtype": "Percent", + "label": "Probability" + }, + { + "fetch_from": "organization.annual_revenue", + "fieldname": "annual_revenue", + "fieldtype": "Int", + "label": "Annual Revenue" + }, + { + "fieldname": "column_break_afce", + "fieldtype": "Column Break" + }, + { + "fetch_from": "organization.website", + "fieldname": "website", + "fieldtype": "Data", + "label": "Website", + "options": "URL" + }, + { + "fieldname": "close_date", + "fieldtype": "Date", + "label": "Close Date" + }, + { + "fieldname": "next_step", + "fieldtype": "Data", + "label": "Next Step" + }, + { + "fieldname": "lead", + "fieldtype": "Link", + "label": "Lead", + "options": "CRM Lead" + }, + { + "fieldname": "section_break_eepu", + "fieldtype": "Section Break" + }, + { + "fieldname": "column_break_bqvs", + "fieldtype": "Column Break" + }, + { + "fieldname": "deal_owner", + "fieldtype": "Link", + "label": "Deal Owner", + "options": "User" + }, + { + "default": "Qualification", + "fieldname": "deal_status", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Deal Status", + "options": "Qualification\nDemo/Making\nProposal/Quotation\nNegotiation\nReady to Close\nWon\nLost", + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Naming Series", + "options": "CRM-DEAL-.YYYY.-" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2023-11-06 18:07:22.815164", + "modified_by": "Administrator", + "module": "FCRM", + "name": "CRM Deal", + "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": [] +} \ No newline at end of file diff --git a/crm/fcrm/doctype/crm_deal/crm_deal.py b/crm/fcrm/doctype/crm_deal/crm_deal.py new file mode 100644 index 00000000..f36b1cf9 --- /dev/null +++ b/crm/fcrm/doctype/crm_deal/crm_deal.py @@ -0,0 +1,9 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class CRMDeal(Document): + pass diff --git a/crm/fcrm/doctype/crm_deal/test_crm_deal.py b/crm/fcrm/doctype/crm_deal/test_crm_deal.py new file mode 100644 index 00000000..b9ecc378 --- /dev/null +++ b/crm/fcrm/doctype/crm_deal/test_crm_deal.py @@ -0,0 +1,9 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCRMDeal(FrappeTestCase): + pass