test: add stock to avoid NegativeStockError (#24941)
This commit is contained in:
parent
192ab05869
commit
8ee1146f72
@ -1800,6 +1800,15 @@ class TestSalesInvoice(unittest.TestCase):
|
|||||||
si.selling_price_list = "_Test Price List Rest of the World"
|
si.selling_price_list = "_Test Price List Rest of the World"
|
||||||
si.update_stock = 1
|
si.update_stock = 1
|
||||||
si.items[0].target_warehouse = 'Work In Progress - TCP1'
|
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)
|
add_taxes(si)
|
||||||
si.save()
|
si.save()
|
||||||
|
|
||||||
@ -2269,4 +2278,4 @@ def add_taxes(doc):
|
|||||||
"cost_center": "Main - TCP1",
|
"cost_center": "Main - TCP1",
|
||||||
"description": "Excise Duty",
|
"description": "Excise Duty",
|
||||||
"rate": 12
|
"rate": 12
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user