'Uncheck others if current one is selected as default,
update default bom in item master'

def manage_default_bom(self):

    if (self.is_default and self.is_active):
        from frappe.model.utils import set_default
        set_default(self, u'item')
        item = frappe.get_doc(u'Item', self.item)
        if (item.default_bom != self.name):
            item.default_bom = self.name
            item.save(ignore_permissions=True)
    else:
        frappe.db.set(self, u'is_default', 0)
        item = frappe.get_doc(u'Item', self.item)
        if (item.default_bom == self.name):
            item.default_bom = None
            item.save(ignore_permissions=True)
