Re-run global search patch (#3271)

This commit is contained in:
Nabin Hait 2017-05-12 15:25:31 +05:30 committed by Rushabh Mehta
parent 355a494641
commit 6cb0d6da77
3 changed files with 4 additions and 2 deletions

View file

@ -12,7 +12,7 @@ frappe.patches.v8_0.drop_in_dialog
execute:frappe.reload_doc('core', 'doctype', 'docfield', force=True) #2017-03-03
execute:frappe.reload_doc('core', 'doctype', 'docperm') #2017-03-03
frappe.patches.v8_0.drop_is_custom_from_docperm
frappe.patches.v8_0.update_records_in_global_search
frappe.patches.v8_0.update_records_in_global_search #11-05-2017
frappe.patches.v8_0.update_published_in_global_search
execute:frappe.reload_doc('core', 'doctype', 'custom_docperm')
execute:frappe.reload_doc('core', 'doctype', 'deleted_document')

View file

@ -1,5 +1,7 @@
import frappe
from frappe.utils.global_search import get_doctypes_with_global_search, rebuild_for_doctype
def execute():
frappe.cache().delete_value('doctypes_with_global_search')
for doctype in get_doctypes_with_global_search(with_child_tables=False):
rebuild_for_doctype(doctype)

View file

@ -54,7 +54,7 @@ def rebuild_for_doctype(doctype):
:param doctype: Doctype '''
def _get_filters():
filters = frappe._dict({ "docstatus": ["!=", 1] })
filters = frappe._dict({ "docstatus": ["!=", 2] })
if meta.has_field("enabled"):
filters.enabled = 1
if meta.has_field("disabled"):