fix(ux): stock levels take time after item merge

Item merge creates a repost and depending on number of entries it can
take from 1 to n hours for it to finish. (depending upon queued up
reposts)

Added message so users don't feel confused till this operation is
finished.

(cherry picked from commit 1eab3a44f6)
This commit is contained in:
Ankush Menat
2021-11-01 14:16:57 +05:30
committed by Ankush Menat
parent 6d0ff88184
commit 79b087670f

View File

@@ -417,6 +417,8 @@ class Item(Document):
def after_rename(self, old_name, new_name, merge):
if merge:
self.validate_duplicate_item_in_stock_reconciliation(old_name, new_name)
frappe.msgprint(_("It can take upto few hours for accurate stock values to be visible after merging items."),
indicator="orange", title="Note")
if self.published_in_website:
invalidate_cache_for_item(self)