Revert "fix: tests depending on global default company"
This reverts commit 1f20c99ecfb51675d7182588001bb3c1d581f415.
This commit is contained in:
parent
f8550790fa
commit
36f7710356
@ -1065,7 +1065,6 @@ class TestSalesInvoice(unittest.TestCase):
|
||||
serial_no = frappe.get_doc({
|
||||
"doctype": "Serial No",
|
||||
"item_code": "_Test Serialized Item With Series",
|
||||
"company": "Wind Power LLC",
|
||||
"serial_no": make_autoname("SR", "Serial No")
|
||||
})
|
||||
serial_no.save()
|
||||
|
@ -101,7 +101,6 @@ class TestSubscription(unittest.TestCase):
|
||||
subscription.delete()
|
||||
|
||||
def test_invoice_is_generated_at_end_of_billing_period(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.start = '2018-01-01'
|
||||
@ -117,10 +116,8 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(subscription.current_invoice_start, '2018-01-01')
|
||||
self.assertEqual(subscription.status, 'Past Due Date')
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_status_goes_back_to_active_after_invoice_is_paid(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@ -144,10 +141,8 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(len(subscription.invoices), 1)
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_cancel_after_grace_period(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
default_grace_period_action = settings.cancel_after_grace
|
||||
settings.cancel_after_grace = 1
|
||||
@ -169,11 +164,8 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.cancel_after_grace = default_grace_period_action
|
||||
settings.save()
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_unpaid_after_grace_period(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
default_grace_period_action = settings.cancel_after_grace
|
||||
settings.cancel_after_grace = 0
|
||||
@ -195,11 +187,8 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.cancel_after_grace = default_grace_period_action
|
||||
settings.save()
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_invoice_days_until_due(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@ -211,11 +200,8 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(subscription.status, 'Active')
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_is_past_due_doesnt_change_within_grace_period(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
grace_period = settings.grace_period
|
||||
settings.grace_period = 1000
|
||||
@ -243,7 +229,6 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.grace_period = grace_period
|
||||
settings.save()
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_remains_active_during_invoice_period(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
@ -272,7 +257,6 @@ class TestSubscription(unittest.TestCase):
|
||||
subscription.delete()
|
||||
|
||||
def test_subscription_cancelation(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@ -282,10 +266,8 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(subscription.status, 'Cancelled')
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_cancellation_invoices(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
to_prorate = settings.prorate
|
||||
settings.prorate = 1
|
||||
@ -319,11 +301,8 @@ class TestSubscription(unittest.TestCase):
|
||||
subscription.delete()
|
||||
settings.prorate = to_prorate
|
||||
settings.save()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_cancellation_invoices_with_prorata_false(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
to_prorate = settings.prorate
|
||||
settings.prorate = 0
|
||||
@ -342,11 +321,8 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_cancellation_invoices_with_prorata_true(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
to_prorate = settings.prorate
|
||||
settings.prorate = 1
|
||||
@ -369,10 +345,8 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subcription_cancellation_and_process(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
default_grace_period_action = settings.cancel_after_grace
|
||||
settings.cancel_after_grace = 1
|
||||
@ -404,11 +378,8 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.cancel_after_grace = default_grace_period_action
|
||||
settings.save()
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_restart_and_process(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
default_grace_period_action = settings.cancel_after_grace
|
||||
settings.grace_period = 0
|
||||
@ -445,11 +416,8 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.cancel_after_grace = default_grace_period_action
|
||||
settings.save()
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_unpaid_back_to_active(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
default_grace_period_action = settings.cancel_after_grace
|
||||
settings.cancel_after_grace = 0
|
||||
@ -482,7 +450,6 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.cancel_after_grace = default_grace_period_action
|
||||
settings.save()
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_restart_active_subscription(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
@ -495,8 +462,6 @@ class TestSubscription(unittest.TestCase):
|
||||
subscription.delete()
|
||||
|
||||
def test_subscription_invoice_discount_percentage(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.additional_discount_percentage = 10
|
||||
@ -510,11 +475,8 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(invoice.apply_discount_on, 'Grand Total')
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_subscription_invoice_discount_amount(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.additional_discount_amount = 11
|
||||
@ -528,12 +490,10 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(invoice.apply_discount_on, 'Grand Total')
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_prepaid_subscriptions(self):
|
||||
# Create a non pre-billed subscription, processing should not create
|
||||
# invoices.
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@ -549,10 +509,8 @@ class TestSubscription(unittest.TestCase):
|
||||
subscription.process()
|
||||
|
||||
self.assertEqual(len(subscription.invoices), 1)
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
||||
|
||||
def test_prepaid_subscriptions_with_prorate_true(self):
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", "_Test Company")
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
to_prorate = settings.prorate
|
||||
settings.prorate = 1
|
||||
@ -580,4 +538,3 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
@ -75,7 +75,6 @@ class TestAsset(unittest.TestCase):
|
||||
'qty': 1,
|
||||
'asset': asset.name
|
||||
})
|
||||
doc.company = 'Wind Power LLC'
|
||||
|
||||
doc.set_missing_values()
|
||||
self.assertEquals(doc.items[0].is_fixed_asset, 1)
|
||||
@ -667,7 +666,7 @@ def create_asset(**args):
|
||||
"asset_name": args.asset_name or "Macbook Pro 1",
|
||||
"asset_category": "Computers",
|
||||
"item_code": args.item_code or "Macbook Pro",
|
||||
"company": args.company or "_Test Company",
|
||||
"company": args.company or"_Test Company",
|
||||
"purchase_date": "2015-01-01",
|
||||
"calculate_depreciation": 0,
|
||||
"gross_purchase_amount": 100000,
|
||||
|
@ -36,18 +36,16 @@ class TestProcurementTracker(unittest.TestCase):
|
||||
mr = make_material_request(company="_Test Procurement Company", warehouse=warehouse)
|
||||
po = make_purchase_order(mr.name)
|
||||
po.supplier = "_Test Supplier"
|
||||
po.company = "_Test Procurement Company"
|
||||
po.get("items")[0].cost_center = "_Test Cost Center - _TPC"
|
||||
po.get("items")[0].cost_center = "_Test Cost Center - _TC"
|
||||
po.submit()
|
||||
pr = make_purchase_receipt(po.name)
|
||||
pr.company = "_Test Procurement Company"
|
||||
pr.submit()
|
||||
frappe.db.commit()
|
||||
date_obj = datetime.date(datetime.now())
|
||||
|
||||
expected_data = {
|
||||
"material_request_date": date_obj,
|
||||
"cost_center": "_Test Cost Center - _TPC",
|
||||
"cost_center": "_Test Cost Center - _TC",
|
||||
"project": None,
|
||||
"requesting_site": "_Test Procurement Warehouse - _TPC",
|
||||
"requestor": "Administrator",
|
||||
|
@ -43,7 +43,6 @@ class TestMapper(unittest.TestCase):
|
||||
qtn = frappe.get_doc({
|
||||
"doctype": "Quotation",
|
||||
"quotation_to": "Customer",
|
||||
"company": "_Test Company",
|
||||
"party_name": customer,
|
||||
"order_type": "Sales",
|
||||
"transaction_date" : nowdate(),
|
||||
@ -60,7 +59,6 @@ class TestMapper(unittest.TestCase):
|
||||
"base_amount": 1000.0,
|
||||
"base_rate": 100.0,
|
||||
"description": "CPU",
|
||||
"company": "_Test Company",
|
||||
"doctype": "Sales Order Item",
|
||||
"item_code": "_Test Item Home Desktop 100",
|
||||
"item_name": "CPU",
|
||||
|
@ -30,7 +30,6 @@ class TestOpportunity(unittest.TestCase):
|
||||
new_lead_email_id = "new{}@example.com".format(random_string(5))
|
||||
args = {
|
||||
"doctype": "Opportunity",
|
||||
"company": "_Test Company",
|
||||
"contact_email": new_lead_email_id,
|
||||
"opportunity_type": "Sales",
|
||||
"with_items": 0,
|
||||
|
@ -108,7 +108,7 @@ class TestPlaidSettings(unittest.TestCase):
|
||||
}
|
||||
|
||||
bank = json.dumps(frappe.get_doc("Bank", "Citi").as_dict(), default=json_handler)
|
||||
company = frappe.db.get_single_value('Global Defaults', 'default_company') or '_Test Company'
|
||||
company = frappe.db.get_single_value('Global Defaults', 'default_company')
|
||||
|
||||
if frappe.db.get_value("Company", company, "default_bank_account") is None:
|
||||
frappe.db.set_value("Company", company, "default_bank_account", get_default_bank_cash_account(company, "Cash").get("account"))
|
||||
|
@ -83,8 +83,7 @@ def get_healthcare_service_unit():
|
||||
service_unit.service_unit_type = get_service_unit_type()
|
||||
service_unit.inpatient_occupancy = 1
|
||||
service_unit.occupancy_status = "Vacant"
|
||||
service_unit.is_group = 0,
|
||||
service_unit.company = "_Test Company"
|
||||
service_unit.is_group = 0
|
||||
service_unit_parent_name = frappe.db.exists({
|
||||
"doctype": "Healthcare Service Unit",
|
||||
"healthcare_service_unit_name": "All Healthcare Service Units",
|
||||
|
@ -104,8 +104,7 @@ def mark_attendance(employee, date=today(), status='Present'):
|
||||
"doctype": "Attendance",
|
||||
"employee": employee.name,
|
||||
"attendance_date": date,
|
||||
"status": status,
|
||||
"company": "_Test Company"
|
||||
"status": status
|
||||
})
|
||||
attendance.save()
|
||||
attendance.submit()
|
||||
|
@ -16,7 +16,7 @@ def create_department(department_name, parent_department=None):
|
||||
'is_group': 0,
|
||||
'parent_department': parent_department,
|
||||
'department_name': department_name,
|
||||
'company': frappe.defaults.get_defaults().company or 'Wind Power LLC'
|
||||
'company': frappe.defaults.get_defaults().company
|
||||
}).insert()
|
||||
|
||||
return doc
|
||||
|
@ -60,7 +60,7 @@ def make_employee(user, company=None, **kwargs):
|
||||
"doctype": "Employee",
|
||||
"naming_series": "EMP-",
|
||||
"first_name": user,
|
||||
"company": company or erpnext.get_default_company() or 'Wind Power LLC',
|
||||
"company": company or erpnext.get_default_company(),
|
||||
"user_id": user,
|
||||
"date_of_birth": "1990-05-08",
|
||||
"date_of_joining": "2013-01-01",
|
||||
|
@ -88,7 +88,7 @@ def create_payroll_period():
|
||||
payroll_period = frappe.get_doc(dict(
|
||||
doctype = 'Payroll Period',
|
||||
name = "_Test Payroll Period",
|
||||
company = erpnext.get_default_company() or 'Wind Power LLC',
|
||||
company = erpnext.get_default_company(),
|
||||
start_date = date(date.today().year, 1, 1),
|
||||
end_date = date(date.today().year, 12, 31)
|
||||
)).insert()
|
||||
|
@ -94,7 +94,6 @@ class TestExpenseClaim(unittest.TestCase):
|
||||
payable_account = get_payable_account(company_name)
|
||||
expense_claim = frappe.get_doc({
|
||||
"doctype": "Expense Claim",
|
||||
"company": "_Test Company",
|
||||
"employee": "_T-Employee-00001",
|
||||
"payable_account": payable_account,
|
||||
"approval_status": "Rejected",
|
||||
|
@ -55,8 +55,7 @@ def create_job_offer(**args):
|
||||
"job_applicant": args.job_applicant or job_applicant.name,
|
||||
"offer_date": args.offer_date or nowdate(),
|
||||
"designation": args.designation or "Researcher",
|
||||
"status": args.status or "Accepted",
|
||||
"company": "_Test Company"
|
||||
"status": args.status or "Accepted"
|
||||
})
|
||||
return job_offer
|
||||
|
||||
@ -69,7 +68,6 @@ def create_staffing_plan(**args):
|
||||
staffing_plan = frappe.get_doc({
|
||||
"doctype": "Staffing Plan",
|
||||
"name": args.name or "Test",
|
||||
"company": "_Test Company",
|
||||
"from_date": args.from_date or nowdate(),
|
||||
"to_date": args.to_date or add_days(nowdate(), 10),
|
||||
"staffing_details": args.staffing_details or [{
|
||||
|
@ -414,7 +414,7 @@ def make_salary_component(salary_components, test_tax, company_list=None):
|
||||
get_salary_component_account(salary_component["salary_component"], company_list)
|
||||
|
||||
def get_salary_component_account(sal_comp, company_list=None):
|
||||
company = erpnext.get_default_company() or 'Wind Power LLC'
|
||||
company = erpnext.get_default_company()
|
||||
|
||||
if company_list and company not in company_list:
|
||||
company_list.append(company)
|
||||
|
@ -116,7 +116,7 @@ def make_salary_structure(salary_structure, payroll_frequency, employee=None, do
|
||||
details = {
|
||||
"doctype": "Salary Structure",
|
||||
"name": salary_structure,
|
||||
"company": company or erpnext.get_default_company() or "_Test Company",
|
||||
"company": company or erpnext.get_default_company(),
|
||||
"earnings": make_earning_salary_component(test_tax=test_tax, company_list=["_Test Company"]),
|
||||
"deductions": make_deduction_salary_component(test_tax=test_tax, company_list=["_Test Company"]),
|
||||
"payroll_frequency": payroll_frequency,
|
||||
|
@ -32,8 +32,7 @@ def create_training_program(training_program):
|
||||
frappe.get_doc({
|
||||
"doctype": "Training Program",
|
||||
"training_program": training_program,
|
||||
"description": training_program,
|
||||
"company": "Wind Power LLC"
|
||||
"description": training_program
|
||||
}).insert()
|
||||
|
||||
def get_attendees(employee, employee2):
|
||||
|
@ -192,7 +192,6 @@ class TestDeliveryNote(unittest.TestCase):
|
||||
serial_no = frappe.get_doc({
|
||||
"doctype": "Serial No",
|
||||
"item_code": "_Test Serialized Item With Series",
|
||||
"company": "Wind Power LLC",
|
||||
"serial_no": make_autoname("SR", "Serial No")
|
||||
})
|
||||
serial_no.save()
|
||||
@ -566,6 +565,32 @@ class TestDeliveryNote(unittest.TestCase):
|
||||
for i, gle in enumerate(gl_entries):
|
||||
self.assertEqual(expected_values[gle.account]["cost_center"], gle.cost_center)
|
||||
|
||||
def test_delivery_note_without_cost_center(self):
|
||||
cost_center = "Main - TCP1"
|
||||
|
||||
company = frappe.db.get_value('Warehouse', 'Stores - TCP1', 'company')
|
||||
|
||||
set_valuation_method("_Test Item", "FIFO")
|
||||
|
||||
make_stock_entry(target="Stores - TCP1", qty=5, basic_rate=100)
|
||||
|
||||
stock_in_hand_account = get_inventory_account('_Test Company with perpetual inventory')
|
||||
dn = create_delivery_note(company='_Test Company with perpetual inventory', warehouse='Stores - TCP1', cost_center = 'Main - TCP1', expense_account = "Cost of Goods Sold - TCP1")
|
||||
|
||||
gl_entries = get_gl_entries("Delivery Note", dn.name)
|
||||
|
||||
self.assertTrue(gl_entries)
|
||||
expected_values = {
|
||||
"Cost of Goods Sold - TCP1": {
|
||||
"cost_center": cost_center
|
||||
},
|
||||
stock_in_hand_account: {
|
||||
"cost_center": None
|
||||
}
|
||||
}
|
||||
for i, gle in enumerate(gl_entries):
|
||||
self.assertEqual(expected_values[gle.account]["cost_center"], gle.cost_center)
|
||||
|
||||
def test_make_sales_invoice_from_dn_for_returned_qty(self):
|
||||
from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note
|
||||
from erpnext.stock.doctype.delivery_note.delivery_note import make_sales_invoice
|
||||
|
@ -172,7 +172,7 @@ def create_delivery_trip(driver, address, contact=None):
|
||||
|
||||
delivery_trip = frappe.get_doc({
|
||||
"doctype": "Delivery Trip",
|
||||
"company": erpnext.get_default_company() or 'Wind Power LLC',
|
||||
"company": erpnext.get_default_company(),
|
||||
"departure_time": add_days(now_datetime(), 5),
|
||||
"driver": driver.name,
|
||||
"driver_address": address.name,
|
||||
|
@ -432,6 +432,30 @@ class TestPurchaseReceipt(unittest.TestCase):
|
||||
for i, gle in enumerate(gl_entries):
|
||||
self.assertEqual(expected_values[gle.account]["cost_center"], gle.cost_center)
|
||||
|
||||
def test_purchase_receipt_without_cost_center(self):
|
||||
if not frappe.db.exists('Location', 'Test Location'):
|
||||
frappe.get_doc({
|
||||
'doctype': 'Location',
|
||||
'location_name': 'Test Location'
|
||||
}).insert()
|
||||
pr = make_purchase_receipt(company="_Test Company with perpetual inventory", warehouse = "Stores - TCP1", supplier_warehouse = "Work in Progress - TCP1")
|
||||
|
||||
stock_in_hand_account = get_inventory_account(pr.company, pr.get("items")[0].warehouse)
|
||||
gl_entries = get_gl_entries("Purchase Receipt", pr.name)
|
||||
|
||||
self.assertTrue(gl_entries)
|
||||
|
||||
expected_values = {
|
||||
"Stock Received But Not Billed - TCP1": {
|
||||
"cost_center": None
|
||||
},
|
||||
stock_in_hand_account: {
|
||||
"cost_center": None
|
||||
}
|
||||
}
|
||||
for i, gle in enumerate(gl_entries):
|
||||
self.assertEqual(expected_values[gle.account]["cost_center"], gle.cost_center)
|
||||
|
||||
def test_make_purchase_invoice_from_pr_for_returned_qty(self):
|
||||
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order, create_pr_against_po
|
||||
|
||||
|
@ -24,7 +24,6 @@ class TestSerialNo(unittest.TestCase):
|
||||
frappe.delete_doc_if_exists("Serial No", "_TCSER0001")
|
||||
|
||||
sr = frappe.new_doc("Serial No")
|
||||
sr.company = '_Test Company'
|
||||
sr.item_code = "_Test Serialized Item"
|
||||
sr.warehouse = "_Test Warehouse - _TC"
|
||||
sr.serial_no = "_TCSER0001"
|
||||
|
Loading…
x
Reference in New Issue
Block a user