mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 12:36:37 +00:00
feat: (minor) Backorder indicator and fixed inconsistencies
- Checkbox in website item to indicate if item is on backorder - Indicator on listing on full page if availbale on backorder. - fix: Allow provision to add any valid field from Website Item in Search Index - fix: Settings filter fields are as per Item, make as per Website Item - "Add to quote/ Go to Quote" if cart checkout is disabled
This commit is contained in:
@@ -26,9 +26,11 @@ class ProductQuery:
|
||||
|
||||
self.or_filters = []
|
||||
self.filters = [["published", "=", 1]]
|
||||
self.fields = ['web_item_name', 'name', 'item_name', 'item_code', 'website_image',
|
||||
'variant_of', 'has_variants', 'item_group', 'image', 'web_long_description',
|
||||
'short_description', 'route', 'website_warehouse', 'ranking']
|
||||
self.fields = [
|
||||
"web_item_name", "name", "item_name", "item_code", "website_image",
|
||||
"variant_of", "has_variants", "item_group", "image", "web_long_description",
|
||||
"short_description", "route", "website_warehouse", "ranking", "on_backorder"
|
||||
]
|
||||
|
||||
def query(self, attributes=None, fields=None, search_term=None, start=0, item_group=None):
|
||||
"""
|
||||
@@ -239,6 +241,9 @@ class ProductQuery:
|
||||
warehouse = item.get("website_warehouse")
|
||||
is_stock_item = frappe.get_cached_value("Item", item.item_code, "is_stock_item")
|
||||
|
||||
if item.get("on_backorder"):
|
||||
return
|
||||
|
||||
if not is_stock_item:
|
||||
if warehouse:
|
||||
# product bundle case
|
||||
|
||||
Reference in New Issue
Block a user