mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Merge pull request #31818 from frappe/mergify/bp/version-14-hotfix/pr-31816
fix: limited options for no-of-employees in the crm documents (backport #31816)
This commit is contained in:
@@ -340,8 +340,8 @@
|
|||||||
"fieldname": "no_of_employees",
|
"fieldname": "no_of_employees",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "No of Employees",
|
"label": "No of Employees",
|
||||||
"options": "1-10\n11-20\n21-30\n31-100\n11-50\n51-200\n201-500\n101-500\n500-1000\n501-1000\n>1000\n1000+"
|
"options": "1-10\n11-50\n51-200\n201-500\n501-1000\n1000+"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_22",
|
"fieldname": "column_break_22",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
@@ -514,7 +514,7 @@
|
|||||||
"idx": 5,
|
"idx": 5,
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-07-22 15:55:03.176094",
|
"modified": "2022-08-09 18:26:17.101521",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Lead",
|
"name": "Lead",
|
||||||
|
|||||||
@@ -463,7 +463,7 @@
|
|||||||
"fieldname": "no_of_employees",
|
"fieldname": "no_of_employees",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "No of Employees",
|
"label": "No of Employees",
|
||||||
"options": "1-10\n11-20\n21-30\n31-100\n11-50\n51-200\n201-500\n101-500\n500-1000\n501-1000\n>1000\n1000+"
|
"options": "1-10\n11-50\n51-200\n201-500\n501-1000\n1000+"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "annual_revenue",
|
"fieldname": "annual_revenue",
|
||||||
@@ -622,7 +622,7 @@
|
|||||||
"icon": "fa fa-info-sign",
|
"icon": "fa fa-info-sign",
|
||||||
"idx": 195,
|
"idx": 195,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-07-22 18:46:32.858696",
|
"modified": "2022-08-09 18:26:37.235964",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Opportunity",
|
"name": "Opportunity",
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
"fieldname": "no_of_employees",
|
"fieldname": "no_of_employees",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"label": "No. of Employees",
|
"label": "No. of Employees",
|
||||||
"options": "1-10\n11-20\n21-30\n31-100\n11-50\n51-200\n201-500\n101-500\n500-1000\n501-1000\n>1000\n1000+"
|
"options": "1-10\n11-50\n51-200\n201-500\n501-1000\n1000+"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "annual_revenue",
|
"fieldname": "annual_revenue",
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-06-22 15:10:26.887502",
|
"modified": "2022-08-09 18:26:56.950185",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Prospect",
|
"name": "Prospect",
|
||||||
|
|||||||
@@ -310,4 +310,5 @@ erpnext.patches.v14_0.crm_ux_cleanup
|
|||||||
erpnext.patches.v14_0.remove_india_localisation # 14-07-2022
|
erpnext.patches.v14_0.remove_india_localisation # 14-07-2022
|
||||||
erpnext.patches.v13_0.fix_number_and_frequency_for_monthly_depreciation
|
erpnext.patches.v13_0.fix_number_and_frequency_for_monthly_depreciation
|
||||||
erpnext.patches.v14_0.remove_hr_and_payroll_modules # 20-07-2022
|
erpnext.patches.v14_0.remove_hr_and_payroll_modules # 20-07-2022
|
||||||
erpnext.patches.v14_0.create_accounting_dimensions_in_subcontracting_doctypes
|
erpnext.patches.v14_0.fix_crm_no_of_employees
|
||||||
|
erpnext.patches.v14_0.create_accounting_dimensions_in_subcontracting_doctypes
|
||||||
|
|||||||
26
erpnext/patches/v14_0/fix_crm_no_of_employees.py
Normal file
26
erpnext/patches/v14_0/fix_crm_no_of_employees.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
options = {
|
||||||
|
"11-20": "11-50",
|
||||||
|
"21-30": "11-50",
|
||||||
|
"31-100": "51-200",
|
||||||
|
"101-500": "201-500",
|
||||||
|
"500-1000": "501-1000",
|
||||||
|
">1000": "1000+",
|
||||||
|
}
|
||||||
|
|
||||||
|
for doctype in ("Lead", "Opportunity", "Prospect"):
|
||||||
|
frappe.reload_doctype(doctype)
|
||||||
|
for key, value in options.items():
|
||||||
|
frappe.db.sql(
|
||||||
|
"""
|
||||||
|
update `tab{doctype}`
|
||||||
|
set no_of_employees = %s
|
||||||
|
where no_of_employees = %s
|
||||||
|
""".format(
|
||||||
|
doctype=doctype
|
||||||
|
),
|
||||||
|
(value, key),
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user