2021-12-06 08:22:00 +00:00
|
|
|
import frappe
|
|
|
|
|
|
|
|
|
|
|
|
def execute():
|
2022-03-28 13:22:46 +00:00
|
|
|
settings = frappe.db.get_value(
|
|
|
|
"Selling Settings",
|
|
|
|
"Selling Settings",
|
|
|
|
["campaign_naming_by", "close_opportunity_after_days", "default_valid_till"],
|
|
|
|
as_dict=True,
|
|
|
|
)
|
2021-12-06 08:22:00 +00:00
|
|
|
|
2022-03-28 13:22:46 +00:00
|
|
|
frappe.reload_doc("crm", "doctype", "crm_settings")
|
2022-01-31 07:48:05 +00:00
|
|
|
if settings:
|
2023-06-13 12:00:38 +00:00
|
|
|
frappe.db.set_single_value(
|
2022-03-28 13:22:46 +00:00
|
|
|
"CRM Settings",
|
|
|
|
{
|
|
|
|
"campaign_naming_by": settings.campaign_naming_by,
|
|
|
|
"close_opportunity_after_days": settings.close_opportunity_after_days,
|
|
|
|
"default_valid_till": settings.default_valid_till,
|
|
|
|
},
|
|
|
|
)
|