Merge pull request #45486 from rohitwaghchaure/fixed-SABB-performance-issue

perf: stock entry with batch
This commit is contained in:
rohitwaghchaure
2025-01-29 20:49:09 +05:30
committed by GitHub
5 changed files with 63 additions and 50 deletions

View File

@@ -924,9 +924,11 @@ class StockController(AccountsController):
row.db_set(dimension.source_fieldname, sl_dict[dimension.target_fieldname])
def make_sl_entries(self, sl_entries, allow_negative_stock=False, via_landed_cost_voucher=False):
from erpnext.stock.serial_batch_bundle import update_batch_qty
from erpnext.stock.stock_ledger import make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
update_batch_qty(self.doctype, self.name, via_landed_cost_voucher=via_landed_cost_voucher)
def make_gl_entries_on_cancel(self):
cancel_exchange_gain_loss_journal(frappe._dict(doctype=self.doctype, name=self.name))