diff --git a/frappe/__init__.py b/frappe/__init__.py index 7d783f40cc..4647ab63b5 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -469,6 +469,10 @@ def delete_doc_if_exists(doctype, name): if db.exists(doctype, name): delete_doc(doctype, name) +def reload_doctype(doctype): + """Reload DocType from model (`[module]/[doctype]/[name]/[name].json`) files.""" + reload_doc(db.get_value("DocType", doctype, "module"), "doctype", doctype) + def reload_doc(module, dt=None, dn=None, force=False): """Reload Document from model (`[module]/[doctype]/[name]/[name].json`) files. @@ -477,6 +481,7 @@ def reload_doc(module, dt=None, dn=None, force=False): :param dn: Document name. :param force: Reload even if `modified` timestamp matches. """ + import frappe.modules return frappe.modules.reload_doc(module, dt, dn, force=force) diff --git a/frappe/public/css/form.css b/frappe/public/css/form.css index e69253cecc..31ca5d017f 100644 --- a/frappe/public/css/form.css +++ b/frappe/public/css/form.css @@ -11,6 +11,11 @@ padding: 10px 0px; border-bottom: 1px solid #d1d8dd; } +.form-inner-toolbar { + padding: 10px 15px; + background-color: #fafbfc; + text-align: right; +} .form-clickable-section { border-top: 1px solid #d1d8dd; padding: 10px 15px; diff --git a/frappe/public/js/legacy/form.js b/frappe/public/js/legacy/form.js index ceff84a516..1967047f10 100644 --- a/frappe/public/js/legacy/form.js +++ b/frappe/public/js/legacy/form.js @@ -98,8 +98,6 @@ _f.Frm.prototype.setup = function() { page: this.page }); - this.frm_head = this.toolbar; - // print layout this.setup_print_layout(); @@ -222,8 +220,8 @@ _f.Frm.prototype.onhide = function() { _f.Frm.prototype.setup_std_layout = function() { this.form_wrapper = $('
').appendTo(this.layout_main); - this.body_header = $("