Merge pull request #1607 from anandpdoshi/hotfix

Fixed clear cache for item page
This commit is contained in:
Anand Doshi 2014-05-08 17:46:30 +05:30
commit 713e453126
2 changed files with 3 additions and 1 deletions

View File

@ -39,3 +39,4 @@ execute:frappe.db.sql("update `tabJournal Voucher` set voucher_type='Journal Ent
execute:frappe.delete_doc("DocType", "Grade")
erpnext.patches.4_0.remove_india_specific_fields
execute:frappe.delete_doc_if_exists("DocType", "Warehouse User")
execute:frappe.db.sql("delete from `tabWebsite Item Group` where ifnull(item_group, '')=''")

View File

@ -348,4 +348,5 @@ def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0):
def invalidate_cache_for_item(doc):
invalidate_cache_for(doc, doc.item_group)
for d in doc.get({"doctype":"Website Item Group"}):
invalidate_cache_for(doc, d.item_group)
if d.item_group:
invalidate_cache_for(doc, d.item_group)