Merge pull request #751 from anandpdoshi/anand-august-5

Print and Customize
This commit is contained in:
Rushabh Mehta 2014-08-05 18:16:23 +05:30
commit bcfff5432e
4 changed files with 8 additions and 7 deletions

View file

@ -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'")

View file

@ -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",

View file

@ -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",

View file

@ -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