[enhance] added Lead Source master, fixes #6231

This commit is contained in:
Rushabh Mehta
2016-09-16 11:37:38 +05:30
parent 769dda0874
commit 59dc0ece9f
14 changed files with 1575 additions and 1006 deletions

View File

@@ -7,6 +7,10 @@ import frappe
from frappe import _
default_lead_sources = ["Existing Customer", "Reference", "Advertisement",
"Cold Calling", "Exhibition", "Supplier Reference", "Mass Mailing",
"Customer's Vendor", "Campaign", "Walk In"]
def install(country=None):
records = [
@@ -147,6 +151,7 @@ def install(country=None):
{'doctype': 'Activity Type', 'activity_type': _('Execution')},
{'doctype': 'Activity Type', 'activity_type': _('Communication')},
# Lead Source
{'doctype': "Item Attribute", "attribute_name": _("Size"), "item_attribute_values": [
{"attribute_value": _("Extra Small"), "abbr": "XS"},
{"attribute_value": _("Small"), "abbr": "S"},
@@ -191,6 +196,8 @@ def install(country=None):
records += [{"doctype":"Industry Type", "industry": d} for d in get_industry_types()]
# records += [{"doctype":"Operation", "operation": d} for d in get_operations()]
records += [{'doctype': 'Lead Source', 'source_name': _(d)} for d in default_lead_sources]
from frappe.modules import scrub
for r in records:
doc = frappe.new_doc(r.get("doctype"))