mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 15:38:39 +00:00
refactor: convert Hide Currency Symbol in Global Defaults to a Check field (#57135)
This commit is contained in:
@@ -261,6 +261,7 @@ erpnext.patches.v14_0.update_proprietorship_to_individual
|
||||
erpnext.patches.v15_0.rename_subcontracting_fields
|
||||
erpnext.patches.v15_0.unset_incorrect_additional_discount_percentage
|
||||
erpnext.patches.v16_0.convert_commission_rate_to_percent
|
||||
erpnext.patches.v16_0.convert_hide_currency_symbol_to_check
|
||||
|
||||
[post_model_sync]
|
||||
erpnext.patches.v15_0.rename_gross_purchase_amount_to_net_purchase_amount
|
||||
@@ -496,4 +497,4 @@ erpnext.patches.v16_0.backfill_pick_list_transferred_qty
|
||||
erpnext.patches.v16_0.create_shop_floor_roles
|
||||
erpnext.patches.v15_0.backfill_sla_link_filters_on_custom_field
|
||||
erpnext.patches.v15_0.backfill_sla_link_filters_on_docfield
|
||||
erpnext.patches.v16_0.crm_settings_handle_allowed_users_for_frappe_crm
|
||||
erpnext.patches.v16_0.crm_settings_handle_allowed_users_for_frappe_crm
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
# runs pre_model_sync: field is still a Select, so this returns the raw "Yes"/"No"
|
||||
old_value = frappe.db.get_single_value("Global Defaults", "hide_currency_symbol")
|
||||
new_value = 1 if old_value == "Yes" else 0
|
||||
frappe.db.set_single_value("Global Defaults", "hide_currency_symbol", new_value)
|
||||
frappe.db.set_default("hide_currency_symbol", new_value)
|
||||
@@ -55,12 +55,12 @@
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"description": "Do not show any symbol like $ etc next to currencies.",
|
||||
"fieldname": "hide_currency_symbol",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"label": "Hide Currency Symbol",
|
||||
"options": "\nNo\nYes"
|
||||
"label": "Hide Currency Symbol"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
@@ -121,7 +121,7 @@
|
||||
"in_create": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2026-07-14 15:18:25.829886",
|
||||
"modified": "2026-07-14 18:30:00.000000",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Global Defaults",
|
||||
|
||||
@@ -53,7 +53,7 @@ class GlobalDefaults(Document):
|
||||
disable_in_words: DF.Check
|
||||
disable_rounded_total: DF.Check
|
||||
enable_company_wise_masters: DF.Check
|
||||
hide_currency_symbol: DF.Literal["", "No", "Yes"]
|
||||
hide_currency_symbol: DF.Check
|
||||
use_posting_datetime_for_naming_documents: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
|
||||
Reference in New Issue
Block a user