feat: init CES default values
This commit is contained in:
@@ -57,7 +57,13 @@ def set_single_defaults():
|
||||
pass
|
||||
except frappe.ValidationError:
|
||||
pass
|
||||
|
||||
ces = frappe.get_single('Currency Exchange Settings')
|
||||
ces.api_endpoint = "https://api.exchangerate.host/convert"
|
||||
ces.append('result_key', {'key': 'result'})
|
||||
ces.append('req_params', {'key': 'date', 'value': 'transaction_date'})
|
||||
ces.append('req_params', {'key': 'from', 'value': 'from_currency'})
|
||||
ces.append('req_params', {'key': 'to', 'value': 'to_currency'})
|
||||
ces.save()
|
||||
frappe.db.set_default("date_format", "dd-mm-yyyy")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user