Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: slow posting datetime update (backport #44799) #44804

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def validate(self):
self.flags.ignore_submit_comment = True
from erpnext.stock.utils import validate_disabled_warehouse, validate_warehouse_company

self.set_posting_datetime()
self.validate_mandatory()
self.validate_item()
self.validate_batch()
Expand All @@ -56,7 +57,6 @@ def set_posting_datetime(self):
from erpnext.stock.utils import get_combine_datetime

self.posting_datetime = get_combine_datetime(self.posting_date, self.posting_time)
self.db_set("posting_datetime", self.posting_datetime)

def validate_inventory_dimension_negative_stock(self):
if self.is_cancelled:
Expand Down Expand Up @@ -128,7 +128,6 @@ def _get_inventory_dimensions(self):
return inv_dimension_dict

def on_submit(self):
self.set_posting_datetime()
self.check_stock_frozen_date()
self.calculate_batch_qty()

Expand Down
Loading