From 6cac50b52e16f0577092c9fa56b080a04ad868a8 Mon Sep 17 00:00:00 2001 From: ShashaQin Date: Tue, 7 Jun 2016 09:38:57 +0800 Subject: [PATCH] Update bom.py --- erpnext/manufacturing/doctype/bom/bom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index c0960cbdbf..67301411db 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -185,13 +185,13 @@ class BOM(Document): item = frappe.get_doc("Item", self.item) if item.default_bom != self.name: item.default_bom = self.name - item.save() + item.save(ignore_permissions = True) else: frappe.db.set(self, "is_default", 0) item = frappe.get_doc("Item", self.item) if item.default_bom == self.name: item.default_bom = None - item.save() + item.save(ignore_permissions = True) def clear_operations(self): if not self.with_operations: