diff --git a/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py b/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py index 0cdbc2df..f22114f1 100644 --- a/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py +++ b/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py @@ -95,9 +95,7 @@ def create_forecasting_script(): def get_forecasting_script(): - return ( -""" -class CRMDeal { + return """class CRMDeal { async status() { await this.doc.trigger('updateProbability') } @@ -110,6 +108,4 @@ class CRMDeal { this.doc.probability = status.probability } -} -""" -) +}""" diff --git a/crm/install.py b/crm/install.py index 51166471..5ffa5a67 100644 --- a/crm/install.py +++ b/crm/install.py @@ -5,7 +5,6 @@ import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from crm.fcrm.doctype.crm_products.crm_products import create_product_details_script -from crm.fcrm.doctype.fcrm_settings.fcrm_settings import create_forecasting_script def before_install(): @@ -360,6 +359,8 @@ def add_standard_dropdown_items(): def add_default_scripts(): + from crm.fcrm.doctype.fcrm_settings.fcrm_settings import create_forecasting_script + for doctype in ["CRM Lead", "CRM Deal"]: create_product_details_script(doctype) create_forecasting_script()