mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
Update bom.py
This commit is contained in:
@@ -185,13 +185,13 @@ class BOM(Document):
|
|||||||
item = frappe.get_doc("Item", self.item)
|
item = frappe.get_doc("Item", self.item)
|
||||||
if item.default_bom != self.name:
|
if item.default_bom != self.name:
|
||||||
item.default_bom = self.name
|
item.default_bom = self.name
|
||||||
item.save()
|
item.save(ignore_permissions = True)
|
||||||
else:
|
else:
|
||||||
frappe.db.set(self, "is_default", 0)
|
frappe.db.set(self, "is_default", 0)
|
||||||
item = frappe.get_doc("Item", self.item)
|
item = frappe.get_doc("Item", self.item)
|
||||||
if item.default_bom == self.name:
|
if item.default_bom == self.name:
|
||||||
item.default_bom = None
|
item.default_bom = None
|
||||||
item.save()
|
item.save(ignore_permissions = True)
|
||||||
|
|
||||||
def clear_operations(self):
|
def clear_operations(self):
|
||||||
if not self.with_operations:
|
if not self.with_operations:
|
||||||
|
|||||||
Reference in New Issue
Block a user