Skip to content

Commit

Permalink
fix: update project cost from timesheet (#44211)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Nov 19, 2024
1 parent a2199db commit b21fb8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions erpnext/projects/doctype/timesheet/timesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,14 @@ def update_task_and_project(self):
task.save()
tasks.append(data.task)

elif data.project and data.project not in projects:
frappe.get_doc("Project", data.project).update_project()
if data.project and data.project not in projects:
projects.append(data.project)

for project in projects:
project_doc = frappe.get_doc("Project", project)
project_doc.update_project()
project_doc.save()

def validate_dates(self):
for time_log in self.time_logs:
time_log.validate_dates()
Expand Down

0 comments on commit b21fb8f

Please sign in to comment.