From 45826e0a887be6d95918ea90ef3e144cda59f4fe Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 28 Jul 2025 12:59:34 +0530 Subject: [PATCH] fix: added currency exchange rate settings --- .../__init__.py | 0 .../crm_currency_exchange_settings.js | 8 +++ .../crm_currency_exchange_settings.json | 54 +++++++++++++++++++ .../crm_currency_exchange_settings.py | 10 ++++ .../test_crm_currency_exchange_settings.py | 22 ++++++++ 5 files changed, 94 insertions(+) create mode 100644 crm/fcrm/doctype/crm_currency_exchange_settings/__init__.py create mode 100644 crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.js create mode 100644 crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.json create mode 100644 crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.py create mode 100644 crm/fcrm/doctype/crm_currency_exchange_settings/test_crm_currency_exchange_settings.py diff --git a/crm/fcrm/doctype/crm_currency_exchange_settings/__init__.py b/crm/fcrm/doctype/crm_currency_exchange_settings/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.js b/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.js new file mode 100644 index 00000000..bda41c07 --- /dev/null +++ b/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("CRM Currency Exchange Settings", { +// refresh(frm) { + +// }, +// }); diff --git a/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.json b/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.json new file mode 100644 index 00000000..2faeb78b --- /dev/null +++ b/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.json @@ -0,0 +1,54 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-07-28 12:29:02.935286", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "service_provider", + "access_key" + ], + "fields": [ + { + "default": "frankfurter.app", + "fieldname": "service_provider", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Service Provider", + "options": "frankfurter.app\nexchangerate.host", + "reqd": 1 + }, + { + "depends_on": "eval:doc.service_provider == 'exchangerate.host';", + "fieldname": "access_key", + "fieldtype": "Data", + "label": "Access Key", + "mandatory_depends_on": "eval:doc.service_provider == 'exchangerate.host';" + } + ], + "grid_page_length": 50, + "index_web_pages_for_search": 1, + "issingle": 1, + "links": [], + "modified": "2025-07-28 12:30:08.080590", + "modified_by": "Administrator", + "module": "FCRM", + "name": "CRM Currency Exchange Settings", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "row_format": "Dynamic", + "sort_field": "creation", + "sort_order": "DESC", + "states": [] +} diff --git a/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.py b/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.py new file mode 100644 index 00000000..aafc54e2 --- /dev/null +++ b/crm/fcrm/doctype/crm_currency_exchange_settings/crm_currency_exchange_settings.py @@ -0,0 +1,10 @@ +# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class CRMCurrencyExchangeSettings(Document): + pass + diff --git a/crm/fcrm/doctype/crm_currency_exchange_settings/test_crm_currency_exchange_settings.py b/crm/fcrm/doctype/crm_currency_exchange_settings/test_crm_currency_exchange_settings.py new file mode 100644 index 00000000..ec05d679 --- /dev/null +++ b/crm/fcrm/doctype/crm_currency_exchange_settings/test_crm_currency_exchange_settings.py @@ -0,0 +1,22 @@ +# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests import IntegrationTestCase + + +# On IntegrationTestCase, the doctype test records and all +# link-field test record dependencies are recursively loaded +# Use these module variables to add/remove to/from that list +EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] +IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"] + + + +class IntegrationTestCRMCurrencyExchangeSettings(IntegrationTestCase): + """ + Integration tests for CRMCurrencyExchangeSettings. + Use this class for testing interactions between multiple components. + """ + + pass