fix: tests depending on global default company
This commit is contained in:
parent
b52cd59dc3
commit
1f20c99ecf
@ -1058,6 +1058,7 @@ 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,6 +101,7 @@ 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'
|
||||
@ -116,8 +117,10 @@ 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})
|
||||
@ -141,8 +144,10 @@ 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
|
||||
@ -164,8 +169,11 @@ 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
|
||||
@ -187,8 +195,11 @@ 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})
|
||||
@ -200,8 +211,11 @@ 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
|
||||
@ -229,6 +243,7 @@ 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')
|
||||
@ -257,6 +272,7 @@ 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})
|
||||
@ -266,8 +282,10 @@ 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
|
||||
@ -301,8 +319,11 @@ 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
|
||||
@ -321,8 +342,11 @@ 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
|
||||
@ -345,8 +369,10 @@ 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
|
||||
@ -378,8 +404,11 @@ 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
|
||||
@ -416,8 +445,11 @@ 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
|
||||
@ -450,6 +482,7 @@ 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')
|
||||
@ -462,6 +495,8 @@ 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
|
||||
@ -475,8 +510,11 @@ 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
|
||||
@ -490,10 +528,12 @@ 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})
|
||||
@ -509,8 +549,10 @@ 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
|
||||
@ -538,3 +580,4 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription.delete()
|
||||
frappe.db.set_value("Global Defaults", None, "default_company", None)
|
@ -78,6 +78,7 @@ 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)
|
||||
@ -595,7 +596,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,16 +36,18 @@ 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.get("items")[0].cost_center = "_Test Cost Center - _TC"
|
||||
po.company = "_Test Procurement Company"
|
||||
po.get("items")[0].cost_center = "_Test Cost Center - _TPC"
|
||||
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 - _TC",
|
||||
"cost_center": "_Test Cost Center - _TPC",
|
||||
"project": None,
|
||||
"requesting_site": "_Test Procurement Warehouse - _TPC",
|
||||
"requestor": "Administrator",
|
||||
|
@ -43,6 +43,7 @@ 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(),
|
||||
@ -59,6 +60,7 @@ 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,6 +30,7 @@ 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')
|
||||
company = frappe.db.get_single_value('Global Defaults', 'default_company') or '_Test 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"))
|
||||
|
@ -84,7 +84,8 @@ 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.is_group = 0,
|
||||
service_unit.company = "_Test Company"
|
||||
service_unit_parent_name = frappe.db.exists({
|
||||
"doctype": "Healthcare Service Unit",
|
||||
"healthcare_service_unit_name": "All Healthcare Service Units",
|
||||
|
@ -104,7 +104,8 @@ def mark_attendance(employee, date=today(), status='Present'):
|
||||
"doctype": "Attendance",
|
||||
"employee": employee.name,
|
||||
"attendance_date": date,
|
||||
"status": status
|
||||
"status": status,
|
||||
"company": "_Test Company"
|
||||
})
|
||||
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
|
||||
'company': frappe.defaults.get_defaults().company or 'Wind Power LLC'
|
||||
}).insert()
|
||||
|
||||
return doc
|
||||
|
@ -60,7 +60,7 @@ def make_employee(user, company=None):
|
||||
"doctype": "Employee",
|
||||
"naming_series": "EMP-",
|
||||
"first_name": user,
|
||||
"company": company or erpnext.get_default_company(),
|
||||
"company": company or erpnext.get_default_company() or 'Wind Power LLC',
|
||||
"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(),
|
||||
company = erpnext.get_default_company() or 'Wind Power LLC',
|
||||
start_date = date(date.today().year, 1, 1),
|
||||
end_date = date(date.today().year, 12, 31)
|
||||
)).insert()
|
||||
|
@ -94,6 +94,7 @@ 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,7 +55,8 @@ 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"
|
||||
"status": args.status or "Accepted",
|
||||
"company": "_Test Company"
|
||||
})
|
||||
return job_offer
|
||||
|
||||
@ -68,6 +69,7 @@ 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 [{
|
||||
|
@ -359,7 +359,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()
|
||||
company = erpnext.get_default_company() or 'Wind Power LLC'
|
||||
|
||||
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(),
|
||||
"company": company or erpnext.get_default_company() or "_Test 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,7 +32,8 @@ def create_training_program(training_program):
|
||||
frappe.get_doc({
|
||||
"doctype": "Training Program",
|
||||
"training_program": training_program,
|
||||
"description": training_program
|
||||
"description": training_program,
|
||||
"company": "Wind Power LLC"
|
||||
}).insert()
|
||||
|
||||
def get_attendees(employee, employee2):
|
||||
|
@ -192,6 +192,7 @@ 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()
|
||||
@ -585,32 +586,6 @@ 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(),
|
||||
"company": erpnext.get_default_company() or 'Wind Power LLC',
|
||||
"departure_time": add_days(now_datetime(), 5),
|
||||
"driver": driver.name,
|
||||
"driver_address": address.name,
|
||||
|
@ -432,30 +432,6 @@ 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,6 +24,7 @@ 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