'Validates, main Item is not a stock item'

def validate_main_item(self):

    if frappe.db.get_value(u'Item', self.new_item_code, u'is_stock_item'):
        frappe.throw(_(u'Parent    Item    {0}    must    not    be    a    Stock    Item').format(self.new_item_code))
