test: add stock to avoid NegativeStockError (#24941)

This commit is contained in:
Sagar Vora 2021-03-18 17:45:25 +05:30 committed by GitHub
parent 192ab05869
commit 8ee1146f72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1800,6 +1800,15 @@ class TestSalesInvoice(unittest.TestCase):
si.selling_price_list = "_Test Price List Rest of the World"
si.update_stock = 1
si.items[0].target_warehouse = 'Work In Progress - TCP1'
# Add stock to stores for succesful stock transfer
make_stock_entry(
target="Stores - TCP1",
company = "_Test Company with perpetual inventory",
qty=1,
basic_rate=100
)
add_taxes(si)
si.save()
@ -2269,4 +2278,4 @@ def add_taxes(doc):
"cost_center": "Main - TCP1",
"description": "Excise Duty",
"rate": 12
})
})