mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
refactor: Cache Item Reviews and other review feedback
- `get_doc` -> `get_values` and `db.sql` -> `db.delete` in Wishlist Item deletion - cache first page of Item Reviews and burst cache on addition and deletion of reviews - Update redisearch docs link in E Commerce Settings - Removed unused cint import - Broke setting attribute context into smaller functions and code cleanup - Minor recommended items padding tweak - Item reviews form dict now uses website item as key - Customer reviews rendered from UI style consistency - Stock status consistency in listing and full page - Handle no price in variant dialog for matched item
This commit is contained in:
@@ -139,7 +139,7 @@ def get_non_stock_item_status(item_code, item_warehouse_field):
|
||||
# if item is a product bundle, check if its bundle items are in stock
|
||||
if frappe.db.exists("Product Bundle", item_code):
|
||||
items = frappe.get_doc("Product Bundle", item_code).get_all_children()
|
||||
bundle_warehouse = frappe.db.get_value('Item', item_code, item_warehouse_field)
|
||||
return all([get_web_item_qty_in_stock(d.item_code, item_warehouse_field, bundle_warehouse).in_stock for d in items])
|
||||
bundle_warehouse = frappe.db.get_value("Website Item", {"item_code": item_code}, item_warehouse_field)
|
||||
return all(get_web_item_qty_in_stock(d.item_code, item_warehouse_field, bundle_warehouse).in_stock for d in items)
|
||||
else:
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user