refactor(test): repost test case for purchase invoice

(cherry picked from commit 11c8d9fcf1e7eef1890b719b37c823822b6a108d)
This commit is contained in:
ruthra kumar 2023-11-07 14:18:07 +05:30 committed by Mergify
parent 85d255c8a2
commit b48b858752

View File

@ -1903,6 +1903,12 @@ class TestPurchaseInvoice(FrappeTestCase, StockTestMixin):
disable_dimension()
def test_repost_accounting_entries(self):
# update repost settings
settings = frappe.get_doc("Repost Accounting Ledger Settings")
if not [x for x in settings.allowed_types if x.document_type == "Purchase Invoice"]:
settings.append("allowed_types", {"document_type": "Purchase Invoice", "allowed": True})
settings.save()
pi = make_purchase_invoice(
rate=1000,
price_list_rate=1000,