Skip to content

Commit

Permalink
Merge pull request frappe#26272 from anupamvs/campaign-module
Browse files Browse the repository at this point in the history
fix: moving campaign from selling to CRM
  • Loading branch information
pateljannat authored Jul 27, 2021
2 parents 3ee61af + 6a89b9e commit 1ec7ccd
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 71 deletions.
Empty file.
17 changes: 17 additions & 0 deletions erpnext/crm/doctype/campaign/campaign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt

frappe.ui.form.on('Campaign', {
refresh: function(frm) {
erpnext.toggle_naming_series();

if (frm.doc.__islocal) {
frm.toggle_display("naming_series", frappe.boot.sysdefaults.campaign_naming_by=="Naming Series");
} else {
cur_frm.add_custom_button(__("View Leads"), function() {
frappe.route_options = {"source": "Campaign", "campaign_name": frm.doc.name};
frappe.set_route("List", "Lead");
}, "fa fa-list", true);
}
}
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"actions": [],
"allow_import": 1,
"allow_rename": 1,
"autoname": "naming_series:",
Expand Down Expand Up @@ -39,17 +40,9 @@
"set_only_once": 1
},
{
"fieldname": "description",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"width": "300px"
},
{
"fieldname": "description_section",
"fieldtype": "Section Break"
"fieldname": "campaign_schedules_section",
"fieldtype": "Section Break",
"label": "Campaign Schedules"
},
{
"fieldname": "campaign_schedules",
Expand All @@ -58,16 +51,25 @@
"options": "Campaign Email Schedule"
},
{
"fieldname": "campaign_schedules_section",
"fieldtype": "Section Break",
"label": "Campaign Schedules"
"fieldname": "description_section",
"fieldtype": "Section Break"
},
{
"fieldname": "description",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"width": "300px"
}
],
"icon": "fa fa-bullhorn",
"idx": 1,
"modified": "2019-07-22 12:03:39.832342",
"links": [],
"modified": "2021-06-30 18:05:06.412712",
"modified_by": "Administrator",
"module": "Selling",
"module": "CRM",
"name": "Campaign",
"owner": "Administrator",
"permissions": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# Copyright (c) 2021, 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
from frappe.model.naming import set_name_by_naming_series

Expand Down
8 changes: 8 additions & 0 deletions erpnext/crm/doctype/campaign/test_campaign.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt

# import frappe
import unittest

class TestCampaign(unittest.TestCase):
pass
1 change: 0 additions & 1 deletion erpnext/selling/doctype/campaign/README.md

This file was deleted.

1 change: 0 additions & 1 deletion erpnext/selling/doctype/campaign/__init__.py

This file was deleted.

15 changes: 0 additions & 15 deletions erpnext/selling/doctype/campaign/campaign.js

This file was deleted.

17 changes: 0 additions & 17 deletions erpnext/selling/doctype/campaign/campaign_dashboard.py

This file was deleted.

7 changes: 0 additions & 7 deletions erpnext/selling/doctype/campaign/test_campaign.py

This file was deleted.

10 changes: 0 additions & 10 deletions erpnext/selling/doctype/campaign/test_records.json

This file was deleted.

0 comments on commit 1ec7ccd

Please sign in to comment.