mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
Merge branch 'develop' into approver-perms
This commit is contained in:
@@ -61,7 +61,6 @@ class TestBankTransaction(unittest.TestCase):
|
|||||||
def test_debit_credit_output(self):
|
def test_debit_credit_output(self):
|
||||||
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
|
bank_transaction = frappe.get_doc("Bank Transaction", dict(description="Auszahlung Karte MC/000002916 AUTOMAT 698769 K002 27.10. 14:07"))
|
||||||
linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
|
linked_payments = get_linked_payments(bank_transaction.name, ['payment_entry', 'exact_match'])
|
||||||
print(linked_payments)
|
|
||||||
self.assertTrue(linked_payments[0][3])
|
self.assertTrue(linked_payments[0][3])
|
||||||
|
|
||||||
# Check error if already reconciled
|
# Check error if already reconciled
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ class TestShoppingCart(unittest.TestCase):
|
|||||||
def test_add_to_cart(self):
|
def test_add_to_cart(self):
|
||||||
self.login_as_customer()
|
self.login_as_customer()
|
||||||
|
|
||||||
# remove from cart
|
# clear existing quotations
|
||||||
self.remove_all_items_from_cart()
|
self.clear_existing_quotations()
|
||||||
|
|
||||||
# add first item
|
# add first item
|
||||||
update_cart("_Test Item", 1)
|
update_cart("_Test Item", 1)
|
||||||
@@ -208,10 +208,15 @@ class TestShoppingCart(unittest.TestCase):
|
|||||||
"_Test Contact For _Test Customer")
|
"_Test Contact For _Test Customer")
|
||||||
frappe.set_user("test_contact_customer@example.com")
|
frappe.set_user("test_contact_customer@example.com")
|
||||||
|
|
||||||
def remove_all_items_from_cart(self):
|
def clear_existing_quotations(self):
|
||||||
quotation = _get_cart_quotation()
|
quotations = frappe.get_all("Quotation", filters={
|
||||||
quotation.flags.ignore_permissions=True
|
"party_name": get_party().name,
|
||||||
quotation.delete()
|
"order_type": "Shopping Cart",
|
||||||
|
"docstatus": 0
|
||||||
|
}, order_by="modified desc", pluck="name")
|
||||||
|
|
||||||
|
for quotation in quotations:
|
||||||
|
frappe.delete_doc("Quotation", quotation, ignore_permissions=True, force=True)
|
||||||
|
|
||||||
def create_user_if_not_exists(self, email, first_name = None):
|
def create_user_if_not_exists(self, email, first_name = None):
|
||||||
if frappe.db.exists("User", email):
|
if frappe.db.exists("User", email):
|
||||||
|
|||||||
Reference in New Issue
Block a user