fix: sider issue

This commit is contained in:
Anupam 2021-07-27 16:49:04 +05:30
parent 03f7609a8b
commit f1c697ca75
3 changed files with 5 additions and 5 deletions

View File

@ -5,12 +5,11 @@ frappe.ui.form.on('Campaign', {
refresh: function(frm) {
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");
}
else {
} else {
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");
}, "fa fa-list", true);
}

View File

@ -3,6 +3,7 @@
import frappe
from frappe.model.document import Document
from frappe.model.naming import set_name_by_naming_series
class Campaign(Document):
def autoname(self):

View File

@ -1,7 +1,7 @@
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
# import frappe
import unittest
class TestCampaign(unittest.TestCase):