mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
test: utilize test mixin and barebones test case
(cherry picked from commit dab6709549)
This commit is contained in:
@@ -2119,6 +2119,21 @@ class TestSalesOrder(AccountsTestMixin, FrappeTestCase):
|
|||||||
|
|
||||||
self.assertRaises(frappe.ValidationError, so1.update_status, "Draft")
|
self.assertRaises(frappe.ValidationError, so1.update_status, "Draft")
|
||||||
|
|
||||||
|
@change_settings("Stock Settings", {"enable_stock_reservation": True})
|
||||||
|
def test_warehouse_mapping_based_on_stock_reservation(self):
|
||||||
|
self.create_company()
|
||||||
|
self.create_item("Lamy Safari", True, self.warehouse_stores)
|
||||||
|
self.create_customer()
|
||||||
|
self.clear_old_entries()
|
||||||
|
|
||||||
|
so = frappe.new_doc("Sales Order")
|
||||||
|
so.company = self.company
|
||||||
|
so.transaction_date = today()
|
||||||
|
so.append(
|
||||||
|
"items", {"item_code": self.item, "qty": 10, "rate": 2000, "warehouse": self.warehouse_stores}
|
||||||
|
)
|
||||||
|
so.save()
|
||||||
|
|
||||||
|
|
||||||
def automatically_fetch_payment_terms(enable=1):
|
def automatically_fetch_payment_terms(enable=1):
|
||||||
accounts_settings = frappe.get_doc("Accounts Settings")
|
accounts_settings = frappe.get_doc("Accounts Settings")
|
||||||
|
|||||||
Reference in New Issue
Block a user