Merge pull request #533 from frappe/develop

This commit is contained in:
Shariq Ansari 2025-01-17 14:15:49 +05:30 committed by GitHub
commit 8edd743b69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 13 deletions

View File

@ -167,7 +167,7 @@ def get_doctype_fields_meta(DocField, doctype, allowed_fieldtypes, restricted_fi
DocField.options,
)
.where(DocField[parent] == doctype)
.where(DocField.hidden == False)
.where(DocField.hidden == False) # noqa: E712
.where(Criterion.any([DocField.fieldtype == i for i in allowed_fieldtypes]))
.where(Criterion.all([DocField.fieldname != i for i in restricted_fields]))
.run(as_dict=True)
@ -181,16 +181,17 @@ def get_quick_filters(doctype: str):
quick_filters = []
for field in fields:
if field.fieldtype == "Select":
field.options = field.options.split("\n")
field.options = [{"label": option, "value": option} for option in field.options]
field.options.insert(0, {"label": "", "value": ""})
options = field.options
if field.fieldtype == "Select" and options and isinstance(options, str):
options = options.split("\n")
options = [{"label": option, "value": option} for option in options]
options.insert(0, {"label": "", "value": ""})
quick_filters.append(
{
"label": _(field.label),
"name": field.fieldname,
"type": field.fieldtype,
"options": field.options,
"options": options,
}
)
@ -278,7 +279,7 @@ def get_data(
columns = frappe.parse_json(list_view_settings.columns)
rows = frappe.parse_json(list_view_settings.rows)
is_default = False
elif not custom_view or is_default and hasattr(_list, "default_list_data"):
elif not custom_view or (is_default and hasattr(_list, "default_list_data")):
rows = default_rows
columns = _list.default_list_data().get("columns")
@ -341,7 +342,7 @@ def get_data(
for kc in kanban_columns:
column_filters = {column_field: kc.get("name")}
order = kc.get("order")
if column_field in filters and filters.get(column_field) != kc.name or kc.get("delete"):
if (column_field in filters and filters.get(column_field) != kc.name) or kc.get("delete"):
column_data = []
else:
column_filters.update(filters.copy())

View File

@ -14,7 +14,7 @@
"@vueuse/core": "^10.3.0",
"@vueuse/integrations": "^10.3.0",
"feather-icons": "^4.28.0",
"frappe-ui": "^0.1.103",
"frappe-ui": "^0.1.104",
"gemoji": "^8.1.0",
"lodash": "^4.17.21",
"mime": "^4.0.1",

View File

@ -2388,10 +2388,10 @@ fraction.js@^4.3.7:
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==
frappe-ui@^0.1.103:
version "0.1.103"
resolved "https://registry.yarnpkg.com/frappe-ui/-/frappe-ui-0.1.103.tgz#b9423c9aebb3338c2128bdcb45e746381b417394"
integrity sha512-gQeZkm+vwxW5GMJoUmakk8dTGI4kKMkHtcZBvFinHmx28dlf8WqzbVlx0e6kJRSUXUB2K3Sn7HTGBMWZY3t45Q==
frappe-ui@^0.1.104:
version "0.1.104"
resolved "https://registry.yarnpkg.com/frappe-ui/-/frappe-ui-0.1.104.tgz#1ca8b303817d45cdccee9af9ef3597524e4eb0f2"
integrity sha512-rLgYwGKPChJHYBH6AIgsdN3ZPpT+N1K2UthRvKrPva0xLX9YAQS7xpiw5xVxwZXnpc1//EiXqOQcB7bb575wAg==
dependencies:
"@headlessui/vue" "^1.7.14"
"@popperjs/core" "^2.11.2"