Merge branch 'version-13-beta-pre-release' into version-13-beta

This commit is contained in:
Saurabh 2021-02-24 15:00:23 +05:30
commit 7a8ddfdb46
4 changed files with 6 additions and 4 deletions

View file

@ -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"

View file

@ -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]

View file

@ -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)

View file

@ -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';