From afc5c26d1c7ba2973f8e74d57029e78db550946b Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 8 Feb 2022 16:04:08 +0530 Subject: [PATCH] fix(test): ignore stock validation --- .../pos_invoice_merge_log/test_pos_invoice_merge_log.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py index 928d26676d..fd1aaab264 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py @@ -158,6 +158,7 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): Round off error in consolidated invoice creation if POS Invoice has inclusive tax ''' frappe.db.sql("delete from `tabPOS Invoice`") + frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 1) try: init_user_and_profile() @@ -205,12 +206,14 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): frappe.set_user("Administrator") frappe.db.sql("delete from `tabPOS Profile`") frappe.db.sql("delete from `tabPOS Invoice`") + frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 0) def test_consolidation_round_off_error_2(self): ''' Test the same case as above but with an Unpaid POS Invoice ''' frappe.db.sql("delete from `tabPOS Invoice`") + frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 1) try: init_user_and_profile() @@ -265,3 +268,4 @@ class TestPOSInvoiceMergeLog(unittest.TestCase): frappe.set_user("Administrator") frappe.db.sql("delete from `tabPOS Profile`") frappe.db.sql("delete from `tabPOS Invoice`") + frappe.db.set_value('Stock Settings', None, 'allow_negative_stock', 0)