mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 15:32:27 +00:00
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -64,6 +64,21 @@ def get_tasks(project, start=0, search=None, item_status=None):
|
|||||||
return list(filter(lambda x: not x.parent_task, tasks))
|
return list(filter(lambda x: not x.parent_task, tasks))
|
||||||
|
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_task_html(project: str, start: int = 0, item_status: str | None = None):
|
||||||
|
return frappe.render_template(
|
||||||
|
"erpnext/templates/includes/projects/project_tasks.html",
|
||||||
|
{
|
||||||
|
"doc": {
|
||||||
|
"name": project,
|
||||||
|
"project_name": project,
|
||||||
|
"tasks": get_tasks(project, start, item_status=item_status),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
is_path=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_timesheets(project, start=0, search=None):
|
def get_timesheets(project, start=0, search=None):
|
||||||
filters = {"project": project}
|
filters = {"project": project}
|
||||||
if search:
|
if search:
|
||||||
@@ -89,6 +104,15 @@ def get_timesheets(project, start=0, search=None):
|
|||||||
return timesheets
|
return timesheets
|
||||||
|
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_timesheet_html(project: str, start: int = 0):
|
||||||
|
return frappe.render_template(
|
||||||
|
"erpnext/templates/includes/projects/project_timesheets.html",
|
||||||
|
{"doc": {"timesheets": get_timesheets(project, start)}},
|
||||||
|
is_path=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_attachments(project):
|
def get_attachments(project):
|
||||||
return frappe.get_all(
|
return frappe.get_all(
|
||||||
"File",
|
"File",
|
||||||
|
|||||||
Reference in New Issue
Block a user