chore: Redisearch module load tracking
This commit is contained in:
parent
bd0d0ad0de
commit
2514215ec4
@ -46,11 +46,11 @@
|
|||||||
"shop_by_category_section",
|
"shop_by_category_section",
|
||||||
"slideshow",
|
"slideshow",
|
||||||
"item_search_settings_section",
|
"item_search_settings_section",
|
||||||
|
"redisearch_warning",
|
||||||
"search_index_fields",
|
"search_index_fields",
|
||||||
"show_categories_in_search_autocomplete",
|
"show_categories_in_search_autocomplete",
|
||||||
"show_brand_line",
|
"show_brand_line",
|
||||||
"is_redisearch_loaded",
|
"is_redisearch_loaded"
|
||||||
"redisearch"
|
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -339,17 +339,17 @@
|
|||||||
"label": "Is Redisearch Loaded"
|
"label": "Is Redisearch Loaded"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "eval:doc.is_search_module_loaded",
|
"depends_on": "eval:!doc.is_redisearch_loaded",
|
||||||
"fieldname": "redisearch",
|
"fieldname": "redisearch_warning",
|
||||||
"fieldtype": "Heading",
|
"fieldtype": "Heading",
|
||||||
"label": "Redisearch",
|
"label": "Redisearch Warning",
|
||||||
"options": "Some heading"
|
"options": "Redisearch is not loaded. Please install the redisearch module to enable more robust search features."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-26 20:00:35.399936",
|
"modified": "2021-05-26 22:41:34.400589",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "E-commerce",
|
"module": "E-commerce",
|
||||||
"name": "E Commerce Settings",
|
"name": "E Commerce Settings",
|
||||||
|
@ -7,14 +7,14 @@ from frappe.utils import cint, comma_and
|
|||||||
from frappe import _, msgprint
|
from frappe import _, msgprint
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import get_datetime, get_datetime_str, now_datetime, unique
|
from frappe.utils import get_datetime, get_datetime_str, now_datetime, unique
|
||||||
|
from erpnext.e_commerce.website_item_indexing import create_website_items_index, ALLOWED_INDEXABLE_FIELDS_SET, is_search_module_loaded
|
||||||
from erpnext.e_commerce.website_item_indexing import create_website_items_index, ALLOWED_INDEXABLE_FIELDS_SET
|
|
||||||
|
|
||||||
class ShoppingCartSetupError(frappe.ValidationError): pass
|
class ShoppingCartSetupError(frappe.ValidationError): pass
|
||||||
|
|
||||||
class ECommerceSettings(Document):
|
class ECommerceSettings(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
self.get("__onload").quotation_series = frappe.get_meta("Quotation").get_options("naming_series")
|
self.get("__onload").quotation_series = frappe.get_meta("Quotation").get_options("naming_series")
|
||||||
|
self.is_redisearch_loaded = is_search_module_loaded()
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if self.home_page_is_products:
|
if self.home_page_is_products:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user