Skip to content

Commit

Permalink
Merge pull request frappe#28364 from frappe/misc-fixes
Browse files Browse the repository at this point in the history
fix: misc UI issues
  • Loading branch information
NagariaHussain authored Nov 4, 2024
2 parents 7e0f281 + 4657938 commit 4ed846d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frappe/core/doctype/doctype/doctype_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ frappe.listview_settings["DocType"] = {
let non_developer = frappe.session.user !== "Administrator" || !frappe.boot.developer_mode;
let fields = [
{
label: __("DocType Name"),
label: __("Name"),
fieldname: "name",
fieldtype: "Data",
reqd: 1,
Expand Down
12 changes: 10 additions & 2 deletions frappe/core/doctype/system_settings/system_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"language",
"column_break_3",
"time_zone",
"currency",
"enable_onboarding",
"setup_complete",
"disable_document_sharing",
Expand Down Expand Up @@ -684,12 +685,19 @@
"fieldname": "use_number_format_from_currency",
"fieldtype": "Check",
"label": "Use Number Format from Currency"
},
{
"description": "Default display currency",
"fieldname": "currency",
"fieldtype": "Link",
"label": "Currency",
"options": "Currency"
}
],
"icon": "fa fa-cog",
"issingle": 1,
"links": [],
"modified": "2024-09-26 16:20:59.417151",
"modified": "2024-11-04 15:51:39.954876",
"modified_by": "Administrator",
"module": "Core",
"name": "System Settings",
Expand All @@ -708,4 +716,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}
1 change: 1 addition & 0 deletions frappe/core/doctype/system_settings/system_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SystemSettings(Document):
bypass_2fa_for_retricted_ip_users: DF.Check
bypass_restrict_ip_check_if_2fa_enabled: DF.Check
country: DF.Link | None
currency: DF.Link | None
currency_precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
date_format: DF.Literal[
"yyyy-mm-dd", "dd-mm-yyyy", "dd/mm/yyyy", "dd.mm.yyyy", "mm/dd/yyyy", "mm-dd-yyyy"
Expand Down
1 change: 1 addition & 0 deletions frappe/desk/page/setup_wizard/setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def update_system_settings(args): # nosemgrep
"country": args.get("country"),
"language": get_language_code(args.get("language")) or "en",
"time_zone": args.get("timezone"),
"currency": args.get("currency"),
"float_precision": 3,
"rounding_method": "Banker's Rounding",
"date_format": frappe.db.get_value("Country", args.get("country"), "date_format"),
Expand Down
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/model/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ $.extend(frappe.meta, {
},

get_field_currency: function (df, doc) {
var currency = frappe.boot.sysdefaults.currency;
var currency = frappe.boot.sysdefaults.currency || "USD";
if (!doc && cur_frm) doc = cur_frm.doc;

if (df && df.options) {
Expand Down
1 change: 1 addition & 0 deletions frappe/public/scss/common/controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ select.form-control {
.control-label.reqd:after {
content: " *";
color: var(--red-400);
white-space: nowrap;
}
.help:empty {
display: none;
Expand Down

0 comments on commit 4ed846d

Please sign in to comment.