fix: sider issues
This commit is contained in:
parent
5f51c20177
commit
65616031e4
4 changed files with 5 additions and 9 deletions
|
|
@ -164,7 +164,7 @@ def upload(rows = None, submit_after_import=None, ignore_encoding_errors=False,
|
|||
d[fieldname] = get_datetime(_date + " " + _time)
|
||||
else:
|
||||
d[fieldname] = None
|
||||
elif df.fieldtype == "Duration":
|
||||
elif fieldtype == "Duration":
|
||||
d[fieldname] = duration_to_seconds(cstr(d[fieldname]))
|
||||
elif fieldtype in ("Image", "Attach Image", "Attach"):
|
||||
# added file to attachments list
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import os, json
|
|||
|
||||
from frappe import _
|
||||
from frappe.modules import scrub, get_module_path
|
||||
from frappe.utils import flt, cint, get_html_format, get_url_to_form, gzip_decompress, format_duration, cstr
|
||||
from frappe.utils import flt, cint, get_html_format, get_url_to_form, gzip_decompress, format_duration
|
||||
from frappe.model.utils import render_include
|
||||
from frappe.translate import send_translations
|
||||
import frappe.desk.reportview
|
||||
|
|
@ -369,7 +369,7 @@ def export_query():
|
|||
|
||||
def handle_duration_fieldtype_values(result, columns):
|
||||
for i, col in enumerate(columns):
|
||||
fieldtype, fieldname = None, None
|
||||
fieldtype = None
|
||||
if isinstance(col, string_types):
|
||||
col = col.split(":")
|
||||
if len(col) > 1:
|
||||
|
|
@ -381,7 +381,6 @@ def handle_duration_fieldtype_values(result, columns):
|
|||
fieldtype = "Data"
|
||||
else:
|
||||
fieldtype = col.get("fieldtype")
|
||||
fieldname = col.get("fieldname")
|
||||
|
||||
if fieldtype == "Duration":
|
||||
for entry in range(0, len(result)):
|
||||
|
|
@ -410,10 +409,7 @@ def build_xlsx_data(columns, data, visible_idx, include_indentation):
|
|||
for idx in range(len(data.columns)):
|
||||
label = columns[idx]["label"]
|
||||
fieldname = columns[idx]["fieldname"]
|
||||
fieldtype = columns[idx]["fieldtype"]
|
||||
cell_value = row.get(fieldname, row.get(label, ""))
|
||||
if fieldtype == "Duration":
|
||||
cell_value = format_duration(value)
|
||||
|
||||
if cint(include_indentation) and 'indent' in row and idx == 0:
|
||||
cell_value = (' ' * cint(row['indent'])) + cell_value
|
||||
|
|
|
|||
|
|
@ -830,7 +830,7 @@ Object.assign(frappe.utils, {
|
|||
duration_options = {
|
||||
hide_days: 0,
|
||||
hide_seconds: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
if (value) {
|
||||
let total_duration = frappe.utils.seconds_to_duration(value, duration_options);
|
||||
|
|
|
|||
|
|
@ -1323,7 +1323,7 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
|
|||
.slice(standard_column_count)
|
||||
.map((cell, i) => {
|
||||
if (cell.column.fieldtype === "Duration") {
|
||||
cell.content = frappe.utils.get_formatted_duration(cell.content)
|
||||
cell.content = frappe.utils.get_formatted_duration(cell.content);
|
||||
}
|
||||
if (include_indentation && i===0) {
|
||||
cell.content = ' '.repeat(row.meta.indent) + (cell.content || '');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue