-
Notifications
You must be signed in to change notification settings - Fork 10
Interesting Bench Console Snippets
Jignesh Greycube edited this page Mar 12, 2021
·
1 revision
for d in frappe.get_all("BOM", filters={"with_operations": 1}):
doc = frappe.copy_doc(frappe.get_doc("BOM", d.name))
doc.with_operations = 0
doc.save()
doc.submit()
frappe.db.commit()
from erpnext.regional.united_arab_emirates.setup import setup
setup()
will delete obsolete column in db.. fields which have been deleted from doctype (or deleted custom fields in customize form)
frappe.model.meta.trim_tables()
frappe.db.commit()