From 36c553602f89801ad1a0958da702aecf45c2ffed Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 5 Aug 2014 17:40:23 +0530 Subject: [PATCH 1/3] [fix] Customize Form: allow changing 'Text' to 'Small Text' --- frappe/core/doctype/customize_form/customize_form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/customize_form/customize_form.py b/frappe/core/doctype/customize_form/customize_form.py index 583e050389..1291ad4ffb 100644 --- a/frappe/core/doctype/customize_form/customize_form.py +++ b/frappe/core/doctype/customize_form/customize_form.py @@ -45,7 +45,7 @@ class CustomizeForm(Document): } allowed_fieldtype_change = (('Currency', 'Float', 'Percent'), ('Small Text', 'Data'), - ('Text', 'Text Editor', 'Code'), ('Data', 'Select')) + ('Text', 'Text Editor', 'Code'), ('Data', 'Select'), ('Text', 'Small Text')) def on_update(self): frappe.db.sql("delete from tabSingles where doctype='Customize Form'") From 24ede53b50aa9dd12b8ef134574623b6d8ea5342 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 5 Aug 2014 17:55:58 +0530 Subject: [PATCH 2/3] [fix] Hide Currency Symbol --- frappe/utils/data.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 8e876e8919..9c2f3e7cd7 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -294,10 +294,9 @@ def fmt_money(amount, precision=None, currency=None): amount = comma_str.join(parts) + ((precision and decimal_str) and (decimal_str + decimals) or "") amount = minus + amount - if currency: - symbol = frappe.db.get_value("Currency", currency, "symbol") - if symbol: - amount = symbol + " " + amount + if currency and frappe.defaults.get_global_default("hide_currency_symbol") != "Yes": + symbol = frappe.db.get_value("Currency", currency, "symbol") or currency + amount = symbol + " " + amount return amount From 2acbdfe8c170593b039af956dce222cc3a66ce97 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 5 Aug 2014 18:00:51 +0530 Subject: [PATCH 3/3] Added Print Width description --- .../doctype/customize_form_field/customize_form_field.json | 3 ++- frappe/core/doctype/docfield/docfield.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/core/doctype/customize_form_field/customize_form_field.json b/frappe/core/doctype/customize_form_field/customize_form_field.json index 8d094d8f8f..00a368ee2b 100644 --- a/frappe/core/doctype/customize_form_field/customize_form_field.json +++ b/frappe/core/doctype/customize_form_field/customize_form_field.json @@ -90,6 +90,7 @@ "width": "50px" }, { + "description": "Print Width of the field, if the field is a column in a table", "fieldname": "print_width", "fieldtype": "Data", "label": "Print Width", @@ -227,7 +228,7 @@ "idx": 1, "issingle": 0, "istable": 1, - "modified": "2014-05-26 03:22:36.704849", + "modified": "2014-08-05 08:30:34.887505", "modified_by": "Administrator", "module": "Core", "name": "Customize Form Field", diff --git a/frappe/core/doctype/docfield/docfield.json b/frappe/core/doctype/docfield/docfield.json index b1296d4056..001ff5f121 100644 --- a/frappe/core/doctype/docfield/docfield.json +++ b/frappe/core/doctype/docfield/docfield.json @@ -259,6 +259,7 @@ "width": "50px" }, { + "description": "Print Width of the field, if the field is a column in a table", "fieldname": "print_width", "fieldtype": "Data", "label": "Print Width", @@ -304,7 +305,7 @@ "in_dialog": 1, "issingle": 0, "istable": 1, - "modified": "2014-06-20 05:42:29.975498", + "modified": "2014-08-05 08:29:06.769568", "modified_by": "Administrator", "module": "Core", "name": "DocField",