mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 21:05:10 +00:00
fix: perf issue while submitting stock entry (#39634)
(cherry picked from commit b14886b227)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -1594,9 +1594,10 @@ class TestPurchaseReceipt(FrappeTestCase):
|
|||||||
make_stock_entry(
|
make_stock_entry(
|
||||||
purpose="Material Receipt",
|
purpose="Material Receipt",
|
||||||
item_code=item.name,
|
item_code=item.name,
|
||||||
qty=15,
|
qty=20,
|
||||||
company=company,
|
company=company,
|
||||||
to_warehouse=from_warehouse,
|
to_warehouse=from_warehouse,
|
||||||
|
posting_date=add_days(today(), -3),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Step 3: Create Delivery Note with Internal Customer
|
# Step 3: Create Delivery Note with Internal Customer
|
||||||
@@ -1619,6 +1620,8 @@ class TestPurchaseReceipt(FrappeTestCase):
|
|||||||
from erpnext.stock.doctype.delivery_note.delivery_note import make_inter_company_purchase_receipt
|
from erpnext.stock.doctype.delivery_note.delivery_note import make_inter_company_purchase_receipt
|
||||||
|
|
||||||
pr = make_inter_company_purchase_receipt(dn.name)
|
pr = make_inter_company_purchase_receipt(dn.name)
|
||||||
|
pr.set_posting_time = 1
|
||||||
|
pr.posting_date = today()
|
||||||
pr.items[0].qty = 15
|
pr.items[0].qty = 15
|
||||||
pr.items[0].from_warehouse = target_warehouse
|
pr.items[0].from_warehouse = target_warehouse
|
||||||
pr.items[0].warehouse = to_warehouse
|
pr.items[0].warehouse = to_warehouse
|
||||||
@@ -1637,6 +1640,7 @@ class TestPurchaseReceipt(FrappeTestCase):
|
|||||||
company=company,
|
company=company,
|
||||||
from_warehouse=from_warehouse,
|
from_warehouse=from_warehouse,
|
||||||
to_warehouse=target_warehouse,
|
to_warehouse=target_warehouse,
|
||||||
|
posting_date=add_days(pr.posting_date, -1),
|
||||||
)
|
)
|
||||||
|
|
||||||
pr.reload()
|
pr.reload()
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ class StockEntry(StockController):
|
|||||||
set_batch_nos(self, "s_warehouse")
|
set_batch_nos(self, "s_warehouse")
|
||||||
|
|
||||||
self.validate_serialized_batch()
|
self.validate_serialized_batch()
|
||||||
self.set_actual_qty()
|
|
||||||
self.calculate_rate_and_amount()
|
self.calculate_rate_and_amount()
|
||||||
self.validate_putaway_capacity()
|
self.validate_putaway_capacity()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user