mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
perf: data import with 99 stock entries (#42685)
perf: data import for stock entries
This commit is contained in:
@@ -10,6 +10,7 @@ from frappe import _, scrub
|
|||||||
from frappe.model.meta import get_field_precision
|
from frappe.model.meta import get_field_precision
|
||||||
from frappe.query_builder.functions import Sum
|
from frappe.query_builder.functions import Sum
|
||||||
from frappe.utils import (
|
from frappe.utils import (
|
||||||
|
add_to_date,
|
||||||
cint,
|
cint,
|
||||||
cstr,
|
cstr,
|
||||||
flt,
|
flt,
|
||||||
@@ -632,6 +633,7 @@ class update_entries_after:
|
|||||||
|
|
||||||
def get_sle_against_current_voucher(self):
|
def get_sle_against_current_voucher(self):
|
||||||
self.args["posting_datetime"] = get_combine_datetime(self.args.posting_date, self.args.posting_time)
|
self.args["posting_datetime"] = get_combine_datetime(self.args.posting_date, self.args.posting_time)
|
||||||
|
self.args["updated_creation_time"] = add_to_date(self.args.creation, seconds=-2)
|
||||||
|
|
||||||
return frappe.db.sql(
|
return frappe.db.sql(
|
||||||
"""
|
"""
|
||||||
@@ -646,6 +648,7 @@ class update_entries_after:
|
|||||||
and (
|
and (
|
||||||
posting_datetime = %(posting_datetime)s
|
posting_datetime = %(posting_datetime)s
|
||||||
)
|
)
|
||||||
|
and creation >= %(updated_creation_time)s
|
||||||
order by
|
order by
|
||||||
creation ASC
|
creation ASC
|
||||||
for update
|
for update
|
||||||
|
|||||||
Reference in New Issue
Block a user