[project] added patch
This commit is contained in:
parent
9dd9bb0adf
commit
cdd265d3bf
5
patches/june_2013/p02_update_project_completed.py
Normal file
5
patches/june_2013/p02_update_project_completed.py
Normal file
@ -0,0 +1,5 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
for p in webnotes.conn.sql_list("""select name from tabProject"""):
|
||||
webnotes.bean("Project", p).controller.update_percent_complete()
|
@ -258,4 +258,5 @@ patch_list = [
|
||||
"patches.may_2013.p07_move_update_stock_to_pos",
|
||||
"patches.may_2013.p08_change_item_wise_tax",
|
||||
"patches.june_2013.p01_update_bom_exploded_items",
|
||||
"patches.june_2013.p02_update_project_completed",
|
||||
]
|
@ -63,6 +63,7 @@ class DocType:
|
||||
def update_percent_complete(self):
|
||||
total = webnotes.conn.sql("""select count(*) from tabTask where project=%s""",
|
||||
self.doc.name)[0][0]
|
||||
if total:
|
||||
completed = webnotes.conn.sql("""select count(*) from tabTask where
|
||||
project=%s and status='Closed'""", self.doc.name)[0][0]
|
||||
webnotes.conn.set_value("Project", self.doc.name, "percent_complete",
|
||||
|
19
projects/doctype/task/task_calendar.js
Normal file
19
projects/doctype/task/task_calendar.js
Normal file
@ -0,0 +1,19 @@
|
||||
wn.views.calendar["Task"] = {
|
||||
field_map: {
|
||||
"start": "exp_start_date",
|
||||
"end": "exp_end_date",
|
||||
"id": "name",
|
||||
"title": "subject",
|
||||
"allDay": "allDay"
|
||||
},
|
||||
gantt: true,
|
||||
filters: [
|
||||
{
|
||||
"fieldtype": "Link",
|
||||
"fieldname": "project",
|
||||
"options": "Project",
|
||||
"label": "Project"
|
||||
}
|
||||
],
|
||||
get_events_method: "projects.doctype.task.task.get_events"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user