diff --git a/crm/fcrm/doctype/fcrm_settings/fcrm_settings.json b/crm/fcrm/doctype/fcrm_settings/fcrm_settings.json index e679b023..b140e109 100644 --- a/crm/fcrm/doctype/fcrm_settings/fcrm_settings.json +++ b/crm/fcrm/doctype/fcrm_settings/fcrm_settings.json @@ -8,6 +8,7 @@ "defaults_tab", "restore_defaults", "enable_forecasting", + "currency", "branding_tab", "brand_name", "brand_logo", @@ -64,12 +65,20 @@ "fieldname": "enable_forecasting", "fieldtype": "Check", "label": "Enable Forecasting" + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Currency", + "options": "Currency", + "reqd": 1 } ], "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2025-07-01 13:20:48.757603", + "modified": "2025-07-09 17:49:18.705465", "modified_by": "Administrator", "module": "FCRM", "name": "FCRM Settings", diff --git a/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py b/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py index 1460c265..0b4e2932 100644 --- a/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py +++ b/crm/fcrm/doctype/fcrm_settings/fcrm_settings.py @@ -17,6 +17,7 @@ class FCRMSettings(Document): def validate(self): self.do_not_allow_to_delete_if_standard() self.setup_forecasting() + self.make_currency_read_only() def do_not_allow_to_delete_if_standard(self): if not self.has_value_changed("dropdown_items"): @@ -60,6 +61,16 @@ class FCRMSettings(Document): "Check", ) + def make_currency_read_only(self): + if self.currency and self.has_value_changed("currency"): + make_property_setter( + "FCRM Settings", + "currency", + "read_only", + 1, + "Check", + ) + def get_standard_dropdown_items(): return [item.get("name1") for item in frappe.get_hooks("standard_dropdown_items")]