fix: update show in website on disabling item (#18831)
This commit is contained in:
parent
d8c262fd5c
commit
5dd1b50802
@ -124,6 +124,7 @@ class Item(WebsiteGenerator):
|
||||
self.update_defaults_from_item_group()
|
||||
self.validate_auto_reorder_enabled_in_stock_settings()
|
||||
self.cant_change()
|
||||
self.update_show_in_website()
|
||||
|
||||
if not self.get("__islocal"):
|
||||
self.old_item_group = frappe.db.get_value(self.doctype, self.name, "item_group")
|
||||
@ -476,6 +477,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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user