mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-29 17:11:33 +02:00
fix: update show in website on disabling item (#18832)
This commit is contained in:
committed by
Nabin Hait
parent
f254d8c5ee
commit
43ebcb5876
@@ -124,6 +124,7 @@ class Item(WebsiteGenerator):
|
||||
self.validate_item_defaults()
|
||||
self.update_defaults_from_item_group()
|
||||
self.validate_stock_for_has_batch_and_has_serial()
|
||||
self.update_show_in_website()
|
||||
|
||||
if not self.get("__islocal"):
|
||||
self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group")
|
||||
@@ -437,6 +438,10 @@ class Item(WebsiteGenerator):
|
||||
|
||||
[self.remove(d) for d in to_remove]
|
||||
|
||||
def update_show_in_website(self):
|
||||
if self.disabled:
|
||||
self.show_in_website = False
|
||||
|
||||
def update_template_tables(self):
|
||||
template = frappe.get_doc("Item", self.variant_of)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user