Merge pull request #20353 from surajshetty3416/misc-fixes-15-03-2023

This commit is contained in:
Suraj Shetty 2023-03-16 10:57:12 +05:30 committed by GitHub
commit f7b22ea295
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -48,6 +48,7 @@ frappe.ui.form.on("DocType", {
true
);
} else if (frappe.boot.developer_mode) {
frm.dashboard.clear_comment();
let msg = __(
"This site is running in developer mode. Any change made here will be updated in code."
);

View file

@ -40,7 +40,7 @@ export default class GridRow {
render_row = this.render_row();
}
if (!this.render_row) return;
if (!render_row) return;
this.set_data();
this.wrapper.appendTo(this.parent);
@ -762,7 +762,8 @@ export default class GridRow {
show_search_row() {
// show or remove search columns based on grid rows
this.show_search = this.show_search && this.grid?.data?.length >= 20;
this.show_search =
this.show_search && (this.grid?.data?.length >= 20 || this.grid.filter_applied);
!this.show_search && this.wrapper.remove();
return this.show_search;
}

View file

@ -48,6 +48,8 @@ $.extend(frappe.model, {
// set title field / name as name
if (meta.autoname && meta.autoname.indexOf("field:") !== -1) {
doc[meta.autoname.substr(6)] = frappe.route_options.name_field;
} else if (meta.autoname && meta.autoname === "prompt") {
doc.__newname = frappe.route_options.name_field;
} else if (meta.title_field) {
doc[meta.title_field] = frappe.route_options.name_field;
}