Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns
This commit is contained in:
commit
9b8ce03f39
10 changed files with 48 additions and 20 deletions
|
|
@ -61,12 +61,18 @@ context('Control Link', () => {
|
|||
|
||||
cy.server();
|
||||
cy.route('GET', '/api/method/frappe.desk.form.utils.validate_link*').as('validate_link');
|
||||
cy.route('POST', '/api/method/frappe.desk.search.search_link').as('search_link');
|
||||
|
||||
cy.get('@todos').then(todos => {
|
||||
cy.get('.frappe-control[data-fieldname=link] input').type(todos[0]).blur();
|
||||
cy.get('.frappe-control[data-fieldname=link] input').as('input');
|
||||
cy.get('@input').focus();
|
||||
cy.wait('@search_link');
|
||||
cy.get('@input').type(todos[0]).blur();
|
||||
cy.wait('@validate_link');
|
||||
cy.get('.frappe-control[data-fieldname=link] input').focus();
|
||||
cy.get('.frappe-control[data-fieldname=link] .link-btn').click();
|
||||
cy.get('@input').focus();
|
||||
cy.get('.frappe-control[data-fieldname=link] .link-btn')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.location('hash').should('eq', `#Form/ToDo/${todos[0]}`);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ class EmailServer:
|
|||
"Connection timed out",
|
||||
)
|
||||
for message in messages:
|
||||
if message in strip(cstr(e.message)) or message in strip(cstr(getattr(e, 'strerror', ''))):
|
||||
if message in strip(cstr(e)) or message in strip(cstr(getattr(e, 'strerror', ''))):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -242,7 +242,6 @@ class RazorpaySettings(Document):
|
|||
|
||||
redirect_to = data.get('redirect_to') or None
|
||||
redirect_message = data.get('redirect_message') or None
|
||||
|
||||
if self.flags.status_changed_to in ("Authorized", "Verified", "Completed"):
|
||||
if self.data.reference_doctype and self.data.reference_docname:
|
||||
custom_redirect_to = None
|
||||
|
|
|
|||
|
|
@ -136,11 +136,7 @@ frappe.Application = Class.extend({
|
|||
method: 'frappe.core.page.background_jobs.background_jobs.get_scheduler_status',
|
||||
callback: function(r) {
|
||||
if (r.message[0] == __("Inactive")) {
|
||||
frappe.msgprint({
|
||||
title: __("Scheduler Inactive"),
|
||||
indicator: "red",
|
||||
message: __("Background jobs are not running. Please contact Administrator")
|
||||
});
|
||||
frappe.call('frappe.utils.scheduler.activate_scheduler');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -367,6 +367,13 @@ export default {
|
|||
if (this.on_success) {
|
||||
this.on_success(file_doc, r);
|
||||
}
|
||||
} else if (xhr.status === 403) {
|
||||
let response = JSON.parse(xhr.responseText);
|
||||
frappe.msgprint({
|
||||
title: __('Not permitted'),
|
||||
indicator: 'red',
|
||||
message: response._error_message
|
||||
});
|
||||
} else {
|
||||
file.failed = true;
|
||||
let error = null;
|
||||
|
|
|
|||
|
|
@ -1099,10 +1099,21 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
});
|
||||
this.toggle_result_area();
|
||||
this.render_list();
|
||||
if (this.$checks.length) {
|
||||
this.set_rows_as_checked();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
set_rows_as_checked() {
|
||||
$.each(this.$checks, (i, el) => {
|
||||
let docname = $(el).attr('data-name');
|
||||
this.$result.find(`.list-row-checkbox[data-name='${docname}']`).prop('checked', true);
|
||||
});
|
||||
this.on_row_checked();
|
||||
}
|
||||
|
||||
on_row_checked() {
|
||||
this.$list_head_subject = this.$list_head_subject || this.$result.find('header .list-header-subject');
|
||||
this.$checkbox_actions = this.$checkbox_actions || this.$result.find('header .checkbox-actions');
|
||||
|
|
|
|||
|
|
@ -975,12 +975,15 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
return this.data[index];
|
||||
}
|
||||
}).filter(Boolean);
|
||||
let totalRow = this.datatable.bodyRenderer.getTotalRow().reduce((row, cell) => {
|
||||
row[cell.column.id] = cell.content;
|
||||
return row;
|
||||
}, {});
|
||||
|
||||
rows.push(totalRow);
|
||||
if (this.raw_data.add_total_row) {
|
||||
let totalRow = this.datatable.bodyRenderer.getTotalRow().reduce((row, cell) => {
|
||||
row[cell.column.id] = cell.content;
|
||||
return row;
|
||||
}, {});
|
||||
|
||||
rows.push(totalRow);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -500,10 +500,9 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
|
|||
axisOptions: {
|
||||
shortenYAxisNumbers: 1
|
||||
},
|
||||
|
||||
format_tooltip_x: value => value.doc.name,
|
||||
format_tooltip_y:
|
||||
value => frappe.format(value, get_df(value.field), { always_show_decimals: true, inline: true }, get_doc(value.doc))
|
||||
tooltipOptions: {
|
||||
formatTooltipY: value => frappe.format(value, get_df(this.chart_args.y_axes[0]), { always_show_decimals: true, inline: true }, get_doc(value.doc))
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ def as_json():
|
|||
def as_pdf():
|
||||
response = Response()
|
||||
response.mimetype = "application/pdf"
|
||||
encoded_filename = quote(frappe.response['filename'].replace(' ', '_'), encoding='utf-8')
|
||||
encoded_filename = quote(frappe.response['filename'].replace(' ', '_'))
|
||||
response.headers["Content-Disposition"] = ("filename=\"%s\"" % frappe.response['filename'].replace(' ', '_') + ";filename*=utf-8''%s" % encoded_filename).encode("utf-8")
|
||||
response.data = frappe.response['filecontent']
|
||||
return response
|
||||
|
|
|
|||
|
|
@ -337,3 +337,10 @@ def get_last_active():
|
|||
WHERE `user_type` = 'System User' AND `name` NOT IN ({standard_users})"""
|
||||
.format(standard_users=", ".join(["%s"]*len(STANDARD_USERS))),
|
||||
STANDARD_USERS)[0][0]
|
||||
|
||||
@frappe.whitelist()
|
||||
def activate_scheduler():
|
||||
if is_scheduler_disabled():
|
||||
enable_scheduler()
|
||||
if frappe.conf.pause_scheduler:
|
||||
update_site_config('pause_scheduler', 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue