From feb64cb9b5e28ba2c8471fee975e42cff37d0acf Mon Sep 17 00:00:00 2001 From: venkat102 Date: Mon, 17 Feb 2025 14:49:32 +0530 Subject: [PATCH] fix: enable fetch_timesheet_in_sales_invoice in test (cherry picked from commit 5880f1d5c6b542328c288fdb2ad27bf251c0a6fe) # Conflicts: # erpnext/projects/doctype/timesheet/test_timesheet.py --- erpnext/projects/doctype/timesheet/test_timesheet.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index da042f36aef..85b4e9349c2 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -53,6 +53,7 @@ class TestTimesheet(unittest.TestCase): self.assertEqual(item.qty, 2.00) self.assertEqual(item.rate, 50.00) + @IntegrationTestCase.change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1}) def test_timesheet_billing_based_on_project(self): emp = make_employee("test_employee_6@salary.com") project = frappe.get_value("Project", {"project_name": "_Test Project"}) @@ -62,6 +63,10 @@ class TestTimesheet(unittest.TestCase): ) sales_invoice = create_sales_invoice(do_not_save=True) sales_invoice.project = project +<<<<<<< HEAD +======= + sales_invoice.add_timesheet_data() +>>>>>>> 5880f1d5c6 (fix: enable fetch_timesheet_in_sales_invoice in test) sales_invoice.submit() ts = frappe.get_doc("Timesheet", timesheet.name)