Skip to content

Commit f75c7ee

Browse files
committed
Merge branch 'staging' into production
2 parents e8608ea + 7aab853 commit f75c7ee

32 files changed

Lines changed: 747 additions & 474 deletions

File tree

frappe/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
sys.setdefaultencoding("utf-8")
2525

2626
__frappe_version__ = '12.8.1'
27-
__version__ = '2.2.0'
27+
__version__ = '2.2.1'
2828
__title__ = "Frappe Framework"
2929

3030
local = Local()

frappe/core/doctype/docfield/docfield.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"label": "Type",
8282
"oldfieldname": "fieldtype",
8383
"oldfieldtype": "Select",
84-
"options": "Attach\nAttach Image\nBarcode\nButton\nCheck\nCode\nColor\nColumn Break\nCurrency\nData\nDate\nDatetime\nDynamic Link\nFloat\nFold\nGeolocation\nHeading\nHTML\nHTML Editor\nImage\nInt\nLink\nLong Text\nMarkdown Editor\nPassword\nPercent\nRead Only\nRating\nSection Break\nSelect\nSmall Text\nTable\nTable MultiSelect\nText\nText Editor\nTime\nSignature",
84+
"options": "Attach\nAttach Image\nBarcode\nButton\nCheck\nCode\nColor\nColumn Break\nCurrency\nData\nDate\nDatetime\nDynamic Link\nFloat\nFold\nGeolocation\nHeading\nHTML\nHTML Editor\nImage\nInt\nLink\nLong Text\nMarkdown Editor\nPassword\nPercent\nRead Only\nRating\nSection Break\nSelect\nSmall Text\nTable\nTable MultiSelect\nText\nText Editor\nText Editor Alt\nTime\nSignature",
8585
"reqd": 1,
8686
"search_index": 1
8787
},
@@ -425,7 +425,7 @@
425425
],
426426
"idx": 1,
427427
"istable": 1,
428-
"modified": "2020-03-17 21:29:59.983533",
428+
"modified": "2021-04-15 23:05:58.400774",
429429
"modified_by": "Administrator",
430430
"module": "Core",
431431
"name": "DocField",

frappe/core/doctype/doctype/doctype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ def check_unique_and_text(docname, d):
799799
if has_non_unique_values and has_non_unique_values[0][0]:
800800
frappe.throw(_("{0}: Field '{1}' cannot be set as Unique as it has non-unique values").format(docname, d.label), NonUniqueError)
801801

802-
if d.search_index and d.fieldtype in ("Text", "Long Text", "Small Text", "Code", "Text Editor"):
802+
if d.search_index and d.fieldtype in ("Text", "Long Text", "Small Text", "Code", "Text Editor", "Text Editor Alt"):
803803
frappe.throw(_("{0}:Fieldtype {1} for {2} cannot be indexed").format(docname, d.fieldtype, d.label), CannotIndexedError)
804804

805805

frappe/custom/doctype/custom_field/custom_field.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"label": "Field Type",
113113
"oldfieldname": "fieldtype",
114114
"oldfieldtype": "Select",
115-
"options": "Attach\nAttach Image\nBarcode\nButton\nCheck\nCode\nColor\nColumn Break\nCurrency\nData\nDate\nDatetime\nDynamic Link\nFloat\nGeolocation\nHTML\nHTML Editor\nImage\nInt\nLink\nLong Text\nMarkdown Editor\nPassword\nPercent\nRating\nRead Only\nSection Break\nSelect\nSmall Text\nTable\nTable MultiSelect\nText\nText Editor\nTime\nSignature",
115+
"options": "Attach\nAttach Image\nBarcode\nButton\nCheck\nCode\nColor\nColumn Break\nCurrency\nData\nDate\nDatetime\nDynamic Link\nFloat\nGeolocation\nHTML\nHTML Editor\nImage\nInt\nLink\nLong Text\nMarkdown Editor\nPassword\nPercent\nRating\nRead Only\nSection Break\nSelect\nSmall Text\nTable\nTable MultiSelect\nText\nText Editor\nText Editor Alt\nTime\nSignature",
116116
"reqd": 1
117117
},
118118
{
@@ -360,7 +360,7 @@
360360
],
361361
"icon": "fa fa-glass",
362362
"idx": 1,
363-
"modified": "2021-01-15 21:30:18.102333",
363+
"modified": "2021-04-21 04:10:16.193767",
364364
"modified_by": "Administrator",
365365
"module": "Custom",
366366
"name": "Custom Field",
@@ -393,4 +393,4 @@
393393
"sort_field": "modified",
394394
"sort_order": "ASC",
395395
"track_changes": 1
396-
}
396+
}

