Merge branch 'develop'
This commit is contained in:
commit
2498df464d
5 changed files with 21 additions and 4 deletions
|
|
@ -1,2 +1,2 @@
|
|||
from __future__ import unicode_literals
|
||||
__version__ = "6.10.1"
|
||||
__version__ = "6.10.2"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
|
|||
app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
|
||||
|
||||
app_icon = "octicon octicon-circuit-board"
|
||||
app_version = "6.10.1"
|
||||
app_version = "6.10.2"
|
||||
app_color = "orange"
|
||||
source_link = "https://github.com/frappe/frappe"
|
||||
app_license = "MIT"
|
||||
|
|
|
|||
|
|
@ -249,6 +249,13 @@ frappe.ui.form.Grid = Class.extend({
|
|||
if(!blank_row) {
|
||||
var d = me.frm.add_child(me.df.fieldname);
|
||||
$.each(row, function(ci, value) {
|
||||
var fieldname = fieldnames[ci];
|
||||
var df = frappe.meta.get_docfield(me.df.options, fieldname);
|
||||
|
||||
// convert date formatting
|
||||
if(df.fieldtype==="Date" && value) {
|
||||
value = frappe.datetime.user_to_str(value);
|
||||
}
|
||||
d[fieldnames[ci]] = value;
|
||||
});
|
||||
}
|
||||
|
|
@ -266,6 +273,7 @@ frappe.ui.form.Grid = Class.extend({
|
|||
var me = this;
|
||||
$(this.wrapper).find(".grid-download").removeClass("hide").on("click", function() {
|
||||
var data = [];
|
||||
var docfields = [];
|
||||
data.push([__("Bulk Edit {0}", [me.df.label])]);
|
||||
data.push([]);
|
||||
data.push([]);
|
||||
|
|
@ -276,6 +284,7 @@ frappe.ui.form.Grid = Class.extend({
|
|||
data[1].push(df.label);
|
||||
data[2].push(df.fieldname);
|
||||
data[3].push(df.description || "");
|
||||
docfields.push(df);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -283,7 +292,14 @@ frappe.ui.form.Grid = Class.extend({
|
|||
$.each(me.frm.doc[me.df.fieldname] || [], function(i, d) {
|
||||
row = [];
|
||||
$.each(data[2], function(i, fieldname) {
|
||||
row.push(d[fieldname] || "");
|
||||
var value = d[fieldname];
|
||||
|
||||
// format date
|
||||
if(docfields[i].fieldtype==="Date" && value) {
|
||||
value = frappe.datetime.str_to_user(value);
|
||||
}
|
||||
|
||||
row.push(value || "");
|
||||
});
|
||||
data.push(row);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ frappe.ui.form.ScriptManager = Class.extend({
|
|||
// css
|
||||
doctype.__css && frappe.dom.set_style(doctype.__css);
|
||||
|
||||
this.trigger('setup');
|
||||
},
|
||||
log_error: function(caller, e) {
|
||||
show_alert("Error in Client Script.");
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -1,6 +1,6 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
version = "6.10.1"
|
||||
version = "6.10.2"
|
||||
|
||||
with open("requirements.txt", "r") as f:
|
||||
install_requires = f.readlines()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue