diff --git a/frappe/__init__.py b/frappe/__init__.py index 7929e62acb..efe03bb3a5 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -23,7 +23,7 @@ if PY2: reload(sys) sys.setdefaultencoding("utf-8") -__version__ = '13.0.0-beta.10' +__version__ = '13.0.0-beta.11' __title__ = "Frappe Framework" diff --git a/frappe/app.py b/frappe/app.py index adf2bfa8c9..7ec88b06cf 100644 --- a/frappe/app.py +++ b/frappe/app.py @@ -152,10 +152,10 @@ def process_response(response): def set_cors_headers(response): origin = frappe.request.headers.get('Origin') - if not origin: + allow_cors = frappe.conf.allow_cors + if not (origin and allow_cors): return - allow_cors = frappe.conf.allow_cors if allow_cors != "*": if not isinstance(allow_cors, list): allow_cors = [allow_cors] diff --git a/frappe/model/document.py b/frappe/model/document.py index 9efd8b6c94..3545ac3857 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -1015,6 +1015,8 @@ class Document(BaseDocument): def notify_update(self): """Publish realtime that the current document is modified""" + if frappe.flags.in_patch: return + frappe.publish_realtime("doc_update", {"modified": self.modified, "doctype": self.doctype, "name": self.name}, doctype=self.doctype, docname=self.name, after_commit=True) diff --git a/frappe/public/js/frappe/form/controls/base_control.js b/frappe/public/js/frappe/form/controls/base_control.js index d7f873bee0..9981398b84 100644 --- a/frappe/public/js/frappe/form/controls/base_control.js +++ b/frappe/public/js/frappe/form/controls/base_control.js @@ -74,7 +74,7 @@ frappe.ui.form.Control = Class.extend({ frappe.model.get_doc(this.doctype, this.docname), this.perm || (this.frm && this.frm.perm), explain); // Match parent grid controls read only status - if (status === 'Write' && (this.grid || (this.layout && this.layout.grid))) { + if (status === 'Write' && (this.grid || (this.layout && this.layout.grid) && !cint(this.df.allow_on_submit))) { var grid = this.grid || this.layout.grid; if (grid.display_status == 'Read') { status = 'Read';