diff --git a/frappe/__version__.py b/frappe/__version__.py index bdb8bda6ae..601b9bb2b3 100644 --- a/frappe/__version__.py +++ b/frappe/__version__.py @@ -1 +1 @@ -__version__ = "4.11.0" +__version__ = "4.11.1" diff --git a/frappe/hooks.py b/frappe/hooks.py index 8c08c03991..0c447688e6 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -3,7 +3,7 @@ app_title = "Frappe Framework" app_publisher = "Web Notes Technologies Pvt. Ltd." app_description = "Full Stack Web Application Framework in Python" app_icon = "assets/frappe/images/frappe.svg" -app_version = "4.11.0" +app_version = "4.11.1" app_color = "#3498db" app_email = "support@frappe.io" diff --git a/frappe/model/document.py b/frappe/model/document.py index 916b545fbf..af6851cabc 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -411,10 +411,17 @@ class Document(BaseDocument): fn.__name__ = method.encode("utf-8") return Document.hook(fn)(self, *args, **kwargs) + @staticmethod + def whitelist(f): + f.whitelisted = True + return f + + @whitelist.__func__ def submit(self): self.docstatus = 1 self.save() + @whitelist.__func__ def cancel(self): self.docstatus = 2 self.save() @@ -451,16 +458,12 @@ class Document(BaseDocument): elif self._action=="update_after_submit": self.run_method("on_update_after_submit") + def check_no_back_links_exist(self): from frappe.model.delete_doc import check_if_doc_is_linked if not self.get("ignore_links"): check_if_doc_is_linked(self, method="Cancel") - @staticmethod - def whitelist(f): - f.whitelisted = True - return f - @staticmethod def hook(f): def add_to_return_value(self, new_return_value): diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js index 8744517e5d..d1e651fee9 100644 --- a/frappe/public/js/frappe/form/grid.js +++ b/frappe/public/js/frappe/form/grid.js @@ -142,9 +142,10 @@ frappe.ui.form.Grid = Class.extend({ set_column_disp: function(fieldname, show) { if($.isArray(fieldname)) { var me = this; - $.each(fieldname, function(i, fname) { + for(var i=0, l=fieldname.length; i'; } - $col = this.grid.$row_actions.clone().appendTo(this.row); + $col = $(this.grid.row_actions).appendTo(this.row); if($col.width() < 50) { $col.toggle(false); @@ -478,9 +479,10 @@ frappe.ui.form.GridRow = Class.extend({ this.layout.refresh(this.doc); // copy get_query to fields - $.each(this.grid.fieldinfo || {}, function(fieldname, fi) { + for(var fieldname in (this.grid.fieldinfo || {})) { + var fi = this.grid.fieldinfo[fieldname]; $.extend(me.fields_dict[fieldname], fi); - }) + } this.toggle_add_delete_button_display(this.wrapper.find(".panel:first")); diff --git a/frappe/public/js/frappe/form/layout.js b/frappe/public/js/frappe/form/layout.js index 6b70abc3b9..5d856ab6c4 100644 --- a/frappe/public/js/frappe/form/layout.js +++ b/frappe/public/js/frappe/form/layout.js @@ -50,7 +50,8 @@ frappe.ui.form.Layout = Class.extend({ this.wrapper.find(".empty-form-alert").remove(); - $.each(this.fields_list, function(i, fieldobj) { + for(var i=0, l=this.fields_list.length; i