proposed usage of daterange picker
This commit is contained in:
parent
8b133ac087
commit
81130e848e
@ -4,16 +4,12 @@
|
||||
frappe.query_reports["Daily Timesheet Summary"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"from_date",
|
||||
"label": __("From Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": frappe.datetime.get_today()
|
||||
},
|
||||
{
|
||||
"fieldname":"to_date",
|
||||
"label": __("To Date"),
|
||||
"fieldtype": "Date",
|
||||
"default": frappe.datetime.get_today()
|
||||
"fieldname":"date",
|
||||
"label": __("Date"),
|
||||
"fieldtype": "DateRange",
|
||||
"start_with_value": true,
|
||||
"default_from":frappe.datetime.get_today(),
|
||||
"default_to":frappe.datetime.get_today(),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@ -9,7 +9,9 @@ from frappe.desk.reportview import build_match_conditions
|
||||
def execute(filters=None):
|
||||
if not filters:
|
||||
filters = {}
|
||||
elif filters.get("from_date") or filters.get("to_date"):
|
||||
elif filters.get("date") :
|
||||
filters["from_date"] = filters["date"][0]
|
||||
filters["to_date"] = filters["date"][1]
|
||||
filters["from_time"] = "00:00:00"
|
||||
filters["to_time"] = "24:00:00"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user