frappe/custom/doctype/customize_form/customize_form.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
}
7878

7979
allowed_fieldtype_change = (('Currency', 'Float', 'Percent'), ('Small Text', 'Data'),
80-
('Text', 'Data'), ('Text', 'Text Editor', 'Code', 'Signature', 'HTML Editor'), ('Data', 'Select'),
80+
('Text', 'Data'), ('Text', 'Text Editor', 'Text Editor Alt', 'Code', 'Signature', 'HTML Editor'), ('Data', 'Select'),
8181
('Text', 'Small Text'), ('Text', 'Data', 'Barcode'), ('Code', 'Geolocation'), ('Table', 'Table MultiSelect'))
8282

8383
allowed_fieldtype_for_options_change = ('Read Only', 'HTML', 'Select', 'Data')

frappe/custom/doctype/customize_form_field/customize_form_field.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"label": "Type",
7373
"oldfieldname": "fieldtype",
7474
"oldfieldtype": "Select",
75-
"options": "Attach\nAttach Image\nBarcode\nButton\nCheck\nCode\nColor\nColumn Break\nCurrency\nData\nDate\nDatetime\nDynamic Link\nFloat\nFold\nGeolocation\nHeading\nHTML\nHTML Editor\nImage\nInt\nLink\nLong Text\nMarkdown Editor\nPassword\nPercent\nRating\nRead Only\nSection Break\nSelect\nSignature\nSmall Text\nTable\nTable MultiSelect\nText\nText Editor\nTime",
75+
"options": "Attach\nAttach Image\nBarcode\nButton\nCheck\nCode\nColor\nColumn Break\nCurrency\nData\nDate\nDatetime\nDynamic Link\nFloat\nFold\nGeolocation\nHeading\nHTML\nHTML Editor\nImage\nInt\nLink\nLong Text\nMarkdown Editor\nPassword\nPercent\nRating\nRead Only\nSection Break\nSelect\nSignature\nSmall Text\nTable\nTable MultiSelect\nText\nText Editor\nText Editor Alt\nTime",
7676
"reqd": 1,
7777
"search_index": 1
7878
},
@@ -358,7 +358,7 @@
358358
],
359359
"idx": 1,
360360
"istable": 1,
361-
"modified": "2020-03-17 21:31:35.714416",
361+
"modified": "2021-04-21 04:10:35.722929",
362362
"modified_by": "Administrator",
363363
"module": "Custom",
364364
"name": "Customize Form Field",

frappe/database/mariadb/database.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def setup_type_map(self):
3737
'Long Text': ('longtext', ''),
3838
'Code': ('longtext', ''),
3939
'Text Editor': ('longtext', ''),
40+
'Text Editor Alt': ('longtext', ''),
4041
'Markdown Editor': ('longtext', ''),
4142
'HTML Editor': ('longtext', ''),
4243
'Date': ('date', ''),

frappe/database/postgres/database.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def setup_type_map(self):
4242
'Long Text': ('text', ''),
4343
'Code': ('text', ''),
4444
'Text Editor': ('text', ''),
45+
'Text Editor Alt': ('text', ''),
4546
'Markdown Editor': ('text', ''),
4647
'HTML Editor': ('text', ''),
4748
'Date': ('date', ''),

frappe/desk/doctype/number_card/number_card.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from frappe.model.naming import append_number_if_name_exists
1010
from frappe.modules.export_file import export_to_files
1111
from frappe.utils.safe_exec import safe_exec
12+
from six import string_types
1213

1314
class NumberCard(Document):
1415
def autoname(self):
@@ -58,7 +59,7 @@ def has_permission(doc, ptype, user):
5859

5960
@frappe.whitelist()
6061
def get_result(doc, filters, to_date=None):
61-
number_card = frappe._dict(frappe.parse_json(doc))
62+
number_card = frappe._dict(frappe.parse_json(doc)) if isinstance(doc, string_types) else doc
6263

6364
# For Servcer Script Enabled Number Cards
6465
if number_card.type == "Script" and number_card.script:
@@ -200,4 +201,4 @@ def add_card_to_dashboard(args):
200201
card.save()
201202

202203
dashboard.append('cards', dashboard_link)
203-
dashboard.save()
204+
dashboard.save()

0 commit comments

Comments
 (0)