mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: sider issue
This commit is contained in:
@@ -5,12 +5,11 @@ frappe.ui.form.on('Campaign', {
|
|||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
erpnext.toggle_naming_series();
|
erpnext.toggle_naming_series();
|
||||||
|
|
||||||
if(frm.doc.__islocal) {
|
if (frm.doc.__islocal) {
|
||||||
frm.toggle_display("naming_series", frappe.boot.sysdefaults.campaign_naming_by=="Naming Series");
|
frm.toggle_display("naming_series", frappe.boot.sysdefaults.campaign_naming_by=="Naming Series");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
cur_frm.add_custom_button(__("View Leads"), function() {
|
cur_frm.add_custom_button(__("View Leads"), function() {
|
||||||
frappe.route_options = {"source": "Campaign","campaign_name": frm.doc.name}
|
frappe.route_options = {"source": "Campaign", "campaign_name": frm.doc.name};
|
||||||
frappe.set_route("List", "Lead");
|
frappe.set_route("List", "Lead");
|
||||||
}, "fa fa-list", true);
|
}, "fa fa-list", true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
|
|
||||||
class Campaign(Document):
|
class Campaign(Document):
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
|
|
||||||
import frappe
|
# import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestCampaign(unittest.TestCase):
|
class TestCampaign(unittest.TestCase):
|
||||||
|
|||||||
Reference in New Issue
Block a user