Merge branch 'develop' into fix-employee-onboarding-status

This commit is contained in:
Rucha Mahabal
2021-06-24 12:24:44 +05:30
committed by GitHub
716 changed files with 10532 additions and 16865 deletions

View File

@@ -232,7 +232,7 @@ def get_project(doctype, txt, searchfield, start, page_len, filters):
meta = frappe.get_meta(doctype)
searchfields = meta.get_search_fields()
search_columns = ", " + ", ".join(searchfields) if searchfields else ''
search_cond = " or " + " or ".join([field + " like %(txt)s" for field in searchfields])
search_cond = " or " + " or ".join(field + " like %(txt)s" for field in searchfields)
return frappe.db.sql(""" select name {search_columns} from `tabProject`
where %(key)s like %(txt)s

View File

@@ -87,8 +87,8 @@ class Timesheet(Document):
def set_dates(self):
if self.docstatus < 2 and self.time_logs:
start_date = min([getdate(d.from_time) for d in self.time_logs])
end_date = max([getdate(d.to_time) for d in self.time_logs])
start_date = min(getdate(d.from_time) for d in self.time_logs)
end_date = max(getdate(d.to_time) for d in self.time_logs)
if start_date and end_date:
self.start_date = getdate(start_date)