mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
perf: process_gl_map causing performance issues in the reposting
(cherry picked from commit a96fa55704)
# Conflicts:
# erpnext/stock/doctype/stock_entry/stock_entry.py
This commit is contained in:
committed by
Mergify
parent
2c44e4ec2c
commit
af7dc363e1
@@ -663,7 +663,9 @@ class StockController(AccountsController):
|
|||||||
).format(wh, self.company)
|
).format(wh, self.company)
|
||||||
)
|
)
|
||||||
|
|
||||||
return process_gl_map(gl_list, precision=precision)
|
return process_gl_map(
|
||||||
|
gl_list, precision=precision, from_repost=frappe.flags.through_repost_item_valuation
|
||||||
|
)
|
||||||
|
|
||||||
def get_debit_field_precision(self):
|
def get_debit_field_precision(self):
|
||||||
if not frappe.flags.debit_field_precision:
|
if not frappe.flags.debit_field_precision:
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ class PurchaseReceipt(BuyingController):
|
|||||||
self.make_tax_gl_entries(gl_entries, via_landed_cost_voucher)
|
self.make_tax_gl_entries(gl_entries, via_landed_cost_voucher)
|
||||||
update_regional_gl_entries(gl_entries, self)
|
update_regional_gl_entries(gl_entries, self)
|
||||||
|
|
||||||
return process_gl_map(gl_entries)
|
return process_gl_map(gl_entries, from_repost=frappe.flags.through_repost_item_valuation)
|
||||||
|
|
||||||
def make_item_gl_entries(self, gl_entries, warehouse_account=None):
|
def make_item_gl_entries(self, gl_entries, warehouse_account=None):
|
||||||
from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import (
|
from erpnext.accounts.doctype.purchase_invoice.purchase_invoice import (
|
||||||
|
|||||||
@@ -1648,9 +1648,13 @@ class StockEntry(StockController):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
self.set_gl_entries_for_landed_cost_voucher(gl_entries, warehouse_account)
|
self.set_gl_entries_for_landed_cost_voucher(gl_entries, warehouse_account)
|
||||||
|
|
||||||
return process_gl_map(gl_entries)
|
return process_gl_map(gl_entries)
|
||||||
|
=======
|
||||||
|
return process_gl_map(gl_entries, from_repost=frappe.flags.through_repost_item_valuation)
|
||||||
|
>>>>>>> a96fa55704 (perf: process_gl_map causing performance issues in the reposting)
|
||||||
|
|
||||||
def set_gl_entries_for_landed_cost_voucher(self, gl_entries, warehouse_account):
|
def set_gl_entries_for_landed_cost_voucher(self, gl_entries, warehouse_account):
|
||||||
landed_cost_entries = self.get_item_account_wise_lcv_entries()
|
landed_cost_entries = self.get_item_account_wise_lcv_entries()
|
||||||
|
|||||||
@@ -574,7 +574,7 @@ class SubcontractingReceipt(SubcontractingController):
|
|||||||
self.make_item_gl_entries(gl_entries, warehouse_account)
|
self.make_item_gl_entries(gl_entries, warehouse_account)
|
||||||
self.make_item_gl_entries_for_lcv(gl_entries, warehouse_account)
|
self.make_item_gl_entries_for_lcv(gl_entries, warehouse_account)
|
||||||
|
|
||||||
return process_gl_map(gl_entries)
|
return process_gl_map(gl_entries, from_repost=frappe.flags.through_repost_item_valuation)
|
||||||
|
|
||||||
def make_item_gl_entries(self, gl_entries, warehouse_account=None):
|
def make_item_gl_entries(self, gl_entries, warehouse_account=None):
|
||||||
warehouse_with_no_account = []
|
warehouse_with_no_account = []
|
||||||
|
|||||||
Reference in New Issue
Block a user