mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: enable fetch_timesheet_in_sales_invoice in test
This commit is contained in:
@@ -53,6 +53,7 @@ class TestTimesheet(IntegrationTestCase):
|
|||||||
self.assertEqual(item.qty, 2.00)
|
self.assertEqual(item.qty, 2.00)
|
||||||
self.assertEqual(item.rate, 50.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):
|
def test_timesheet_billing_based_on_project(self):
|
||||||
emp = make_employee("test_employee_6@salary.com")
|
emp = make_employee("test_employee_6@salary.com")
|
||||||
project = frappe.get_value("Project", {"project_name": "_Test Project"})
|
project = frappe.get_value("Project", {"project_name": "_Test Project"})
|
||||||
@@ -62,7 +63,7 @@ class TestTimesheet(IntegrationTestCase):
|
|||||||
)
|
)
|
||||||
sales_invoice = create_sales_invoice(do_not_save=True)
|
sales_invoice = create_sales_invoice(do_not_save=True)
|
||||||
sales_invoice.project = project
|
sales_invoice.project = project
|
||||||
sales_invoice._add_timesheet_data()
|
sales_invoice.add_timesheet_data()
|
||||||
sales_invoice.submit()
|
sales_invoice.submit()
|
||||||
|
|
||||||
ts = frappe.get_doc("Timesheet", timesheet.name)
|
ts = frappe.get_doc("Timesheet", timesheet.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user